fix(core): update
This commit is contained in:
parent
5bce57203e
commit
d1936a94bc
@ -12,6 +12,9 @@ stages:
|
||||
- release
|
||||
- metadata
|
||||
|
||||
before_script:
|
||||
- npm install -g @shipzone/npmci
|
||||
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
@ -19,23 +22,36 @@ 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
|
||||
allow_failure: true
|
||||
|
||||
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 +66,7 @@ testStable:
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
testBuild:
|
||||
stage: test
|
||||
@ -63,9 +77,7 @@ testBuild:
|
||||
- npmci command npm run build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
release:
|
||||
stage: release
|
||||
@ -85,6 +97,8 @@ release:
|
||||
codequality:
|
||||
stage: metadata
|
||||
allow_failure: true
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci npm prepare
|
||||
|
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@ -2,28 +2,10 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "current file",
|
||||
"type": "node",
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"${relativeFile}"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
},
|
||||
{
|
||||
"name": "test.ts",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"test/test.ts"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"gitrepo": "smartlog-receiver",
|
||||
"shortDescription": "a receiver for smartlog-destination-receiver",
|
||||
"description": "a receiver for smartlog-destination-receiver",
|
||||
"npmPackagename": "@pushrocks/smartlog-receiver",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
@ -36,5 +36,8 @@
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
]
|
||||
}
|
||||
}
|
12
test/test.ts
12
test/test.ts
@ -7,7 +7,7 @@ import * as smartlogReceiver from '../ts/index';
|
||||
let testReceiver: smartlogReceiver.SmartlogReceiver;
|
||||
let testSmartlog = new smartlog.Smartlog({
|
||||
logContext: null,
|
||||
minimumLogLevel: 'debug'
|
||||
minimumLogLevel: 'debug',
|
||||
});
|
||||
testSmartlog.enableConsole();
|
||||
|
||||
@ -17,7 +17,7 @@ tap.test('should create a valid SmartlogReceiver', async () => {
|
||||
smartlogInstance: testSmartlog,
|
||||
validatorFunction: async () => {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
});
|
||||
expect(testReceiver).toBeInstanceOf(smartlogReceiver.SmartlogReceiver);
|
||||
});
|
||||
@ -33,16 +33,16 @@ tap.test('should receive a message', async () => {
|
||||
containerName: null,
|
||||
environment: 'staging',
|
||||
runtime: 'node',
|
||||
zone: 'gitzone'
|
||||
zone: 'gitzone',
|
||||
},
|
||||
level: 'info',
|
||||
type: 'log',
|
||||
correlation: {
|
||||
id: '123',
|
||||
type: 'none'
|
||||
type: 'none',
|
||||
},
|
||||
message: 'hi there'
|
||||
}
|
||||
message: 'hi there',
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -3,7 +3,7 @@ import * as plugins from './sl.receiver.plugins';
|
||||
import {
|
||||
ILogPackage,
|
||||
ILogPackageAuthenticated,
|
||||
ILogDestination
|
||||
ILogDestination,
|
||||
} from '@pushrocks/smartlog-interfaces';
|
||||
|
||||
export type TValidatorFunction = (logPackage: ILogPackage) => Promise<boolean>;
|
||||
@ -26,7 +26,7 @@ export class SmartlogReceiver {
|
||||
this.passphrase = smartlogReceiverOptions.passphrase;
|
||||
this.validatorFunction =
|
||||
smartlogReceiverOptions.validatorFunction ||
|
||||
(async logpackageArg => {
|
||||
(async (logpackageArg) => {
|
||||
return true;
|
||||
});
|
||||
this.smartlogInstance = smartlogReceiverOptions.smartlogInstance;
|
||||
|
Loading…
Reference in New Issue
Block a user