fix(core): update
This commit is contained in:
parent
c387a633bb
commit
4805687305
@ -19,23 +19,35 @@ mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci git mirror
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
audit:
|
||||
auditProductionDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --production --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high --only=prod --production
|
||||
tags:
|
||||
- docker
|
||||
|
||||
auditDevDependencies:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high
|
||||
- npmci command npm audit --audit-level=high --only=dev
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
allow_failure: true
|
||||
|
||||
# ====================
|
||||
# test stage
|
||||
@ -50,9 +62,7 @@ testStable:
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
testBuild:
|
||||
stage: test
|
||||
@ -63,9 +73,7 @@ testBuild:
|
||||
- npmci command npm run build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
release:
|
||||
stage: release
|
||||
@ -85,6 +93,8 @@ release:
|
||||
codequality:
|
||||
stage: metadata
|
||||
allow_failure: true
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci npm prepare
|
||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -15,7 +15,7 @@
|
||||
"properties": {
|
||||
"projectType": {
|
||||
"type": "string",
|
||||
"enum": ["website", "element", "service", "npm"]
|
||||
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1323
package-lock.json
generated
1323
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
13
package.json
13
package.json
@ -13,18 +13,18 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
"@gitzone/tstest": "^1.0.44",
|
||||
"@gitzone/tstest": "^1.0.52",
|
||||
"@pushrocks/tapbundle": "^3.2.9",
|
||||
"@types/node": "^14.11.2",
|
||||
"@types/node": "^14.14.0",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apiglobal/sdk": "^1.0.13",
|
||||
"@apiglobal/typedrequest": "^1.0.43",
|
||||
"@apiglobal/sdk": "^1.0.18",
|
||||
"@apiglobal/typedrequest": "^1.0.54",
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
||||
"@pushrocks/qenv": "^4.0.10",
|
||||
"@pushrocks/smartexpress": "^3.0.76",
|
||||
"@pushrocks/smartexpress": "^3.0.81",
|
||||
"@pushrocks/smartobject": "^1.0.4"
|
||||
},
|
||||
"files": [
|
||||
@ -38,5 +38,8 @@
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
}
|
||||
|
15
ts/index.ts
15
ts/index.ts
@ -2,13 +2,13 @@ import * as plugins from './test-sdk.plugins';
|
||||
import { AgTestServer } from './test-sdk.classes.testserver';
|
||||
import { AAgHandler } from '@apiglobal/sdk';
|
||||
|
||||
export {
|
||||
AgTestServer
|
||||
};
|
||||
export { AgTestServer };
|
||||
|
||||
let testServer: AgTestServer;
|
||||
let handler: AAgHandler<any>;
|
||||
export const createTestServer = async (handlerArg: { new(envManagerArg: plugins.agSdk.AgEnvironment): plugins.agSdk.AAgHandler<any> }) => {
|
||||
export const createTestServer = async (handlerArg: {
|
||||
new (envManagerArg: 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) {
|
||||
@ -44,7 +44,10 @@ export const testFire = <
|
||||
const responsePromise = typedRequest.fire(requestArg);
|
||||
const expect = async (expectedResponseArg: T['response']) => {
|
||||
const actualResponse = await responsePromise;
|
||||
const comparisonResult = plugins.smartobject.compareObjects(expectedResponseArg, actualResponse);
|
||||
const comparisonResult = plugins.smartobject.compareObjects(
|
||||
expectedResponseArg,
|
||||
actualResponse
|
||||
);
|
||||
let throwErrorBool = false;
|
||||
if (comparisonResult.divergingProperties.length > 0) {
|
||||
console.log(`The following properties diverged:`);
|
||||
@ -73,7 +76,7 @@ export const testFire = <
|
||||
return actualResponse;
|
||||
};
|
||||
return {
|
||||
expect
|
||||
expect,
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user