(config)
| 36 | } |
| 37 | |
| 38 | middleware(config) { |
| 39 | return async (ctx, next) => { |
| 40 | if (ctx.path == '/v8/loadVMSymbols') { |
| 41 | await this.parseVMSymbols(ctx) |
| 42 | } else if (ctx.path == '/v8/info/platform') { |
| 43 | ctx.response.type = 'json'; |
| 44 | ctx.response.body = JSON.stringify({ |
| 45 | 'name': process.platform, |
| 46 | 'nmExec': this.nmExec, |
| 47 | 'objdumpExec': this.objdumpExec, |
| 48 | 'targetRootFS': config.target, |
| 49 | 'apkEmbeddedLibrary': config.apkEmbeddedLibrary |
| 50 | }); |
| 51 | } |
| 52 | await next(); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | async parseVMSymbols(ctx) { |
| 57 | const query = ctx.request.query; |
nothing calls this directly
no test coverage detected