swdc-tracker
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -41,2 +41,3 @@ "use strict"; | ||
var hash_1 = require("../utils/hash"); | ||
var common_helper_1 = require("../utils/common_helper"); | ||
var File = /** @class */ (function () { | ||
@@ -59,4 +60,4 @@ function File(data) { | ||
case 0: return [4 /*yield*/, hash_1.hashValues([ | ||
{ value: this.file_name.replace(/\\/g, "/"), dataType: "file_name" }, | ||
{ value: this.file_path, dataType: "file_path" } | ||
{ value: common_helper_1.convertWinPathToUnix(this.file_name), dataType: "file_name" }, | ||
{ value: this.file_path, dataType: "file_path" }, | ||
], jwt)]; | ||
@@ -72,4 +73,4 @@ case 1: | ||
line_count: this.line_count, | ||
character_count: this.character_count | ||
} | ||
character_count: this.character_count, | ||
}, | ||
}]; | ||
@@ -76,0 +77,0 @@ } |
{ | ||
"name": "swdc-tracker", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "swdc event tracker", | ||
@@ -5,0 +5,0 @@ "main": "dist", |
import { hashValues } from "../utils/hash"; | ||
import { convertWinPathToUnix } from "../utils/common_helper"; | ||
// The file entity | ||
export interface FileInterface { | ||
file_name: string, | ||
file_path: string, | ||
syntax: string, | ||
line_count: number, | ||
character_count: number | ||
file_name: string; | ||
file_path: string; | ||
syntax: string; | ||
line_count: number; | ||
character_count: number; | ||
} | ||
@@ -32,6 +33,9 @@ | ||
async buildPayload(jwt: string) { | ||
const hashedValues = await hashValues([ | ||
{ value: this.file_name.replace(/\\/g, "/"), dataType: "file_name" }, | ||
{ value: this.file_path, dataType: "file_path" } | ||
], jwt) | ||
const hashedValues = await hashValues( | ||
[ | ||
{ value: convertWinPathToUnix(this.file_name), dataType: "file_name" }, | ||
{ value: this.file_path, dataType: "file_path" }, | ||
], | ||
jwt | ||
); | ||
@@ -45,7 +49,6 @@ return { | ||
line_count: this.line_count, | ||
character_count: this.character_count | ||
} | ||
} | ||
character_count: this.character_count, | ||
}, | ||
}; | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
129170
65
2753