diff --git a/packages/core/src/expose.js b/packages/core/src/expose.js index 388104e..ee3593b 100644 --- a/packages/core/src/expose.js +++ b/packages/core/src/expose.js @@ -37,7 +37,7 @@ config.resetDefault() const server = modules.server const serverStart = server.start -function newServerStart({ mitmproxyPath }) { +function newServerStart ({ mitmproxyPath }) { return serverStart({ mitmproxyPath, plugins: plugin }) } server.start = newServerStart diff --git a/packages/core/src/modules/index.js b/packages/core/src/modules/index.js index a58c4dc..c93790a 100644 --- a/packages/core/src/modules/index.js +++ b/packages/core/src/modules/index.js @@ -1,5 +1,5 @@ module.exports = { server: require('./server'), proxy: require('./proxy'), - plugin: require('./plugin') + plugin: require('./plugin'), } diff --git a/packages/core/src/shell/scripts/setup-ca.js b/packages/core/src/shell/scripts/setup-ca.js index 2e2b6ae..fba07fd 100644 --- a/packages/core/src/shell/scripts/setup-ca.js +++ b/packages/core/src/shell/scripts/setup-ca.js @@ -5,20 +5,17 @@ const execute = Shell.execute const executor = { async windows (exec, { certPath }) { const cmds = [`start "" "${certPath}"`] - // eslint-disable-next-line no-unused-vars - const ret = await exec(cmds, { type: 'cmd' }) + await exec(cmds, { type: 'cmd' }) return true }, async linux (exec, { certPath }) { const cmds = [`sudo cp ${certPath} /usr/local/share/ca-certificates`, 'sudo update-ca-certificates '] - // eslint-disable-next-line no-unused-vars - const ret = await exec(cmds) + await exec(cmds) return true }, async mac (exec, { certPath }) { const cmds = [`open "${certPath}"`] - // eslint-disable-next-line no-unused-vars - const ret = await exec(cmds, { type: 'cmd' }) + await exec(cmds, { type: 'cmd' }) return true }, } diff --git a/packages/core/src/utils/util.log.js b/packages/core/src/utils/util.log.js index eaa9250..306d04c 100644 --- a/packages/core/src/utils/util.log.js +++ b/packages/core/src/utils/util.log.js @@ -1,6 +1,6 @@ +const path = require('path') const log4js = require('log4js') const config = require('../config/index') -const path = require('path') const level = process.env.NODE_ENV === 'development' ? 'debug' : 'info' diff --git a/packages/core/test/httpsVerifyTest.js b/packages/core/test/httpsVerifyTest.js index e46cb01..30c03b9 100644 --- a/packages/core/test/httpsVerifyTest.js +++ b/packages/core/test/httpsVerifyTest.js @@ -34,7 +34,6 @@ describe('ssl.verify', () => { // eslint-disable-next-line no-undef it('regex.test.js', async () => { // https.request('https://test1.gagedigital.com/ssltest.php') - await request() // expect(ret).be.ok diff --git a/packages/core/test/requestTest.js b/packages/core/test/requestTest.js index 7aa6564..b896cc3 100644 --- a/packages/core/test/requestTest.js +++ b/packages/core/test/requestTest.js @@ -19,6 +19,6 @@ if (options.agent.options) { request(options, (error, response, body) => { console.info('error:', error, '\n---------------------------------------------------------------------------\n' - + 'response:', response, '\n---------------------------------------------------------------------------\n' - + 'body:', body) + + 'response:', response, '\n---------------------------------------------------------------------------\n' + + 'body:', body) })