Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0455c34cfa | |||
| a69fee7985 |
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@apiglobal/test-sdk",
|
"name": "@apiglobal/test-sdk",
|
||||||
"version": "1.0.15",
|
"version": "1.0.16",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@apiglobal/test-sdk",
|
"name": "@apiglobal/test-sdk",
|
||||||
"version": "1.0.15",
|
"version": "1.0.16",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "an sdk for testing ag handlers",
|
"description": "an sdk for testing ag handlers",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
|||||||
@@ -6,15 +6,18 @@ export class AgTestServer {
|
|||||||
|
|
||||||
constructor(handlerArg?: plugins.agSdk.AAgHandler<any>) {
|
constructor(handlerArg?: plugins.agSdk.AAgHandler<any>) {
|
||||||
if (handlerArg) {
|
if (handlerArg) {
|
||||||
this.handlers.push(handlerArg);
|
this.addAgHandler(handlerArg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async addAgHandler(handlerArg: plugins.agSdk.AAgHandler<any>) {
|
public async addAgHandler(handlerArg: plugins.agSdk.AAgHandler<any>) {
|
||||||
this.handlers.push(handlerArg);
|
this.handlers.push(handlerArg);
|
||||||
|
console.log(`added handler with slug ${handlerArg.slug}`);
|
||||||
|
if (this.server && this.server.serverStatus === 'running') {
|
||||||
await this.stop();
|
await this.stop();
|
||||||
await this.start();
|
await this.start();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async start() {
|
public async start() {
|
||||||
this.server = new plugins.smartexpress.Server({
|
this.server = new plugins.smartexpress.Server({
|
||||||
|
|||||||
Reference in New Issue
Block a user