@knapsack-pro/core
Advanced tools
Comparing version 6.3.0 to 6.4.0
@@ -88,4 +88,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(AppVeyor, "ciProvider", { | ||
get: function () { | ||
return 'AppVeyor'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return AppVeyor; | ||
}(_1.CIProviderBase)); | ||
exports.AppVeyor = AppVeyor; |
@@ -88,4 +88,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(Buildkite, "ciProvider", { | ||
get: function () { | ||
return 'Buildkite'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return Buildkite; | ||
}(_1.CIProviderBase)); | ||
exports.Buildkite = Buildkite; |
@@ -63,4 +63,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(CIProviderBase, "ciProvider", { | ||
get: function () { | ||
throw new Error('ciProvider getter is not implemented!'); | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return CIProviderBase; | ||
}()); | ||
exports.CIProviderBase = CIProviderBase; |
@@ -88,4 +88,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(CircleCI, "ciProvider", { | ||
get: function () { | ||
return 'CircleCI'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return CircleCI; | ||
}(_1.CIProviderBase)); | ||
exports.CircleCI = CircleCI; |
@@ -88,4 +88,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(CirrusCI, "ciProvider", { | ||
get: function () { | ||
return 'Cirrus CI'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return CirrusCI; | ||
}(_1.CIProviderBase)); | ||
exports.CirrusCI = CirrusCI; |
@@ -88,4 +88,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(CodefreshCI, "ciProvider", { | ||
get: function () { | ||
return 'Codefresh'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return CodefreshCI; | ||
}(_1.CIProviderBase)); | ||
exports.CodefreshCI = CodefreshCI; |
@@ -88,4 +88,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(Codeship, "ciProvider", { | ||
get: function () { | ||
return 'Codeship'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return Codeship; | ||
}(_1.CIProviderBase)); | ||
exports.Codeship = Codeship; |
@@ -93,4 +93,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(GithubActions, "ciProvider", { | ||
get: function () { | ||
return 'GitHub Actions'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return GithubActions; | ||
}(_1.CIProviderBase)); | ||
exports.GithubActions = GithubActions; |
@@ -95,4 +95,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(GitlabCI, "ciProvider", { | ||
get: function () { | ||
return 'Gitlab CI'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return GitlabCI; | ||
}(_1.CIProviderBase)); | ||
exports.GitlabCI = GitlabCI; |
@@ -88,4 +88,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(HerokuCI, "ciProvider", { | ||
get: function () { | ||
return 'Heroku CI'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return HerokuCI; | ||
}(_1.CIProviderBase)); | ||
exports.HerokuCI = HerokuCI; |
@@ -93,4 +93,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(SemaphoreCI2, "ciProvider", { | ||
get: function () { | ||
return 'Semaphore CI 2.0'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return SemaphoreCI2; | ||
}(_1.CIProviderBase)); | ||
exports.SemaphoreCI2 = SemaphoreCI2; |
@@ -91,4 +91,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(SemaphoreCI, "ciProvider", { | ||
get: function () { | ||
return 'Semaphore CI 1.0'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return SemaphoreCI; | ||
}(_1.CIProviderBase)); | ||
exports.SemaphoreCI = SemaphoreCI; |
@@ -88,4 +88,11 @@ "use strict"; | ||
}); | ||
Object.defineProperty(TravisCI, "ciProvider", { | ||
get: function () { | ||
return 'Travis CI'; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return TravisCI; | ||
}(_1.CIProviderBase)); | ||
exports.TravisCI = TravisCI; |
@@ -20,2 +20,3 @@ "use strict"; | ||
var _1 = require("."); | ||
var config_1 = require("../config"); | ||
var UnsupportedCI = (function (_super) { | ||
@@ -82,4 +83,41 @@ __extends(UnsupportedCI, _super); | ||
}); | ||
Object.defineProperty(UnsupportedCI, "ciProvider", { | ||
get: function () { | ||
if ('CODEBUILD_BUILD_ARN' in process.env) { | ||
return 'AWS CodeBuild'; | ||
} | ||
if ('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI' in process.env) { | ||
return 'Azure Pipelines'; | ||
} | ||
if ('bamboo_planKey' in process.env) { | ||
return 'Bamboo'; | ||
} | ||
if ('BITBUCKET_COMMIT' in process.env) { | ||
return 'Bitbucket Pipelines'; | ||
} | ||
if ('BUDDY' in process.env) { | ||
return 'Buddy.works'; | ||
} | ||
if ('DRONE' in process.env) { | ||
return 'Drone.io'; | ||
} | ||
if ('BUILDER_OUTPUT' in process.env) { | ||
return 'Google Cloud Build'; | ||
} | ||
if ('JENKINS_URL' in process.env) { | ||
return 'Jenkins'; | ||
} | ||
if ('TEAMCITY_VERSION' in process.env) { | ||
return 'TeamCity'; | ||
} | ||
if ((0, config_1.isCI)()) { | ||
return 'Other'; | ||
} | ||
return null; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return UnsupportedCI; | ||
}(_1.CIProviderBase)); | ||
exports.UnsupportedCI = UnsupportedCI; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.commitAuthors = exports.isShallowRepository = exports.buildAuthor = exports.KnapsackProEnvConfig = void 0; | ||
exports.ciProvider = exports.commitAuthors = exports.isShallowRepository = exports.buildAuthor = exports.KnapsackProEnvConfig = void 0; | ||
var childProcess = require("child_process"); | ||
@@ -263,3 +263,3 @@ var _1 = require("."); | ||
var gitCommitAuthors = function () { | ||
if (_1.isCI && (0, exports.isShallowRepository)()) { | ||
if ((0, _1.isCI)() && (0, exports.isShallowRepository)()) { | ||
var gitFetchShallowSinceCommand = 'git fetch --shallow-since "one month ago" --quiet 2>/dev/null'; | ||
@@ -282,1 +282,3 @@ try { | ||
exports.commitAuthors = commitAuthors; | ||
var ciProvider = function () { return (0, _1.detectCI)().ciProvider; }; | ||
exports.ciProvider = ciProvider; |
@@ -14,3 +14,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.KnapsackProAPI = void 0; | ||
exports.KnapsackProAPI = exports.getHeaders = void 0; | ||
var axios_1 = require("axios"); | ||
@@ -20,2 +20,8 @@ var config_1 = require("./config"); | ||
var axiosRetry = require('axios-retry'); | ||
var getHeaders = function (_a) { | ||
var clientName = _a.clientName, clientVersion = _a.clientVersion; | ||
var ci = (0, config_1.ciProvider)(); | ||
return __assign({ 'KNAPSACK-PRO-CLIENT-NAME': clientName, 'KNAPSACK-PRO-CLIENT-VERSION': clientVersion }, (ci !== null ? { 'KNAPSACK-PRO-CI-PROVIDER': ci } : {})); | ||
}; | ||
exports.getHeaders = getHeaders; | ||
var KnapsackProAPI = (function () { | ||
@@ -65,6 +71,3 @@ function KnapsackProAPI(clientName, clientVersion) { | ||
timeout: 15000, | ||
headers: { | ||
'KNAPSACK-PRO-CLIENT-NAME': clientName, | ||
'KNAPSACK-PRO-CLIENT-VERSION': clientVersion, | ||
}, | ||
headers: (0, exports.getHeaders)({ clientName: clientName, clientVersion: clientVersion }), | ||
}); | ||
@@ -71,0 +74,0 @@ axiosRetry(apiClient, { |
{ | ||
"name": "@knapsack-pro/core", | ||
"version": "6.3.0", | ||
"version": "6.4.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
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
88340
2223
116