@testring/plugin-api
Advanced tools
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| const abstract_1 = require("./abstract"); | ||
| class DevtoolAPI extends abstract_1.AbstractAPI { | ||
| beforeStart(handler) { | ||
| this.registryWritePlugin("beforeStart" /* beforeStart */, handler); | ||
| } | ||
| afterStart(handler) { | ||
| this.registryWritePlugin("afterStart" /* afterStart */, handler); | ||
| } | ||
| beforeStop(handler) { | ||
| this.registryWritePlugin("beforeStop" /* beforeStop */, handler); | ||
| } | ||
| afterStop(handler) { | ||
| this.registryWritePlugin("afterStop" /* afterStop */, handler); | ||
| } | ||
| } | ||
| exports.DevtoolAPI = DevtoolAPI; |
| import { AbstractAPI } from './abstract'; | ||
| import { DevtoolPluginHooks, IDevtoolServerConfig } from '@testring/types'; | ||
| export class DevtoolAPI extends AbstractAPI { | ||
| beforeStart(handler: (IRecorderServerConfig) => IDevtoolServerConfig) { | ||
| this.registryWritePlugin(DevtoolPluginHooks.beforeStart, handler); | ||
| } | ||
| afterStart(handler: () => void) { | ||
| this.registryWritePlugin(DevtoolPluginHooks.afterStart, handler); | ||
| } | ||
| beforeStop(handler: () => void) { | ||
| this.registryWritePlugin(DevtoolPluginHooks.beforeStop, handler); | ||
| } | ||
| afterStop(handler: () => void) { | ||
| this.registryWritePlugin(DevtoolPluginHooks.afterStop, handler); | ||
| } | ||
| } | ||
@@ -8,2 +8,3 @@ "use strict"; | ||
| const test_run_controller_1 = require("./modules/test-run-controller"); | ||
| const devtool_1 = require("./modules/devtool"); | ||
| class PluginAPI { | ||
@@ -35,3 +36,6 @@ constructor(pluginName, modules) { | ||
| } | ||
| getDevtool() { | ||
| return new devtool_1.DevtoolAPI(this.pluginName, this.modules.devtool); | ||
| } | ||
| } | ||
| exports.PluginAPI = PluginAPI; |
+4
-4
| { | ||
| "name": "@testring/plugin-api", | ||
| "version": "0.4.56", | ||
| "version": "0.5.0", | ||
| "main": "./dist/index.js", | ||
@@ -13,6 +13,6 @@ "types": "./src/index.ts", | ||
| "dependencies": { | ||
| "@testring/logger": "0.4.56", | ||
| "@testring/types": "0.4.56", | ||
| "@testring/utils": "0.4.56" | ||
| "@testring/logger": "0.5.0", | ||
| "@testring/types": "0.5.0", | ||
| "@testring/utils": "0.5.0" | ||
| } | ||
| } |
@@ -7,2 +7,3 @@ import { IPluginModules } from '@testring/types'; | ||
| import { TestRunControllerAPI } from './modules/test-run-controller'; | ||
| import { DevtoolAPI } from './modules/devtool'; | ||
@@ -40,2 +41,6 @@ export class PluginAPI { | ||
| } | ||
| getDevtool() { | ||
| return new DevtoolAPI(this.pluginName, this.modules.devtool); | ||
| } | ||
| } |
17221
10.25%22
10%422
11.05%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated