335 lines
18 KiB
TypeScript
335 lines
18 KiB
TypeScript
/* Metro module 11217; source: lib/uploadRtcLogFiles.android.tsx; dependencies: [5, 661, 3, 11218, 4131, 507, 2] */
|
|
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun85739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11403:6, offset: 0x01f7a3fd, size: 197 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ConstantsModule;
|
|
const env0_3 = value.DebugLogCategory;
|
|
const env0_4 = value.Endpoints;
|
|
value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('uploadRtcLogFiles');
|
|
(FileImportTrackerModule).fileFinishedImporting('lib/uploadRtcLogFiles.android.tsx');
|
|
exports.uploadRtcLogFiles = function() {
|
|
return _uploadRtcLogFiles.apply(this, arguments);
|
|
};
|
|
function _uploadRtcLogFiles() { // fn#85740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11403:187, offset: 0x01f7a4c2, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun85742).apply(this, arguments);
|
|
function* _fun85742(a0) { // fn#85742, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11403:246, offset: 0x01f7a4ff, size: 659 bytes, params: 2, frame: 36
|
|
var r16;
|
|
var value;
|
|
var value2;
|
|
var items2;
|
|
var length;
|
|
var value3;
|
|
var property;
|
|
var binding;
|
|
var binding2;
|
|
var property2;
|
|
var readFile;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
var binding3;
|
|
var property3;
|
|
var value7;
|
|
var HTTP;
|
|
var post;
|
|
var object;
|
|
var DEBUG_LOG;
|
|
var binding4;
|
|
var ANDROID_APP;
|
|
var value8;
|
|
var object2;
|
|
var value9;
|
|
var error;
|
|
var error2;
|
|
var status;
|
|
var message;
|
|
var HermesInternal;
|
|
var concat;
|
|
var binding5;
|
|
var UploadVoiceDebugLogsError;
|
|
var UploadErrorCodes;
|
|
var UPLOAD;
|
|
var prototype;
|
|
var uploadVoiceDebugLogsError;
|
|
var binding6;
|
|
var PROGRESS;
|
|
var warn;
|
|
var error3;
|
|
var binding7;
|
|
var READ;
|
|
exceptionSkip53: while (true) {
|
|
exceptionLanding53: while (true) {
|
|
exceptionSkip44: while (true) {
|
|
exceptionLanding44: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
value = 0;
|
|
items2 = ['discord-webrtc_0', 'discord-webrtc_1', 'discord-last-webrtc_0', 'discord-last-webrtc_1'];
|
|
length = items2.length;
|
|
value3 = environment.__proto__.__proto__;
|
|
if (value < length) {
|
|
r16 = value;
|
|
reducibleLoop2: while (true) {
|
|
property = items2[r16];
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
try {
|
|
binding2 = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
try {
|
|
property2 = binding2[3];
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
try {
|
|
value = binding(property2);
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
try {
|
|
readFile = value.readFile;
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
try {
|
|
value = Reflect.apply(readFile, value, ['documents', property, 'utf8']);
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
yield value;
|
|
try {
|
|
value = undefined;
|
|
value4 = false;
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
if (value4) {
|
|
return value;
|
|
}
|
|
try {
|
|
value5 = value == null;
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
if (!value5) {
|
|
try {
|
|
length = value.length;
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
try {
|
|
value6 = length > a0;
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
if (value6) {
|
|
try {
|
|
binding = env2_5;
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
try {
|
|
warn = binding.warn;
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
try {
|
|
Reflect.apply(warn, binding,
|
|
['uploadRtcLogFiles: Log file is too big, skipping upload']);
|
|
} catch (error) {
|
|
break exceptionLanding53;
|
|
}
|
|
} else {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
binding3 = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
property3 = binding3[5];
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
value7 = binding(property3);
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
HTTP = value7.HTTP;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
post = HTTP.post;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
DEBUG_LOG = binding.DEBUG_LOG;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
binding4 = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
ANDROID_APP = binding4.ANDROID_APP;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
value8 = Reflect.apply(DEBUG_LOG, binding, [ANDROID_APP, property]);
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
object.url = value8;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
object.body = value;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
object2['Content-Type'] = 'text/plain';
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
object.headers = object2;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
object.rejectWithError = false;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
value = Reflect.apply(post, HTTP, [object]);
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
yield value;
|
|
try {
|
|
value = undefined;
|
|
value9 = false;
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
reducibleJoin50: while (true) {
|
|
if (value9) {
|
|
return value;
|
|
}
|
|
break reducibleJoin50;
|
|
}
|
|
}
|
|
}
|
|
value = typeof r16 === 'bigint' ? r16 + 1n : +r16 + 1;
|
|
length = items2.length;
|
|
if (!(value < length)) {
|
|
return undefined;
|
|
}
|
|
r16 = value;
|
|
continue reducibleLoop2;
|
|
}
|
|
}
|
|
return undefined;
|
|
break exceptionSkip44;
|
|
}
|
|
binding = env2_5;
|
|
error2 = binding.error;
|
|
status = error.status;
|
|
message = error.message;
|
|
HermesInternal = global.HermesInternal;
|
|
concat = HermesInternal.concat;
|
|
Reflect.apply(error2, binding,
|
|
['uploadRtcLogFiles: Log file upload error: status: ' + status + ', message: ' + message]);
|
|
status = error.status;
|
|
if (status === 429) {
|
|
binding = env2_0;
|
|
binding6 = env2_1;
|
|
UploadVoiceDebugLogsError = binding(binding6[4]).UploadVoiceDebugLogsError;
|
|
PROGRESS = binding(binding6[4]).UploadErrorCodes.PROGRESS;
|
|
throw new UploadVoiceDebugLogsError();
|
|
}
|
|
binding = env2_0;
|
|
binding5 = env2_1;
|
|
UploadVoiceDebugLogsError = binding(binding5[4]).UploadVoiceDebugLogsError;
|
|
UploadErrorCodes = binding(binding5[4]).UploadErrorCodes;
|
|
UPLOAD = UploadErrorCodes.UPLOAD;
|
|
prototype = UploadVoiceDebugLogsError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: UploadVoiceDebugLogsError}});
|
|
uploadVoiceDebugLogsError = new UploadVoiceDebugLogsError();
|
|
value = uploadVoiceDebugLogsError instanceof Object ? uploadVoiceDebugLogsError : value;
|
|
throw value;
|
|
break exceptionSkip44;
|
|
}
|
|
break exceptionSkip53;
|
|
}
|
|
binding = env2_5;
|
|
error3 = binding.error;
|
|
message = error.message;
|
|
HermesInternal = global.HermesInternal;
|
|
concat = HermesInternal.concat;
|
|
Reflect.apply(error3, binding, ['uploadRtcLogFiles: Log file reading error: ' + message]);
|
|
binding = env2_0;
|
|
binding7 = env2_1;
|
|
UploadVoiceDebugLogsError = binding(binding7[4]).UploadVoiceDebugLogsError;
|
|
UploadErrorCodes = binding(binding7[4]).UploadErrorCodes;
|
|
READ = UploadErrorCodes.READ;
|
|
prototype = UploadVoiceDebugLogsError.prototype;
|
|
value = Object.create(prototype, {constructor: {value: UploadVoiceDebugLogsError}});
|
|
uploadVoiceDebugLogsError = new UploadVoiceDebugLogsError();
|
|
value = uploadVoiceDebugLogsError instanceof Object ? uploadVoiceDebugLogsError : value;
|
|
throw value;
|
|
break exceptionSkip53;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun85739, 11217, [5, 661, 3, 11218, 4131, 507,
|
|
2]) /* metro module 11217, dependencies: [5, 661, 3, 11218, 4131, 507, 2] */;
|