Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Remove collectorVersion from payload (patch)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukiffer committed Jul 6, 2021
1 parent a641089 commit 8224b0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@
"scripts": {
"clean": "rm -rf ./dist/",
"build": "npm run clean && tsc --build --extendedDiagnostics",
"build:package": "jq 'del(.scripts) | del(.devDependencies)' < package.json > dist/package.json",
"build:cleanup": "find ./dist/ -type f -name '*.spec.*' -delete",
"build:flatten": "cp -R ./dist/src/ ./dist/ && rm -rf ./dist/src/",
"build:exec": "chmod +x ./dist/index.js",
"build:chmod": "chmod +x ./dist/index.js",
"lint": "eslint ./src/ --ext .ts",
"test:jasmine": "jasmine-ts --config=jasmine.json",
"test:coverage": "nyc npm run test:jasmine",
"test": "npm run test:coverage -s",
"postbuild": "npm run build:cleanup && npm run build:package && npm run build:flatten && npm run build:exec",
"postbuild": "npm run build:cleanup && npm run build:chmod",
"prepublishOnly": "npm run build"
},
"license": "Apache-2.0",
Expand Down
6 changes: 0 additions & 6 deletions src/lib/analysis-collector-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { v4 as uuid } from 'uuid';
import cp from 'child_process';
import chalk from 'chalk';
import { CheckResult } from './check-result';
import manifest from '../../package.json';

export abstract class AnalysisCollectorBase {

Expand All @@ -16,14 +15,10 @@ export abstract class AnalysisCollectorBase {

public timestamp: Date;

public collectorVersion: string;

public constructor(public toolId: string, public logger: Logger) {
this.traceId = uuid();
this.timestamp = new Date();
this.detectApiToken();

this.collectorVersion = manifest.version;
}

public async exec(options: any): Promise<void> {
Expand Down Expand Up @@ -114,7 +109,6 @@ export abstract class AnalysisCollectorBase {
toolVersion: await this.getToolVersion(options),
repositoryUrl: await this.getRepositoryUrl(options),
commitHash: await this.getRepositoryHead(options),
collectorVersion: this.collectorVersion,
results: results.map((result) => {
result.checkName = undefined;
return result;
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "@quantum-sec/typescript-config",
"compilerOptions": {
"esModuleInterop": true,
"resolveJsonModule": true
"rootDir": "src",
"esModuleInterop": true
}
}

0 comments on commit 8224b0b

Please sign in to comment.