UNPKG

youzanyun-devtool-worker

Version:

25 lines (24 loc) 800 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const spring4js_nodejs_1 = require("spring4js-nodejs"); let ActionToolService = class ActionToolService { async processRequest(ctx, next) { if (ctx.path !== '/_yzydev_/_proxy_tool') { return false; } let { action, url } = ctx.query; if (action == 'open-browser') { this.toolBarService.openBrowser(0, url); } ctx.body = 'ok'; return true; } }; tslib_1.__decorate([ (0, spring4js_nodejs_1.Resource)() ], ActionToolService.prototype, "toolBarService", void 0); ActionToolService = tslib_1.__decorate([ (0, spring4js_nodejs_1.Service)() ], ActionToolService); exports.default = ActionToolService;