10 Commits

Author SHA1 Message Date
e146b7741d 1.0.25 2020-09-24 00:59:02 +00:00
02866cbe8d fix(core): update 2020-09-24 00:59:01 +00:00
7a320d27a3 1.0.24 2020-09-24 00:45:24 +00:00
7910f9a856 fix(core): update 2020-09-24 00:45:23 +00:00
05194609fe 1.0.23 2020-09-24 00:32:54 +00:00
eb0ec04199 fix(core): update 2020-09-24 00:32:54 +00:00
ffd5eb2e52 1.0.22 2020-09-23 23:54:46 +00:00
c432079a70 fix(core): update 2020-09-23 23:54:46 +00:00
e2cab0bb59 1.0.21 2020-09-23 23:30:55 +00:00
aaaa8b3ee4 fix(core): update 2020-09-23 23:30:54 +00:00
4 changed files with 1782 additions and 1475 deletions

5689
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "@apiglobal/test-sdk", "name": "@apiglobal/test-sdk",
"version": "1.0.20", "version": "1.0.25",
"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",
@@ -12,18 +12,19 @@
"build": "(tsbuild --web)" "build": "(tsbuild --web)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.0.22", "@gitzone/tsbuild": "^2.1.25",
"@gitzone/tstest": "^1.0.43", "@gitzone/tstest": "^1.0.44",
"@pushrocks/tapbundle": "^3.2.9", "@pushrocks/tapbundle": "^3.2.9",
"@types/node": "^14.0.26", "@types/node": "^14.11.2",
"tslint": "^6.1.2", "tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },
"dependencies": { "dependencies": {
"@apiglobal/sdk": "^1.0.9", "@apiglobal/sdk": "^1.0.13",
"@apiglobal/typedrequest": "^1.0.40", "@apiglobal/typedrequest": "^1.0.43",
"@apiglobal/typedrequest-interfaces": "^1.0.15", "@apiglobal/typedrequest-interfaces": "^1.0.15",
"@pushrocks/smartexpress": "^3.0.73", "@pushrocks/qenv": "^4.0.10",
"@pushrocks/smartexpress": "^3.0.76",
"@pushrocks/smartobject": "^1.0.4" "@pushrocks/smartobject": "^1.0.4"
}, },
"files": [ "files": [

View File

@@ -1,13 +1,24 @@
import * as plugins from './test-sdk.plugins'; import * as plugins from './test-sdk.plugins';
import { AgTestServer } from './test-sdk.classes.testserver'; import { AgTestServer } from './test-sdk.classes.testserver';
import { AAgHandler } from '@apiglobal/sdk';
export { export {
AgTestServer AgTestServer
}; };
let testServer: AgTestServer; let testServer: AgTestServer;
export const createTestServer = async (handlerArg: plugins.agSdk.AAgHandler<any>) => { let handler: AAgHandler<any>;
testServer = new AgTestServer(handlerArg); export const createTestServer = async (handlerArg: { new(envHandler: plugins.agSdk.AgEnvironment): plugins.agSdk.AAgHandler<any> }) => {
class AgEnvironement extends plugins.agSdk.AgEnvironment {
public qenv = new plugins.qenv.Qenv('./', './.nogit');
public async getEnvVar(nameArg: string) {
return this.qenv.getEnvVarOnDemand(nameArg);
}
}
handler = new handlerArg(new AgEnvironement());
console.log(`now checking requirements for handler with slug ${handler.slug}...`);
await handler.checkRequirements();
testServer = new AgTestServer(handler);
await testServer.start(); await testServer.start();
return testServer; return testServer;
}; };
@@ -64,5 +75,6 @@ export const testFire = <
export const stopTestServer = async () => { export const stopTestServer = async () => {
if (testServer) { if (testServer) {
await testServer.stop(); await testServer.stop();
await handler.stop();
} }
}; };

View File

@@ -6,7 +6,8 @@ import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces';
export { agSdk, typedrequest, typedrequestInterfaces }; export { agSdk, typedrequest, typedrequestInterfaces };
// pushrocks scope // pushrocks scope
import * as qenv from '@pushrocks/qenv';
import * as smartexpress from '@pushrocks/smartexpress'; import * as smartexpress from '@pushrocks/smartexpress';
import * as smartobject from '@pushrocks/smartobject'; import * as smartobject from '@pushrocks/smartobject';
export { smartexpress, smartobject }; export { qenv, smartexpress, smartobject };