GT2/GT2-iOS/node_modules/xdl/build/__sourcemaps__/Diagnostics.js.map

1 line
15 KiB
Plaintext

{"version":3,"sources":["Diagnostics.js"],"names":["async","info","let","user","await","UserManager","getCurrentUserAsync","username","expoHome","UserSettings","dotExpoHomeDirectory","infoJsonFile","path","join","writeAsync","tempDir","Env","home","archivePath","Utils","ncpAsync","filter","filename","includes","settingsJsonFile","SETTINGS_FILE_NAME","settingsJson","readAsync","accessToken","auth","e","console","error","tar","create","file","gzip","cwd","relative","rimraf","sync","isNode","fs","createReadStream","Blob","readFileAsync","formData","append","response","Api","callMethodAsync","url","_uploadLogsAsync","options","Binaries","sourceBashLoginScriptsAsync","whichCommand","process","platform","result","spawnAsync","nodeVersion","_","trim","stdout","nodePath","npmVersion","npmPath","watchmanVersion","Watchman","unblockAndGetVersionAsync","watchmanPath","adbVersion","adbPath","env","PATH","shell","SHELL","os","homedir","nvmPath","NVM_PATH","lang","LANG","dirname","__dirname","memoryFree","_formatBytes","freemem","memoryTotal","totalmem","ip","address","hostname","xdeProcesses","child_process","execSync","toString","numXdeProcesses","watchmanProcesses","numWatchmanProcesses","ngrokProcesses","numNgrokProcesses","isXcodeInstalled","xcrunVersion","xcodebuildVersion","launchctlLimit","uploadLogs","limitLengthForIntercom","mapValues","value","length","startsWith","substring","getDeviceInfoAsync","promisify","readFile","bytes","toFixed"],"mappings":";;;;;;;;+BA4BAA,WAAgCC,IAAhCD,EAAsE;AACpEE,QAAIC,OAAOC,MAAMC,gCAAYC,mBAAZD,EAAjBH;AACAA,QAAIK,WAAWJ,OAAOA,KAAKI,QAAZJ,GAAuB,WAAtCD;;AAEA;AACAA,QAAIM,WAAWC,gDAAaC,oBAAbD,EAAfP;AACAA,QAAIS,eAAe,4CAAaC,cAAKC,IAALD,CAAUJ,QAAVI,EAAoB,iBAApBA,CAAb,CAAnBV;AACAE,UAAMO,aAAaG,UAAbH,CAAwBV,IAAxBU,CAANP;;AAEA;AACAF,QAAIa,UAAUH,cAAKC,IAALD,CA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AA4B,KAAnC;AACF,GAFO,MAEA,IAAID,QAAQ,CAAZ,EAAe;AACpB,WAAOA,QAAQ,QAAf;AACF,GAFO,MAEA,IAAIA,UAAU,CAAd,EAAiB;AACtB,WAAOA,QAAQ,eAAf;AACF,GAFO,MAEA;AACL,WAAO,SAAP;AACF;AACF","file":"../Diagnostics.js","sourcesContent":["/**\n * @flow\n */\n\nimport _ from 'lodash';\nimport child_process from 'child_process';\nimport fs from 'fs';\nimport JsonFile from '@expo/json-file';\nimport os from 'os';\nimport path from 'path';\nimport promisify from 'util.promisify';\nimport rimraf from 'rimraf';\nimport spawnAsync from '@expo/spawn-async';\nimport tar from 'tar';\n\nimport ip from './ip';\nimport Api from './Api';\nimport * as Binaries from './Binaries';\nimport * as Env from './Env';\nimport FormData from './tools/FormData';\nimport { isNode } from './tools/EnvironmentHelper';\nimport UserManager from './User';\nimport UserSettings from './UserSettings';\nimport * as Utils from './Utils';\nimport * as Watchman from './Watchman';\n\nconst readFileAsync = promisify(fs.readFile);\n\nasync function _uploadLogsAsync(info: any): Promise<boolean | string> {\n let user = await UserManager.getCurrentUserAsync();\n let username = user ? user.username : 'anonymous';\n\n // write info to file\n let expoHome = UserSettings.dotExpoHomeDirectory();\n let infoJsonFile = new JsonFile(path.join(expoHome, 'debug-info.json'));\n await infoJsonFile.writeAsync(info);\n\n // copy files to tempDir\n let tempDir = path.join(Env.home(), `${username}-diagnostics`);\n let archivePath = path.join(expoHome, 'diagnostics.tar.gz');\n await Utils.ncpAsync(expoHome, tempDir, {\n filter: filename => {\n if (\n filename.includes('diagnostics') ||\n filename.includes('starter-app-cache') ||\n filename.includes('android-apk-cache') ||\n filename.includes('ios-simulator-app-cache') ||\n filename.includes('state.json~')\n ) {\n return false;\n } else {\n return true;\n }\n },\n });\n\n // remove access token\n try {\n let settingsJsonFile = new JsonFile(path.join(tempDir, UserSettings.SETTINGS_FILE_NAME));\n let settingsJson = await settingsJsonFile.readAsync();\n settingsJson.accessToken = 'redacted';\n settingsJson.auth = 'redacted';\n await settingsJsonFile.writeAsync(settingsJson);\n } catch (e) {\n console.error(e);\n }\n\n // compress\n await tar.create({ file: archivePath, gzip: true, cwd: Env.home() }, [\n path.relative(Env.home(), tempDir),\n ]);\n rimraf.sync(tempDir);\n\n // upload\n let file;\n if (isNode()) {\n file = fs.createReadStream(archivePath);\n } else {\n file = new Blob([await readFileAsync(archivePath)]);\n }\n let formData = new FormData();\n formData.append('archive', file);\n\n let response = await Api.callMethodAsync('uploadDiagnostics', [{}], 'put', null, { formData });\n return response.url;\n}\n\n/* eslint-disable prefer-template */\n// From http://stackoverflow.com/questions/15900485/correct-way-to-convert-size-in-bytes-to-kb-mb-gb-in-javascript\nfunction _formatBytes(bytes: number): string {\n if (bytes >= 1000000000) {\n return (bytes / 1000000000).toFixed(2) + ' GB';\n } else if (bytes >= 1000000) {\n return (bytes / 1000000).toFixed(2) + ' MB';\n } else if (bytes >= 1000) {\n return (bytes / 1000).toFixed(2) + ' KB';\n } else if (bytes > 1) {\n return bytes + ' bytes';\n } else if (bytes === 1) {\n return bytes + '${bytes} byte';\n } else {\n return '0 bytes';\n }\n}\n/* eslint-enable prefer-template */\n\nexport async function getDeviceInfoAsync(options: any = {}): Promise<any> {\n let info = {};\n\n await Binaries.sourceBashLoginScriptsAsync();\n let whichCommand = process.platform === 'win32' ? 'where' : 'which';\n\n try {\n let result = await spawnAsync('node', ['--version']);\n info.nodeVersion = _.trim(result.stdout);\n } catch (e) {}\n\n try {\n let result = await spawnAsync(whichCommand, ['node']);\n info.nodePath = _.trim(result.stdout);\n } catch (e) {}\n\n try {\n let result = await spawnAsync('npm', ['--version']);\n info.npmVersion = _.trim(result.stdout);\n } catch (e) {}\n\n try {\n let result = await spawnAsync(whichCommand, ['npm']);\n info.npmPath = _.trim(result.stdout);\n } catch (e) {}\n\n try {\n info.watchmanVersion = await Watchman.unblockAndGetVersionAsync();\n } catch (e) {}\n\n try {\n let result = await spawnAsync(whichCommand, ['watchman']);\n info.watchmanPath = _.trim(result.stdout);\n } catch (e) {}\n\n try {\n let result = await spawnAsync('adb', ['version']);\n info.adbVersion = _.trim(result.stdout);\n } catch (e) {}\n\n try {\n let result = await spawnAsync(whichCommand, ['adb']);\n info.adbPath = _.trim(result.stdout);\n } catch (e) {}\n\n info.path = process.env.PATH;\n info.shell = process.env.SHELL;\n info.home = os.homedir();\n info.nvmPath = process.env.NVM_PATH;\n info.lang = process.env.LANG;\n info.dirname = __dirname;\n info.memoryFree = _formatBytes(os.freemem());\n info.memoryTotal = _formatBytes(os.totalmem());\n info.ip = ip.address();\n info.hostname = os.hostname();\n\n // TODO: fix these commands on linux\n if (process.platform === 'darwin') {\n // || process.platform === 'linux') {\n try {\n info.xdeProcesses = _.trim(child_process.execSync('pgrep XDE | xargs ps -p').toString());\n } catch (e) {}\n\n try {\n info.numXdeProcesses = _.trim(child_process.execSync('pgrep XDE | wc -l').toString());\n } catch (e) {}\n\n try {\n info.watchmanProcesses = _.trim(\n child_process.execSync('pgrep watchman | xargs ps -p').toString()\n );\n } catch (e) {}\n\n try {\n info.numWatchmanProcesses = _.trim(\n child_process.execSync('pgrep watchman | wc -l').toString()\n );\n } catch (e) {}\n\n try {\n info.ngrokProcesses = _.trim(child_process.execSync('pgrep ngrok | xargs ps -p').toString());\n } catch (e) {}\n\n try {\n info.numNgrokProcesses = _.trim(child_process.execSync('pgrep ngrok | wc -l').toString());\n } catch (e) {}\n }\n\n if (process.platform === 'darwin') {\n // `xcrun` and `xcodebuild` will pop up a dialog if Xcode isn't installed\n if (Binaries.isXcodeInstalled()) {\n try {\n let result = await spawnAsync('xcrun', ['--version']);\n info.xcrunVersion = _.trim(result.stdout);\n } catch (e) {}\n\n try {\n let result = await spawnAsync('xcodebuild', ['-version']);\n info.xcodebuildVersion = _.trim(result.stdout);\n } catch (e) {}\n }\n\n try {\n let result = await spawnAsync('launchctl', ['limit']);\n info.launchctlLimit = _.trim(result.stdout);\n } catch (e) {}\n }\n\n // TODO: can probably get rid of these options if we remove Intercom\n if (options.uploadLogs) {\n info.url = await _uploadLogsAsync(info);\n }\n\n if (options.limitLengthForIntercom) {\n info = _.mapValues(info, value => {\n if (value && value.length > 100 && !value.startsWith('http')) {\n return value.substring(0, 100);\n } else {\n return value;\n }\n });\n }\n\n return info;\n}\n"],"sourceRoot":"/xdl/src"}