diff --git a/menu.js b/menu.js index 248e986..a2e304f 100644 --- a/menu.js +++ b/menu.js @@ -95,5 +95,6 @@ module.exports = async (kernel, info) => }); }); } + return menu; }; diff --git a/run.js b/run.js index ad7d2aa..1a35fc9 100644 --- a/run.js +++ b/run.js @@ -1,77 +1,62 @@ -const path = require('path'); - -module.exports = () => -{ - const config = - { - daemon: true, - cmd: - { - 'Default': 'python facefusion.py run', - 'Default+Jobs': 'python facefusion.py run --ui-layouts default jobs', - 'Benchmark': 'python facefusion.py run --ui-layouts benchmark', - 'Webcam': 'python facefusion.py run --ui-layouts webcam' - }, - run: - [ - { - method: 'local.set', - params: - { - mode: '{{ input.mode }}' - } - }, - { - method: 'shell.run', - params: - { - message: 'git reset --hard --quiet', - path: 'facefusion' - } - }, - { - method: 'shell.run', - params: - { - message: '{{ self.cmd[local.mode] }}', - path: 'facefusion', - conda: - { - path: path.resolve(__dirname, '.env') - }, - on: - [ - { - event: '/(http:\/\/[0-9.:]+)/', - done: true - } - ] - } - }, - { - method: 'local.set', - params: - { - url: '{{ input.stdout.match(/(http:\\S+)/gi)[0] }}' - } - }, - { - method: 'web.open', - params: - { - uri: '{{ local.url }}' - } - }, - { - method: 'proxy.start', - params: - { - uri: '{{ local.url }}', - name: 'Share Local' - } - } - ] - }; - - return config; -}; +const path = require('path'); + +module.exports = () => +{ + const config = + { + daemon: true, + cmd: + { + 'Default': 'python facefusion.py run', + 'Default+Jobs': 'python facefusion.py run --ui-layouts default jobs', + 'Benchmark': 'python facefusion.py run --ui-layouts benchmark', + 'Webcam': 'python facefusion.py run --ui-layouts webcam' + }, + run: + [ + { + method: 'local.set', + params: + { + mode: '{{ input.mode }}' + } + }, + { + method: 'shell.run', + params: + { + message: 'git reset --hard --quiet', + path: 'facefusion' + } + }, + { + method: 'shell.run', + params: + { + message: '{{ self.cmd[local.mode] }}', + path: 'facefusion', + conda: + { + path: path.resolve(__dirname, '.env') + }, + on: + [ + { + event: '/(http:\/\/[0-9.:]+)/', + done: true + } + ] + } + }, + { + method: 'local.set', + params: + { + url: '{{ input.event[0] }}' + } + } + ] + }; + + return config; +};