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