@knapsack-pro/core
Advanced tools
Comparing version 6.0.0 to 6.1.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.KnapsackProEnvConfig = void 0; | ||
var node_crypto_1 = require("node:crypto"); | ||
var childProcess = require("child_process"); | ||
@@ -192,10 +191,12 @@ var _1 = require("."); | ||
}); | ||
Object.defineProperty(KnapsackProEnvConfig, "userSeatHash", { | ||
Object.defineProperty(KnapsackProEnvConfig, "maskedUserSeat", { | ||
get: function () { | ||
var regexp = /(?<=\w{2})[a-zA-Z]/g; | ||
var maskingChar = '*'; | ||
if (process.env.KNAPSACK_PRO_USER_SEAT) { | ||
return this.sha256(process.env.KNAPSACK_PRO_USER_SEAT); | ||
return process.env.KNAPSACK_PRO_USER_SEAT.replace(regexp, maskingChar); | ||
} | ||
var userSeat = _1.CIEnvConfig.userSeat; | ||
if (userSeat) { | ||
return this.sha256(userSeat); | ||
userSeat.replace(regexp, maskingChar); | ||
} | ||
@@ -207,5 +208,2 @@ return undefined; | ||
}); | ||
KnapsackProEnvConfig.sha256 = function (content) { | ||
return (0, node_crypto_1.createHash)('sha256').update(content).digest('hex'); | ||
}; | ||
KnapsackProEnvConfig.$knapsackProLogger = knapsackProLogger; | ||
@@ -212,0 +210,0 @@ return KnapsackProEnvConfig; |
@@ -29,3 +29,3 @@ "use strict"; | ||
var shouldSendTestFilesInPayload = initializeQueue && !attemptConnectToQueue; | ||
var data = __assign({ test_suite_token: config_1.KnapsackProEnvConfig.testSuiteToken, can_initialize_queue: initializeQueue, attempt_connect_to_queue: attemptConnectToQueue, fixed_queue_split: config_1.KnapsackProEnvConfig.fixedQueueSplit, commit_hash: config_1.KnapsackProEnvConfig.commitHash, branch: config_1.KnapsackProEnvConfig.branch, node_total: config_1.KnapsackProEnvConfig.ciNodeTotal, node_index: config_1.KnapsackProEnvConfig.ciNodeIndex, node_build_id: config_1.KnapsackProEnvConfig.ciNodeBuildId, user_seat: config_1.KnapsackProEnvConfig.userSeatHash }, (shouldSendTestFilesInPayload && { test_files: allTestFiles })); | ||
var data = __assign({ test_suite_token: config_1.KnapsackProEnvConfig.testSuiteToken, can_initialize_queue: initializeQueue, attempt_connect_to_queue: attemptConnectToQueue, fixed_queue_split: config_1.KnapsackProEnvConfig.fixedQueueSplit, commit_hash: config_1.KnapsackProEnvConfig.commitHash, branch: config_1.KnapsackProEnvConfig.branch, node_total: config_1.KnapsackProEnvConfig.ciNodeTotal, node_index: config_1.KnapsackProEnvConfig.ciNodeIndex, node_build_id: config_1.KnapsackProEnvConfig.ciNodeBuildId, user_seat: config_1.KnapsackProEnvConfig.maskedUserSeat }, (shouldSendTestFilesInPayload && { test_files: allTestFiles })); | ||
return this.api.post(url, data); | ||
@@ -32,0 +32,0 @@ }; |
{ | ||
"name": "@knapsack-pro/core", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "Knapsack Pro Core library splits tests across CI nodes and makes sure that tests will run in optimal time on each CI node. This library gives core features like communication with KnapsackPro.com API. This library is a dependency for other projects specific for particular test runner.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
82644
1991
2