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

Class AppFilesScanner

helpers/app-files-scanner.js:79–739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79export default class AppFilesScanner {
80
81 constructor( {
82 observableFilesArray,
83 testResultStore,
84 zipModule = null
85 } ) {
86 // Files to process
87 this.files = observableFilesArray
88
89 this.testResultStore = testResultStore
90
91 this.zipModule = zipModule
92 }
93
94 get zip () {
95
96 if ( this.zipModule ) return this.zipModule
97
98 return zip
99 }
100
101 isApp ( file ) {
102
103 if ( file.type.includes('/') && notAppFileTypes.has( file.type.split('/')[0] ) ) return false
104
105 return true
106 }
107
108 getStatusMessage () {
109 // 'Drag and drop one or multiple apps'
110
111 // return `Searching for apps at ${ file.url }`
112
113
114 }
115
116 getFileStatusMessage ( file ) {
117
118
119 // CORS error - 'This page has asked not to be scanned. '
120
121 // Status Code Error - 'This page is not loading properly. '
122
123 // No app urls found - 'No apps found on this page. Try a different page or entering the package URL directly. You can also manually download the package then drop it on here. '
124
125 // 'Found # apps'
126
127 // Fetching / File Loading from drag and drop - 'Loading # apps'
128
129 // Unzipping, archive search and Parsing - 'Processing # of #'
130
131 // Not able to unzip - 'Unable to open package. Try a different file. '
132
133 // No Mach-o binary found - 'Could not find Mac App data in package. Try a different package. '
134
135 // Mach-o Parsing Error - 'Unable to scan package. Try a different one. '
136

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected