MCPcopy Create free account
hub / github.com/evi0s/WMPFDebugger / c

Function c

src/third-party/RemoteDebugCodex.js:220–420  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

218 }
219
220 function c(s) {
221 const r = "string" == typeof s.data ? Buffer.from(s.data) : s.data;
222 let i = r,
223 m = 0;
224 if (r && s.compressAlgo && 0 != (s.compressAlgo & t.CompressAlgo.Zlib)) {
225 Date.now();
226 m = i.byteLength, i = e.inflateSync(r), n.compressionSavedBytes += i.byteLength - m
227 }
228 let b = null;
229 const d = s.category;
230 if (i) switch (s.category) {
231 case t.DebugMessageCategory.Breakpoint: {
232 const e = o.mmbizwxadevremote.WARemoteDebug_Breakpoint.decode(i);
233 b = {
234 is_hit: o.mmbizwxadevremote.WARemoteDebug_Breakpoint.toObject(e).isHit ? 1 : 0
235 };
236 break
237 }
238 case t.DebugMessageCategory.CallInterface: {
239 const e = o.mmbizwxadevremote.WARemoteDebug_CallInterface.decode(i),
240 t = o.mmbizwxadevremote.WARemoteDebug_CallInterface.toObject(e);
241 b = {
242 name: t.objName,
243 method: t.methodName,
244 args: t.methodArgList,
245 call_id: t.callId
246 };
247 break
248 }
249 case t.DebugMessageCategory.CallInterfaceResult: {
250 const e = o.mmbizwxadevremote.WARemoteDebug_CallInterfaceResult.decode(i),
251 t = o.mmbizwxadevremote.WARemoteDebug_CallInterfaceResult.toObject(e);
252 b = {
253 ret: t.ret,
254 call_id: t.callId,
255 debug_info: t.debugInfo
256 };
257 break
258 }
259 case t.DebugMessageCategory.EvaluateJavascript: {
260 const e = o.mmbizwxadevremote.WARemoteDebug_EvaluateJavascript.decode(i),
261 t = o.mmbizwxadevremote.WARemoteDebug_EvaluateJavascript.toObject(e);
262 b = {
263 script: t.script,
264 evaluate_id: t.evaluateId,
265 debug_info: t.debugInfo
266 };
267 break
268 }
269 case t.DebugMessageCategory.EvaluateJavascriptResult: {
270 const e = o.mmbizwxadevremote.WARemoteDebug_EvaluateJavascriptResult.decode(i),
271 t = o.mmbizwxadevremote.WARemoteDebug_EvaluateJavascriptResult.toObject(e);
272 b = {
273 ret: t.ret,
274 evaluate_id: t.evaluateId
275 };
276 break
277 }

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected