danger 10.6.3 → 10.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
- package/CHANGELOG.md +21 -0
- package/README.md +2 -2
- package/distribution/api/fetch.js +22 -8
- package/distribution/api/fetch.js.map +1 -1
- package/distribution/ci_source/ci_source_helpers.js +3 -1
- package/distribution/ci_source/ci_source_helpers.js.map +1 -1
- package/distribution/ci_source/get_ci_source.js +30 -9
- package/distribution/ci_source/get_ci_source.js.map +1 -1
- package/distribution/ci_source/providers/AppCenter.d.ts +6 -6
- package/distribution/ci_source/providers/AppCenter.js +28 -14
- package/distribution/ci_source/providers/AppCenter.js.map +1 -1
- package/distribution/ci_source/providers/Bamboo.d.ts +5 -5
- package/distribution/ci_source/providers/Bamboo.js +6 -5
- package/distribution/ci_source/providers/Bamboo.js.map +1 -1
- package/distribution/ci_source/providers/BitbucketPipelines.d.ts +6 -6
- package/distribution/ci_source/providers/BitbucketPipelines.js +7 -6
- package/distribution/ci_source/providers/BitbucketPipelines.js.map +1 -1
- package/distribution/ci_source/providers/Bitrise.d.ts +7 -7
- package/distribution/ci_source/providers/Bitrise.js +8 -7
- package/distribution/ci_source/providers/Bitrise.js.map +1 -1
- package/distribution/ci_source/providers/BuddyBuild.d.ts +5 -5
- package/distribution/ci_source/providers/BuddyBuild.js +6 -5
- package/distribution/ci_source/providers/BuddyBuild.js.map +1 -1
- package/distribution/ci_source/providers/BuddyWorks.d.ts +6 -6
- package/distribution/ci_source/providers/BuddyWorks.js +7 -6
- package/distribution/ci_source/providers/BuddyWorks.js.map +1 -1
- package/distribution/ci_source/providers/Buildkite.d.ts +6 -6
- package/distribution/ci_source/providers/Buildkite.js +7 -6
- package/distribution/ci_source/providers/Buildkite.js.map +1 -1
- package/distribution/ci_source/providers/Circle.d.ts +8 -8
- package/distribution/ci_source/providers/Circle.js +9 -8
- package/distribution/ci_source/providers/Circle.js.map +1 -1
- package/distribution/ci_source/providers/Cirrus.d.ts +6 -6
- package/distribution/ci_source/providers/Cirrus.js +7 -6
- package/distribution/ci_source/providers/Cirrus.js.map +1 -1
- package/distribution/ci_source/providers/CodeBuild.d.ts +6 -6
- package/distribution/ci_source/providers/CodeBuild.js +9 -7
- package/distribution/ci_source/providers/CodeBuild.js.map +1 -1
- package/distribution/ci_source/providers/Codefresh.d.ts +6 -6
- package/distribution/ci_source/providers/Codefresh.js +7 -6
- package/distribution/ci_source/providers/Codefresh.js.map +1 -1
- package/distribution/ci_source/providers/Codemagic.d.ts +6 -6
- package/distribution/ci_source/providers/Codemagic.js +7 -6
- package/distribution/ci_source/providers/Codemagic.js.map +1 -1
- package/distribution/ci_source/providers/Codeship.d.ts +6 -6
- package/distribution/ci_source/providers/Codeship.js +9 -7
- package/distribution/ci_source/providers/Codeship.js.map +1 -1
- package/distribution/ci_source/providers/Concourse.d.ts +6 -6
- package/distribution/ci_source/providers/Concourse.js +7 -6
- package/distribution/ci_source/providers/Concourse.js.map +1 -1
- package/distribution/ci_source/providers/DockerCloud.d.ts +6 -6
- package/distribution/ci_source/providers/DockerCloud.js +7 -6
- package/distribution/ci_source/providers/DockerCloud.js.map +1 -1
- package/distribution/ci_source/providers/Drone.d.ts +5 -5
- package/distribution/ci_source/providers/Drone.js +6 -5
- package/distribution/ci_source/providers/Drone.js.map +1 -1
- package/distribution/ci_source/providers/Fake.d.ts +5 -5
- package/distribution/ci_source/providers/Fake.js +7 -6
- package/distribution/ci_source/providers/Fake.js.map +1 -1
- package/distribution/ci_source/providers/GitHubActions.d.ts +6 -6
- package/distribution/ci_source/providers/GitHubActions.js +7 -6
- package/distribution/ci_source/providers/GitHubActions.js.map +1 -1
- package/distribution/ci_source/providers/GitLabCI.d.ts +6 -6
- package/distribution/ci_source/providers/GitLabCI.js +7 -6
- package/distribution/ci_source/providers/GitLabCI.js.map +1 -1
- package/distribution/ci_source/providers/Jenkins.d.ts +7 -7
- package/distribution/ci_source/providers/Jenkins.js +8 -7
- package/distribution/ci_source/providers/Jenkins.js.map +1 -1
- package/distribution/ci_source/providers/Netlify.d.ts +5 -5
- package/distribution/ci_source/providers/Netlify.js +6 -5
- package/distribution/ci_source/providers/Netlify.js.map +1 -1
- package/distribution/ci_source/providers/Nevercode.d.ts +6 -6
- package/distribution/ci_source/providers/Nevercode.js +7 -6
- package/distribution/ci_source/providers/Nevercode.js.map +1 -1
- package/distribution/ci_source/providers/Screwdriver.d.ts +6 -6
- package/distribution/ci_source/providers/Screwdriver.js +7 -6
- package/distribution/ci_source/providers/Screwdriver.js.map +1 -1
- package/distribution/ci_source/providers/Semaphore.d.ts +5 -5
- package/distribution/ci_source/providers/Semaphore.js +6 -5
- package/distribution/ci_source/providers/Semaphore.js.map +1 -1
- package/distribution/ci_source/providers/Surf.d.ts +5 -5
- package/distribution/ci_source/providers/Surf.js +6 -5
- package/distribution/ci_source/providers/Surf.js.map +1 -1
- package/distribution/ci_source/providers/TeamCity.d.ts +5 -5
- package/distribution/ci_source/providers/TeamCity.js +6 -5
- package/distribution/ci_source/providers/TeamCity.js.map +1 -1
- package/distribution/ci_source/providers/Travis.d.ts +6 -6
- package/distribution/ci_source/providers/Travis.js +7 -6
- package/distribution/ci_source/providers/Travis.js.map +1 -1
- package/distribution/ci_source/providers/VSTS.d.ts +5 -5
- package/distribution/ci_source/providers/VSTS.js +6 -5
- package/distribution/ci_source/providers/VSTS.js.map +1 -1
- package/distribution/ci_source/providers/XcodeCloud.d.ts +22 -0
- package/distribution/ci_source/providers/XcodeCloud.js +68 -0
- package/distribution/ci_source/providers/XcodeCloud.js.map +1 -0
- package/distribution/ci_source/providers/index.d.ts +3 -2
- package/distribution/ci_source/providers/index.js +4 -0
- package/distribution/ci_source/providers/index.js.map +1 -1
- package/distribution/ci_source/providers/local-repo.d.ts +5 -5
- package/distribution/ci_source/providers/local-repo.js +7 -6
- package/distribution/ci_source/providers/local-repo.js.map +1 -1
- package/distribution/commands/ci/resetStatus.js +4 -3
- package/distribution/commands/ci/resetStatus.js.map +1 -1
- package/distribution/commands/ci/runner.js +4 -3
- package/distribution/commands/ci/runner.js.map +1 -1
- package/distribution/commands/danger-init.js +29 -17
- package/distribution/commands/danger-init.js.map +1 -1
- package/distribution/commands/danger-pr.js +6 -4
- package/distribution/commands/danger-pr.js.map +1 -1
- package/distribution/commands/danger-process.js +17 -5
- package/distribution/commands/danger-process.js.map +1 -1
- package/distribution/commands/danger-runner.js +3 -3
- package/distribution/commands/danger-runner.js.map +1 -1
- package/distribution/commands/init/add-to-ci.js +6 -5
- package/distribution/commands/init/add-to-ci.js.map +1 -1
- package/distribution/commands/init/default-dangerfile.js +16 -3
- package/distribution/commands/init/default-dangerfile.js.map +1 -1
- package/distribution/commands/init/get-repo-slug.js +1 -0
- package/distribution/commands/init/get-repo-slug.js.map +1 -1
- package/distribution/commands/init/interfaces.js +1 -0
- package/distribution/commands/init/interfaces.js.map +1 -1
- package/distribution/commands/init/state-setup.js +23 -10
- package/distribution/commands/init/state-setup.js.map +1 -1
- package/distribution/commands/utils/chainsmoker.js +1 -1
- package/distribution/commands/utils/chainsmoker.js.map +1 -1
- package/distribution/commands/utils/fileUtils.js +1 -0
- package/distribution/commands/utils/fileUtils.js.map +1 -1
- package/distribution/commands/utils/getRuntimeCISource.js +3 -3
- package/distribution/commands/utils/getRuntimeCISource.js.map +1 -1
- package/distribution/commands/utils/reporting.js +12 -4
- package/distribution/commands/utils/reporting.js.map +1 -1
- package/distribution/commands/utils/runDangerSubprocess.js +7 -5
- package/distribution/commands/utils/runDangerSubprocess.js.map +1 -1
- package/distribution/commands/utils/validateDangerfileExists.js +14 -2
- package/distribution/commands/utils/validateDangerfileExists.js.map +1 -1
- package/distribution/danger.d.ts +9 -4
- package/distribution/danger.js.flow +11 -4
- package/distribution/debug.js +1 -0
- package/distribution/debug.js.map +1 -1
- package/distribution/dsl/BitBucketCloudDSL.d.ts +4 -4
- package/distribution/dsl/DangerDSL.js +1 -0
- package/distribution/dsl/DangerDSL.js.map +1 -1
- package/distribution/dsl/DangerResults.js +10 -2
- package/distribution/dsl/DangerResults.js.map +1 -1
- package/distribution/dsl/GitLabDSL.d.ts +5 -0
- package/distribution/dsl/Violation.js +1 -0
- package/distribution/dsl/Violation.js.map +1 -1
- package/distribution/platforms/BitBucketCloud.js +3 -1
- package/distribution/platforms/BitBucketCloud.js.map +1 -1
- package/distribution/platforms/BitBucketServer.js +4 -2
- package/distribution/platforms/BitBucketServer.js.map +1 -1
- package/distribution/platforms/FakePlatform.js +3 -1
- package/distribution/platforms/FakePlatform.js.map +1 -1
- package/distribution/platforms/GitHub.js +7 -6
- package/distribution/platforms/GitHub.js.map +1 -1
- package/distribution/platforms/GitLab.js +5 -4
- package/distribution/platforms/GitLab.js.map +1 -1
- package/distribution/platforms/LocalGit.js +3 -1
- package/distribution/platforms/LocalGit.js.map +1 -1
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudAPI.js +4 -2
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudAPI.js.map +1 -1
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudGit.js +3 -1
- package/distribution/platforms/bitbucket_cloud/BitBucketCloudGit.js.map +1 -1
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_api.test.js +23 -23
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_api.test.js.map +1 -1
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_git.test.js +17 -17
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_git.test.js.map +1 -1
- package/distribution/platforms/bitbucket_server/BitBucketServerAPI.js +3 -1
- package/distribution/platforms/bitbucket_server/BitBucketServerAPI.js.map +1 -1
- package/distribution/platforms/bitbucket_server/BitBucketServerGit.js +15 -7
- package/distribution/platforms/bitbucket_server/BitBucketServerGit.js.map +1 -1
- package/distribution/platforms/git/diffToGitJSONDSL.js +1 -0
- package/distribution/platforms/git/diffToGitJSONDSL.js.map +1 -1
- package/distribution/platforms/git/gitJSONToGitDSL.js +27 -14
- package/distribution/platforms/git/gitJSONToGitDSL.js.map +1 -1
- package/distribution/platforms/git/localGetCommits.d.ts +1 -2
- package/distribution/platforms/git/localGetCommits.js +35 -95
- package/distribution/platforms/git/localGetCommits.js.map +1 -1
- package/distribution/platforms/git/localGetDiff.js +1 -0
- package/distribution/platforms/git/localGetDiff.js.map +1 -1
- package/distribution/platforms/git/localGetFileAtSHA.js +1 -0
- package/distribution/platforms/git/localGetFileAtSHA.js.map +1 -1
- package/distribution/platforms/git/localLogGitCommits.d.ts +31 -0
- package/distribution/platforms/git/localLogGitCommits.js +64 -0
- package/distribution/platforms/git/localLogGitCommits.js.map +1 -0
- package/distribution/platforms/github/GitHubAPI.js +5 -3
- package/distribution/platforms/github/GitHubAPI.js.map +1 -1
- package/distribution/platforms/github/GitHubGit.js +3 -1
- package/distribution/platforms/github/GitHubGit.js.map +1 -1
- package/distribution/platforms/github/GitHubUtils.js +7 -6
- package/distribution/platforms/github/GitHubUtils.js.map +1 -1
- package/distribution/platforms/github/comms/checks/githubAppSupport.js +23 -10
- package/distribution/platforms/github/comms/checks/githubAppSupport.js.map +1 -1
- package/distribution/platforms/github/comms/checks/resultsToCheck.js +10 -10
- package/distribution/platforms/github/comms/checks/resultsToCheck.js.map +1 -1
- package/distribution/platforms/github/comms/checksCommenter.js +4 -3
- package/distribution/platforms/github/comms/checksCommenter.js.map +1 -1
- package/distribution/platforms/github/comms/issueCommenter.js +8 -7
- package/distribution/platforms/github/comms/issueCommenter.js.map +1 -1
- package/distribution/platforms/github/customGitHubRequire.js +12 -4
- package/distribution/platforms/github/customGitHubRequire.js.map +1 -1
- package/distribution/platforms/gitlab/GitLabAPI.d.ts +9 -3
- package/distribution/platforms/gitlab/GitLabAPI.js +70 -3
- package/distribution/platforms/gitlab/GitLabAPI.js.map +1 -1
- package/distribution/platforms/gitlab/GitLabGit.js +4 -3
- package/distribution/platforms/gitlab/GitLabGit.js.map +1 -1
- package/distribution/platforms/platform.js +18 -3
- package/distribution/platforms/platform.js.map +1 -1
- package/distribution/platforms/pullRequestParser.js +16 -3
- package/distribution/platforms/pullRequestParser.js.map +1 -1
- package/distribution/runner/DangerUtils.js +1 -0
- package/distribution/runner/DangerUtils.js.map +1 -1
- package/distribution/runner/Dangerfile.js +1 -0
- package/distribution/runner/Dangerfile.js.map +1 -1
- package/distribution/runner/Executor.d.ts +1 -1
- package/distribution/runner/Executor.js +13 -4
- package/distribution/runner/Executor.js.map +1 -1
- package/distribution/runner/dangerDSLJSON.js +1 -0
- package/distribution/runner/dangerDSLJSON.js.map +1 -1
- package/distribution/runner/dslGenerator.js +13 -11
- package/distribution/runner/dslGenerator.js.map +1 -1
- package/distribution/runner/jsonToContext.js +3 -1
- package/distribution/runner/jsonToContext.js.map +1 -1
- package/distribution/runner/jsonToDSL.js +26 -12
- package/distribution/runner/jsonToDSL.js.map +1 -1
- package/distribution/runner/runners/inline.js +24 -11
- package/distribution/runner/runners/inline.js.map +1 -1
- package/distribution/runner/runners/utils/resultsForCaughtError.js.map +1 -1
- package/distribution/runner/runners/utils/transpiler.js +23 -3
- package/distribution/runner/runners/utils/transpiler.js.map +1 -1
- package/distribution/runner/templates/bitbucketCloudTemplate.js +1 -0
- package/distribution/runner/templates/bitbucketCloudTemplate.js.map +1 -1
- package/distribution/runner/templates/bitbucketServerTemplate.js +1 -0
- package/distribution/runner/templates/bitbucketServerTemplate.js.map +1 -1
- package/distribution/runner/templates/githubIssueTemplate.js +1 -0
- package/distribution/runner/templates/githubIssueTemplate.js.map +1 -1
- package/distribution/runner/templates/markdownTableTemplate.js +1 -0
- package/distribution/runner/templates/markdownTableTemplate.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Codemagic = void 0;
|
|
3
4
|
var ci_source_helpers_1 = require("../ci_source_helpers");
|
|
4
5
|
/**
|
|
5
6
|
* Codemagic.io CI Integration
|
|
@@ -17,7 +18,7 @@ var Codemagic = /** @class */ (function () {
|
|
|
17
18
|
get: function () {
|
|
18
19
|
return "Codemagic";
|
|
19
20
|
},
|
|
20
|
-
enumerable:
|
|
21
|
+
enumerable: false,
|
|
21
22
|
configurable: true
|
|
22
23
|
});
|
|
23
24
|
Object.defineProperty(Codemagic.prototype, "isCI", {
|
|
@@ -25,7 +26,7 @@ var Codemagic = /** @class */ (function () {
|
|
|
25
26
|
// Codemagic developer relations confirmed this is fine to use for this purpose
|
|
26
27
|
return ci_source_helpers_1.ensureEnvKeysExist(this.env, ["FCI_BUILD_ID"]);
|
|
27
28
|
},
|
|
28
|
-
enumerable:
|
|
29
|
+
enumerable: false,
|
|
29
30
|
configurable: true
|
|
30
31
|
});
|
|
31
32
|
Object.defineProperty(Codemagic.prototype, "isPR", {
|
|
@@ -36,21 +37,21 @@ var Codemagic = /** @class */ (function () {
|
|
|
36
37
|
ci_source_helpers_1.ensureEnvKeysAreInt(this.env, mustBeInts) &&
|
|
37
38
|
this.env.FCI_PULL_REQUEST === "true");
|
|
38
39
|
},
|
|
39
|
-
enumerable:
|
|
40
|
+
enumerable: false,
|
|
40
41
|
configurable: true
|
|
41
42
|
});
|
|
42
43
|
Object.defineProperty(Codemagic.prototype, "pullRequestID", {
|
|
43
44
|
get: function () {
|
|
44
45
|
return this.env.FCI_PULL_REQUEST_NUMBER;
|
|
45
46
|
},
|
|
46
|
-
enumerable:
|
|
47
|
+
enumerable: false,
|
|
47
48
|
configurable: true
|
|
48
49
|
});
|
|
49
50
|
Object.defineProperty(Codemagic.prototype, "repoSlug", {
|
|
50
51
|
get: function () {
|
|
51
52
|
return this.env.FCI_REPO_SLUG;
|
|
52
53
|
},
|
|
53
|
-
enumerable:
|
|
54
|
+
enumerable: false,
|
|
54
55
|
configurable: true
|
|
55
56
|
});
|
|
56
57
|
Object.defineProperty(Codemagic.prototype, "ciRunURL", {
|
|
@@ -58,7 +59,7 @@ var Codemagic = /** @class */ (function () {
|
|
|
58
59
|
var _a = process.env, FCI_BUILD_ID = _a.FCI_BUILD_ID, FCI_PROJECT_ID = _a.FCI_PROJECT_ID;
|
|
59
60
|
return "https://codemagic.io/app/" + FCI_PROJECT_ID + "/build/" + FCI_BUILD_ID;
|
|
60
61
|
},
|
|
61
|
-
enumerable:
|
|
62
|
+
enumerable: false,
|
|
62
63
|
configurable: true
|
|
63
64
|
});
|
|
64
65
|
return Codemagic;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Codemagic.js","sourceRoot":"","sources":["../../../source/ci_source/providers/Codemagic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Codemagic.js","sourceRoot":"","sources":["../../../source/ci_source/providers/Codemagic.ts"],"names":[],"mappings":";;;AACA,0DAA8E;AAE9E;;;;;;;GAOG;AACH;IACE,mBAA6B,GAAQ;QAAR,QAAG,GAAH,GAAG,CAAK;IAAG,CAAC;IAEzC,sBAAI,2BAAI;aAAR;YACE,OAAO,WAAW,CAAA;QACpB,CAAC;;;OAAA;IAED,sBAAI,2BAAI;aAAR;YACE,+EAA+E;YAC/E,OAAO,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,CAAA;QACvD,CAAC;;;OAAA;IAED,sBAAI,2BAAI;aAAR;YACE,IAAM,QAAQ,GAAG,CAAC,kBAAkB,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAA;YACxF,IAAM,UAAU,GAAG,CAAC,cAAc,EAAE,yBAAyB,CAAC,CAAA;YAC9D,OAAO,CACL,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC;gBACtC,uCAAmB,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC;gBACzC,IAAI,CAAC,GAAG,CAAC,gBAAgB,KAAK,MAAM,CACrC,CAAA;QACH,CAAC;;;OAAA;IAED,sBAAI,oCAAa;aAAjB;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAA;QACzC,CAAC;;;OAAA;IAED,sBAAI,+BAAQ;aAAZ;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,CAAA;QAC/B,CAAC;;;OAAA;IAED,sBAAI,+BAAQ;aAAZ;YACQ,IAAA,KAAmC,OAAO,CAAC,GAAG,EAA5C,YAAY,kBAAA,EAAE,cAAc,oBAAgB,CAAA;YACpD,OAAO,8BAA4B,cAAc,eAAU,YAAc,CAAA;QAC3E,CAAC;;;OAAA;IACH,gBAAC;AAAD,CAAC,AAlCD,IAkCC;AAlCY,8BAAS"}
|
|
@@ -34,10 +34,10 @@ export declare class Codeship implements CISource {
|
|
|
34
34
|
private default;
|
|
35
35
|
constructor(env: Env);
|
|
36
36
|
setup(): Promise<any>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
private
|
|
37
|
+
get name(): string;
|
|
38
|
+
get isCI(): boolean;
|
|
39
|
+
get isPR(): boolean;
|
|
40
|
+
get pullRequestID(): string;
|
|
41
|
+
get repoSlug(): string;
|
|
42
|
+
private get branchName();
|
|
43
43
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
5
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
6
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) :
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
9
|
});
|
|
9
10
|
};
|
|
@@ -35,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.Codeship = void 0;
|
|
38
40
|
var ci_source_helpers_1 = require("../ci_source_helpers");
|
|
39
41
|
// Codeship Pro: https://documentation.codeship.com/pro/builds-and-configuration/environment-variables/
|
|
40
42
|
// Codeship Basic: https://documentation.codeship.com/basic/builds-and-configuration/set-environment-variables/
|
|
@@ -91,7 +93,7 @@ var Codeship = /** @class */ (function () {
|
|
|
91
93
|
get: function () {
|
|
92
94
|
return "Codeship";
|
|
93
95
|
},
|
|
94
|
-
enumerable:
|
|
96
|
+
enumerable: false,
|
|
95
97
|
configurable: true
|
|
96
98
|
});
|
|
97
99
|
Object.defineProperty(Codeship.prototype, "isCI", {
|
|
@@ -101,21 +103,21 @@ var Codeship = /** @class */ (function () {
|
|
|
101
103
|
}
|
|
102
104
|
return false;
|
|
103
105
|
},
|
|
104
|
-
enumerable:
|
|
106
|
+
enumerable: false,
|
|
105
107
|
configurable: true
|
|
106
108
|
});
|
|
107
109
|
Object.defineProperty(Codeship.prototype, "isPR", {
|
|
108
110
|
get: function () {
|
|
109
111
|
return this.pullRequestID !== "0";
|
|
110
112
|
},
|
|
111
|
-
enumerable:
|
|
113
|
+
enumerable: false,
|
|
112
114
|
configurable: true
|
|
113
115
|
});
|
|
114
116
|
Object.defineProperty(Codeship.prototype, "pullRequestID", {
|
|
115
117
|
get: function () {
|
|
116
118
|
return this.default.prID;
|
|
117
119
|
},
|
|
118
|
-
enumerable:
|
|
120
|
+
enumerable: false,
|
|
119
121
|
configurable: true
|
|
120
122
|
});
|
|
121
123
|
Object.defineProperty(Codeship.prototype, "repoSlug", {
|
|
@@ -125,14 +127,14 @@ var Codeship = /** @class */ (function () {
|
|
|
125
127
|
}
|
|
126
128
|
return "";
|
|
127
129
|
},
|
|
128
|
-
enumerable:
|
|
130
|
+
enumerable: false,
|
|
129
131
|
configurable: true
|
|
130
132
|
});
|
|
131
133
|
Object.defineProperty(Codeship.prototype, "branchName", {
|
|
132
134
|
get: function () {
|
|
133
135
|
return this.env.CI_BRANCH;
|
|
134
136
|
},
|
|
135
|
-
enumerable:
|
|
137
|
+
enumerable: false,
|
|
136
138
|
configurable: true
|
|
137
139
|
});
|
|
138
140
|
return Codeship;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Codeship.js","sourceRoot":"","sources":["../../../source/ci_source/providers/Codeship.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Codeship.js","sourceRoot":"","sources":["../../../source/ci_source/providers/Codeship.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0DAAoF;AAEpF,uGAAuG;AACvG,+GAA+G;AAE/G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;IAEE,kBAA6B,GAAQ;QAAR,QAAG,GAAH,GAAG,CAAK;QAD7B,YAAO,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAA;IACS,CAAC;IAEnC,wBAAK,GAAX;;;;;4BACe,qBAAM,6CAAyB,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,EAAA;;wBAAvE,IAAI,GAAG,SAAgE;wBAC7E,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAA;;;;;KACpC;IAED,sBAAI,0BAAI;aAAR;YACE,OAAO,UAAU,CAAA;QACnB,CAAC;;;OAAA;IAED,sBAAI,0BAAI;aAAR;YACE,IAAI,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,KAAK,UAAU,EAAE;gBAChF,OAAO,IAAI,CAAA;aACZ;YACD,OAAO,KAAK,CAAA;QACd,CAAC;;;OAAA;IAED,sBAAI,0BAAI;aAAR;YACE,OAAO,IAAI,CAAC,aAAa,KAAK,GAAG,CAAA;QACnC,CAAC;;;OAAA;IAED,sBAAI,mCAAa;aAAjB;YACE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAA;QAC1B,CAAC;;;OAAA;IAED,sBAAI,8BAAQ;aAAZ;YACE,IAAI,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE;gBAClD,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,CAAA;aAC7B;YACD,OAAO,EAAE,CAAA;QACX,CAAC;;;OAAA;IAED,sBAAY,gCAAU;aAAtB;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAA;QAC3B,CAAC;;;OAAA;IACH,eAAC;AAAD,CAAC,AAtCD,IAsCC;AAtCY,4BAAQ"}
|
|
@@ -30,10 +30,10 @@ import { Env, CISource } from "../ci_source";
|
|
|
30
30
|
export declare class Concourse implements CISource {
|
|
31
31
|
private readonly env;
|
|
32
32
|
constructor(env: Env);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
get name(): string;
|
|
34
|
+
get isCI(): boolean;
|
|
35
|
+
get isPR(): boolean;
|
|
36
|
+
get pullRequestID(): string;
|
|
37
|
+
get repoSlug(): string;
|
|
38
|
+
get ciRunURL(): any;
|
|
39
39
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Concourse = void 0;
|
|
3
4
|
var ci_source_helpers_1 = require("../ci_source_helpers");
|
|
4
5
|
/**
|
|
5
6
|
* Concourse CI Integration
|
|
@@ -37,14 +38,14 @@ var Concourse = /** @class */ (function () {
|
|
|
37
38
|
get: function () {
|
|
38
39
|
return "Concourse";
|
|
39
40
|
},
|
|
40
|
-
enumerable:
|
|
41
|
+
enumerable: false,
|
|
41
42
|
configurable: true
|
|
42
43
|
});
|
|
43
44
|
Object.defineProperty(Concourse.prototype, "isCI", {
|
|
44
45
|
get: function () {
|
|
45
46
|
return ci_source_helpers_1.ensureEnvKeysExist(this.env, ["CONCOURSE"]);
|
|
46
47
|
},
|
|
47
|
-
enumerable:
|
|
48
|
+
enumerable: false,
|
|
48
49
|
configurable: true
|
|
49
50
|
});
|
|
50
51
|
Object.defineProperty(Concourse.prototype, "isPR", {
|
|
@@ -53,28 +54,28 @@ var Concourse = /** @class */ (function () {
|
|
|
53
54
|
var mustBeInts = ["PULL_REQUEST_ID"];
|
|
54
55
|
return ci_source_helpers_1.ensureEnvKeysExist(this.env, mustHave) && ci_source_helpers_1.ensureEnvKeysAreInt(this.env, mustBeInts);
|
|
55
56
|
},
|
|
56
|
-
enumerable:
|
|
57
|
+
enumerable: false,
|
|
57
58
|
configurable: true
|
|
58
59
|
});
|
|
59
60
|
Object.defineProperty(Concourse.prototype, "pullRequestID", {
|
|
60
61
|
get: function () {
|
|
61
62
|
return this.env.PULL_REQUEST_ID;
|
|
62
63
|
},
|
|
63
|
-
enumerable:
|
|
64
|
+
enumerable: false,
|
|
64
65
|
configurable: true
|
|
65
66
|
});
|
|
66
67
|
Object.defineProperty(Concourse.prototype, "repoSlug", {
|
|
67
68
|
get: function () {
|
|
68
69
|
return this.env.REPO_SLUG;
|
|
69
70
|
},
|
|
70
|
-
enumerable:
|
|
71
|
+
enumerable: false,
|
|
71
72
|
configurable: true
|
|
72
73
|
});
|
|
73
74
|
Object.defineProperty(Concourse.prototype, "ciRunURL", {
|
|
74
75
|
get: function () {
|
|
75
76
|
return this.env.BUILD_URL;
|
|
76
77
|
},
|
|
77
|
-
enumerable:
|
|
78
|
+
enumerable: false,
|
|
78
79
|
configurable: true
|
|
79
80
|
});
|
|
80
81
|
return Concourse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Concourse.js","sourceRoot":"","sources":["../../../source/ci_source/providers/Concourse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Concourse.js","sourceRoot":"","sources":["../../../source/ci_source/providers/Concourse.ts"],"names":[],"mappings":";;;AACA,0DAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;IACE,mBAA6B,GAAQ;QAAR,QAAG,GAAH,GAAG,CAAK;IAAG,CAAC;IAEzC,sBAAI,2BAAI;aAAR;YACE,OAAO,WAAW,CAAA;QACpB,CAAC;;;OAAA;IAED,sBAAI,2BAAI;aAAR;YACE,OAAO,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAA;QACpD,CAAC;;;OAAA;IAED,sBAAI,2BAAI;aAAR;YACE,IAAM,QAAQ,GAAG,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAA;YACjD,IAAM,UAAU,GAAG,CAAC,iBAAiB,CAAC,CAAA;YACtC,OAAO,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,uCAAmB,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;QAC5F,CAAC;;;OAAA;IAED,sBAAI,oCAAa;aAAjB;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,CAAA;QACjC,CAAC;;;OAAA;IAED,sBAAI,+BAAQ;aAAZ;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAA;QAC3B,CAAC;;;OAAA;IAED,sBAAI,+BAAQ;aAAZ;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAA;QAC3B,CAAC;;;OAAA;IACH,gBAAC;AAAD,CAAC,AA5BD,IA4BC;AA5BY,8BAAS"}
|
|
@@ -29,11 +29,11 @@ import { Env, CISource } from "../ci_source";
|
|
|
29
29
|
export declare class DockerCloud implements CISource {
|
|
30
30
|
private readonly env;
|
|
31
31
|
constructor(env: Env);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
get name(): string;
|
|
33
|
+
get isCI(): boolean;
|
|
34
|
+
get isPR(): boolean;
|
|
35
35
|
private _prParseURL;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
get pullRequestID(): string;
|
|
37
|
+
get repoSlug(): string;
|
|
38
|
+
get repoURL(): string;
|
|
39
39
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DockerCloud = void 0;
|
|
3
4
|
var ci_source_helpers_1 = require("../ci_source_helpers");
|
|
4
5
|
/**
|
|
5
6
|
*
|
|
@@ -36,14 +37,14 @@ var DockerCloud = /** @class */ (function () {
|
|
|
36
37
|
get: function () {
|
|
37
38
|
return "Docker Cloud";
|
|
38
39
|
},
|
|
39
|
-
enumerable:
|
|
40
|
+
enumerable: false,
|
|
40
41
|
configurable: true
|
|
41
42
|
});
|
|
42
43
|
Object.defineProperty(DockerCloud.prototype, "isCI", {
|
|
43
44
|
get: function () {
|
|
44
45
|
return ci_source_helpers_1.ensureEnvKeysExist(this.env, ["DOCKER_REPO"]);
|
|
45
46
|
},
|
|
46
|
-
enumerable:
|
|
47
|
+
enumerable: false,
|
|
47
48
|
configurable: true
|
|
48
49
|
});
|
|
49
50
|
Object.defineProperty(DockerCloud.prototype, "isPR", {
|
|
@@ -54,7 +55,7 @@ var DockerCloud = /** @class */ (function () {
|
|
|
54
55
|
var mustHave = ["SOURCE_REPOSITORY_URL", "PULL_REQUEST_URL"];
|
|
55
56
|
return ci_source_helpers_1.ensureEnvKeysExist(this.env, mustHave);
|
|
56
57
|
},
|
|
57
|
-
enumerable:
|
|
58
|
+
enumerable: false,
|
|
58
59
|
configurable: true
|
|
59
60
|
});
|
|
60
61
|
DockerCloud.prototype._prParseURL = function () {
|
|
@@ -73,7 +74,7 @@ var DockerCloud = /** @class */ (function () {
|
|
|
73
74
|
var id = this._prParseURL().id;
|
|
74
75
|
return id || "";
|
|
75
76
|
},
|
|
76
|
-
enumerable:
|
|
77
|
+
enumerable: false,
|
|
77
78
|
configurable: true
|
|
78
79
|
});
|
|
79
80
|
Object.defineProperty(DockerCloud.prototype, "repoSlug", {
|
|
@@ -81,14 +82,14 @@ var DockerCloud = /** @class */ (function () {
|
|
|
81
82
|
var _a = this._prParseURL(), owner = _a.owner, reponame = _a.reponame;
|
|
82
83
|
return owner && reponame ? owner + "/" + reponame : "";
|
|
83
84
|
},
|
|
84
|
-
enumerable:
|
|
85
|
+
enumerable: false,
|
|
85
86
|
configurable: true
|
|
86
87
|
});
|
|
87
88
|
Object.defineProperty(DockerCloud.prototype, "repoURL", {
|
|
88
89
|
get: function () {
|
|
89
90
|
return this.env.SOURCE_REPOSITORY_URL;
|
|
90
91
|
},
|
|
91
|
-
enumerable:
|
|
92
|
+
enumerable: false,
|
|
92
93
|
configurable: true
|
|
93
94
|
});
|
|
94
95
|
return DockerCloud;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DockerCloud.js","sourceRoot":"","sources":["../../../source/ci_source/providers/DockerCloud.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DockerCloud.js","sourceRoot":"","sources":["../../../source/ci_source/providers/DockerCloud.ts"],"names":[],"mappings":";;;AACA,0DAAyD;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;IACE,qBAA6B,GAAQ;QAAR,QAAG,GAAH,GAAG,CAAK;IAAG,CAAC;IAEzC,sBAAI,6BAAI;aAAR;YACE,OAAO,cAAc,CAAA;QACvB,CAAC;;;OAAA;IAED,sBAAI,6BAAI;aAAR;YACE,OAAO,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,CAAA;QACtD,CAAC;;;OAAA;IAED,sBAAI,6BAAI;aAAR;YACE,IAAI,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE;gBACtD,OAAO,IAAI,CAAA;aACZ;YAED,IAAM,QAAQ,GAAG,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAAA;YAC9D,OAAO,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QAC/C,CAAC;;;OAAA;IAEO,iCAAW,GAAnB;QACE,IAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAA;QAC7C,IAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAClC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1B,IAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;YAC1B,IAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;YAC7B,IAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;YACvB,OAAO,EAAE,KAAK,OAAA,EAAE,QAAQ,UAAA,EAAE,EAAE,IAAA,EAAE,CAAA;SAC/B;QACD,OAAO,EAAE,CAAA;IACX,CAAC;IAED,sBAAI,sCAAa;aAAjB;YACU,IAAA,EAAE,GAAK,IAAI,CAAC,WAAW,EAAE,GAAvB,CAAuB;YACjC,OAAO,EAAE,IAAI,EAAE,CAAA;QACjB,CAAC;;;OAAA;IAED,sBAAI,iCAAQ;aAAZ;YACQ,IAAA,KAAsB,IAAI,CAAC,WAAW,EAAE,EAAtC,KAAK,WAAA,EAAE,QAAQ,cAAuB,CAAA;YAC9C,OAAO,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAI,KAAK,SAAI,QAAU,CAAC,CAAC,CAAC,EAAE,CAAA;QACxD,CAAC;;;OAAA;IAED,sBAAI,gCAAO;aAAX;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAA;QACvC,CAAC;;;OAAA;IACH,kBAAC;AAAD,CAAC,AA7CD,IA6CC;AA7CY,kCAAW"}
|
|
@@ -22,9 +22,9 @@ import { Env, CISource } from "../ci_source";
|
|
|
22
22
|
export declare class Drone implements CISource {
|
|
23
23
|
private readonly env;
|
|
24
24
|
constructor(env: Env);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
get name(): string;
|
|
26
|
+
get isCI(): boolean;
|
|
27
|
+
get isPR(): boolean;
|
|
28
|
+
get pullRequestID(): string;
|
|
29
|
+
get repoSlug(): string;
|
|
30
30
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Drone = void 0;
|
|
3
4
|
var ci_source_helpers_1 = require("../ci_source_helpers");
|
|
4
5
|
/**
|
|
5
6
|
*
|
|
@@ -29,14 +30,14 @@ var Drone = /** @class */ (function () {
|
|
|
29
30
|
get: function () {
|
|
30
31
|
return "Drone";
|
|
31
32
|
},
|
|
32
|
-
enumerable:
|
|
33
|
+
enumerable: false,
|
|
33
34
|
configurable: true
|
|
34
35
|
});
|
|
35
36
|
Object.defineProperty(Drone.prototype, "isCI", {
|
|
36
37
|
get: function () {
|
|
37
38
|
return ci_source_helpers_1.ensureEnvKeysExist(this.env, ["DRONE"]);
|
|
38
39
|
},
|
|
39
|
-
enumerable:
|
|
40
|
+
enumerable: false,
|
|
40
41
|
configurable: true
|
|
41
42
|
});
|
|
42
43
|
Object.defineProperty(Drone.prototype, "isPR", {
|
|
@@ -45,21 +46,21 @@ var Drone = /** @class */ (function () {
|
|
|
45
46
|
var mustBeInts = ["DRONE_PULL_REQUEST"];
|
|
46
47
|
return ci_source_helpers_1.ensureEnvKeysExist(this.env, mustHave) && ci_source_helpers_1.ensureEnvKeysAreInt(this.env, mustBeInts);
|
|
47
48
|
},
|
|
48
|
-
enumerable:
|
|
49
|
+
enumerable: false,
|
|
49
50
|
configurable: true
|
|
50
51
|
});
|
|
51
52
|
Object.defineProperty(Drone.prototype, "pullRequestID", {
|
|
52
53
|
get: function () {
|
|
53
54
|
return this.env.DRONE_PULL_REQUEST;
|
|
54
55
|
},
|
|
55
|
-
enumerable:
|
|
56
|
+
enumerable: false,
|
|
56
57
|
configurable: true
|
|
57
58
|
});
|
|
58
59
|
Object.defineProperty(Drone.prototype, "repoSlug", {
|
|
59
60
|
get: function () {
|
|
60
61
|
return this.env.DRONE_REPO;
|
|
61
62
|
},
|
|
62
|
-
enumerable:
|
|
63
|
+
enumerable: false,
|
|
63
64
|
configurable: true
|
|
64
65
|
});
|
|
65
66
|
return Drone;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drone.js","sourceRoot":"","sources":["../../../source/ci_source/providers/Drone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drone.js","sourceRoot":"","sources":["../../../source/ci_source/providers/Drone.ts"],"names":[],"mappings":";;;AACA,0DAA8E;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;IACE,eAA6B,GAAQ;QAAR,QAAG,GAAH,GAAG,CAAK;IAAG,CAAC;IAEzC,sBAAI,uBAAI;aAAR;YACE,OAAO,OAAO,CAAA;QAChB,CAAC;;;OAAA;IAED,sBAAI,uBAAI;aAAR;YACE,OAAO,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;QAChD,CAAC;;;OAAA;IAED,sBAAI,uBAAI;aAAR;YACE,IAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,oBAAoB,EAAE,YAAY,CAAC,CAAA;YAC9D,IAAM,UAAU,GAAG,CAAC,oBAAoB,CAAC,CAAA;YACzC,OAAO,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,uCAAmB,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;QAC5F,CAAC;;;OAAA;IAED,sBAAI,gCAAa;aAAjB;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAA;QACpC,CAAC;;;OAAA;IAED,sBAAI,2BAAQ;aAAZ;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,CAAA;QAC5B,CAAC;;;OAAA;IACH,YAAC;AAAD,CAAC,AAxBD,IAwBC;AAxBY,sBAAK"}
|
|
@@ -2,9 +2,9 @@ import { Env, CISource } from "../ci_source";
|
|
|
2
2
|
export declare class FakeCI implements CISource {
|
|
3
3
|
private readonly env;
|
|
4
4
|
constructor(env: Env);
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
get name(): string;
|
|
6
|
+
get isCI(): boolean;
|
|
7
|
+
get isPR(): boolean;
|
|
8
|
+
get pullRequestID(): string;
|
|
9
|
+
get repoSlug(): string;
|
|
10
10
|
}
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.FakeCI = void 0;
|
|
14
15
|
var ci_source_helpers_1 = require("../ci_source_helpers");
|
|
15
16
|
var FakeCI = /** @class */ (function () {
|
|
16
17
|
function FakeCI(env) {
|
|
@@ -18,13 +19,13 @@ var FakeCI = /** @class */ (function () {
|
|
|
18
19
|
repo: env.DANGER_TEST_REPO || env.DANGER_MANUAL_GH_REPO || "artsy/emission",
|
|
19
20
|
pr: env.DANGER_TEST_PR || env.DANGER_MANUAL_PR_NUM || "327",
|
|
20
21
|
};
|
|
21
|
-
this.env = __assign({}, env, defaults);
|
|
22
|
+
this.env = __assign(__assign({}, env), defaults);
|
|
22
23
|
}
|
|
23
24
|
Object.defineProperty(FakeCI.prototype, "name", {
|
|
24
25
|
get: function () {
|
|
25
26
|
return "Fake Testing CI";
|
|
26
27
|
},
|
|
27
|
-
enumerable:
|
|
28
|
+
enumerable: false,
|
|
28
29
|
configurable: true
|
|
29
30
|
});
|
|
30
31
|
Object.defineProperty(FakeCI.prototype, "isCI", {
|
|
@@ -33,28 +34,28 @@ var FakeCI = /** @class */ (function () {
|
|
|
33
34
|
ci_source_helpers_1.ensureEnvKeysExist(this.env, ["DANGER_LOCAL_NO_CI"]) ||
|
|
34
35
|
ci_source_helpers_1.ensureEnvKeysExist(this.env, ["DANGER_MANUAL_CI"]));
|
|
35
36
|
},
|
|
36
|
-
enumerable:
|
|
37
|
+
enumerable: false,
|
|
37
38
|
configurable: true
|
|
38
39
|
});
|
|
39
40
|
Object.defineProperty(FakeCI.prototype, "isPR", {
|
|
40
41
|
get: function () {
|
|
41
42
|
return true;
|
|
42
43
|
},
|
|
43
|
-
enumerable:
|
|
44
|
+
enumerable: false,
|
|
44
45
|
configurable: true
|
|
45
46
|
});
|
|
46
47
|
Object.defineProperty(FakeCI.prototype, "pullRequestID", {
|
|
47
48
|
get: function () {
|
|
48
49
|
return this.env.pr;
|
|
49
50
|
},
|
|
50
|
-
enumerable:
|
|
51
|
+
enumerable: false,
|
|
51
52
|
configurable: true
|
|
52
53
|
});
|
|
53
54
|
Object.defineProperty(FakeCI.prototype, "repoSlug", {
|
|
54
55
|
get: function () {
|
|
55
56
|
return this.env.repo;
|
|
56
57
|
},
|
|
57
|
-
enumerable:
|
|
58
|
+
enumerable: false,
|
|
58
59
|
configurable: true
|
|
59
60
|
});
|
|
60
61
|
return FakeCI;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fake.js","sourceRoot":"","sources":["../../../source/ci_source/providers/Fake.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Fake.js","sourceRoot":"","sources":["../../../source/ci_source/providers/Fake.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,0DAAyD;AAEzD;IAGE,gBAAY,GAAQ;QAClB,IAAM,QAAQ,GAAG;YACf,IAAI,EAAE,GAAG,CAAC,gBAAgB,IAAI,GAAG,CAAC,qBAAqB,IAAI,gBAAgB;YAC3E,EAAE,EAAE,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC,oBAAoB,IAAI,KAAK;SAC5D,CAAA;QAED,IAAI,CAAC,GAAG,yBAAQ,GAAG,GAAK,QAAQ,CAAE,CAAA;IACpC,CAAC;IACD,sBAAI,wBAAI;aAAR;YACE,OAAO,iBAAiB,CAAA;QAC1B,CAAC;;;OAAA;IAED,sBAAI,wBAAI;aAAR;YACE,OAAO,CACL,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC,CAAC;gBAChD,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,CAAC;gBACpD,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,CAAC,CACnD,CAAA;QACH,CAAC;;;OAAA;IAED,sBAAI,wBAAI;aAAR;YACE,OAAO,IAAI,CAAA;QACb,CAAC;;;OAAA;IAED,sBAAI,iCAAa;aAAjB;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAA;QACpB,CAAC;;;OAAA;IAED,sBAAI,4BAAQ;aAAZ;YACE,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAA;QACtB,CAAC;;;OAAA;IACH,aAAC;AAAD,CAAC,AAlCD,IAkCC;AAlCY,wBAAM"}
|
|
@@ -192,10 +192,10 @@ export declare class GitHubActions implements CISource {
|
|
|
192
192
|
private readonly env;
|
|
193
193
|
private event;
|
|
194
194
|
constructor(env: Env, event?: any);
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
195
|
+
get name(): string;
|
|
196
|
+
get isCI(): boolean;
|
|
197
|
+
get isPR(): boolean;
|
|
198
|
+
get useEventDSL(): boolean;
|
|
199
|
+
get pullRequestID(): string;
|
|
200
|
+
get repoSlug(): string;
|
|
201
201
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GitHubActions = void 0;
|
|
3
4
|
var ci_source_helpers_1 = require("../ci_source_helpers");
|
|
4
5
|
var fs_1 = require("fs");
|
|
5
6
|
// https://developer.github.com/actions/
|
|
@@ -210,14 +211,14 @@ var GitHubActions = /** @class */ (function () {
|
|
|
210
211
|
get: function () {
|
|
211
212
|
return "GitHub Actions";
|
|
212
213
|
},
|
|
213
|
-
enumerable:
|
|
214
|
+
enumerable: false,
|
|
214
215
|
configurable: true
|
|
215
216
|
});
|
|
216
217
|
Object.defineProperty(GitHubActions.prototype, "isCI", {
|
|
217
218
|
get: function () {
|
|
218
219
|
return ci_source_helpers_1.ensureEnvKeysExist(this.env, ["GITHUB_WORKFLOW"]);
|
|
219
220
|
},
|
|
220
|
-
enumerable:
|
|
221
|
+
enumerable: false,
|
|
221
222
|
configurable: true
|
|
222
223
|
});
|
|
223
224
|
Object.defineProperty(GitHubActions.prototype, "isPR", {
|
|
@@ -225,14 +226,14 @@ var GitHubActions = /** @class */ (function () {
|
|
|
225
226
|
// This one is complicated, because it needs to not *just* support PRs
|
|
226
227
|
return true;
|
|
227
228
|
},
|
|
228
|
-
enumerable:
|
|
229
|
+
enumerable: false,
|
|
229
230
|
configurable: true
|
|
230
231
|
});
|
|
231
232
|
Object.defineProperty(GitHubActions.prototype, "useEventDSL", {
|
|
232
233
|
get: function () {
|
|
233
234
|
return this.event.pull_request === undefined && this.event.issue === undefined;
|
|
234
235
|
},
|
|
235
|
-
enumerable:
|
|
236
|
+
enumerable: false,
|
|
236
237
|
configurable: true
|
|
237
238
|
});
|
|
238
239
|
Object.defineProperty(GitHubActions.prototype, "pullRequestID", {
|
|
@@ -245,7 +246,7 @@ var GitHubActions = /** @class */ (function () {
|
|
|
245
246
|
}
|
|
246
247
|
throw new Error("pullRequestID was called on GitHubActions when it wasn't a PR");
|
|
247
248
|
},
|
|
248
|
-
enumerable:
|
|
249
|
+
enumerable: false,
|
|
249
250
|
configurable: true
|
|
250
251
|
});
|
|
251
252
|
Object.defineProperty(GitHubActions.prototype, "repoSlug", {
|
|
@@ -258,7 +259,7 @@ var GitHubActions = /** @class */ (function () {
|
|
|
258
259
|
}
|
|
259
260
|
throw new Error("repoSlug was called on GitHubActions when it wasn't a PR");
|
|
260
261
|
},
|
|
261
|
-
enumerable:
|
|
262
|
+
enumerable: false,
|
|
262
263
|
configurable: true
|
|
263
264
|
});
|
|
264
265
|
return GitHubActions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitHubActions.js","sourceRoot":"","sources":["../../../source/ci_source/providers/GitHubActions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GitHubActions.js","sourceRoot":"","sources":["../../../source/ci_source/providers/GitHubActions.ts"],"names":[],"mappings":";;;AACA,0DAAyD;AACzD,yBAA6C;AAE7C,wCAAwC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4LG;AAEH;IAGE,uBAA6B,GAAQ,EAAE,KAAsB;QAAtB,sBAAA,EAAA,iBAAsB;QAAhC,QAAG,GAAH,GAAG,CAAK;QAC3B,IAAA,iBAAiB,GAAK,GAAG,kBAAR,CAAQ;QACjC,IAAM,aAAa,GAAG,iBAAiB,IAAI,6BAA6B,CAAA;QAExE,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;SACnB;aAAM,IAAI,eAAU,CAAC,aAAa,CAAC,EAAE;YACpC,IAAM,OAAK,GAAG,iBAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;YACjD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAK,CAAC,CAAA;SAC/B;IACH,CAAC;IAED,sBAAI,+BAAI;aAAR;YACE,OAAO,gBAAgB,CAAA;QACzB,CAAC;;;OAAA;IAED,sBAAI,+BAAI;aAAR;YACE,OAAO,sCAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAA;QAC1D,CAAC;;;OAAA;IAED,sBAAI,+BAAI;aAAR;YACE,sEAAsE;YACtE,OAAO,IAAI,CAAA;QACb,CAAC;;;OAAA;IAED,sBAAI,sCAAW;aAAf;YACE,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAA;QAChF,CAAC;;;OAAA;IAED,sBAAI,wCAAa;aAAjB;YACE,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE;gBACzC,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAA;aACtC;iBAAM,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE;gBACzC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAA;aAC/B;YAED,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAA;QAClF,CAAC;;;OAAA;IAED,sBAAI,mCAAQ;aAAZ;YACE,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE;gBACzC,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAA;aACnD;iBAAM,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,EAAE;gBAC9C,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAA;aACvC;YAED,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAA;QAC7E,CAAC;;;OAAA;IAMH,oBAAC;AAAD,CAAC,AAxDD,IAwDC;AAxDY,sCAAa"}
|
|
@@ -2,10 +2,10 @@ import { Env, CISource } from "../ci_source";
|
|
|
2
2
|
export declare class GitLabCI implements CISource {
|
|
3
3
|
private readonly env;
|
|
4
4
|
constructor(env: Env);
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
get name(): string;
|
|
6
|
+
get isCI(): boolean;
|
|
7
|
+
get isPR(): boolean;
|
|
8
|
+
get pullRequestID(): string;
|
|
9
|
+
get repoSlug(): string;
|
|
10
|
+
get commitHash(): string;
|
|
11
11
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GitLabCI = void 0;
|
|
3
4
|
var ci_source_helpers_1 = require("../ci_source_helpers");
|
|
4
5
|
var GitLabCI = /** @class */ (function () {
|
|
5
6
|
function GitLabCI(env) {
|
|
@@ -9,14 +10,14 @@ var GitLabCI = /** @class */ (function () {
|
|
|
9
10
|
get: function () {
|
|
10
11
|
return "GitLab CI";
|
|
11
12
|
},
|
|
12
|
-
enumerable:
|
|
13
|
+
enumerable: false,
|
|
13
14
|
configurable: true
|
|
14
15
|
});
|
|
15
16
|
Object.defineProperty(GitLabCI.prototype, "isCI", {
|
|
16
17
|
get: function () {
|
|
17
18
|
return ci_source_helpers_1.ensureEnvKeysExist(this.env, ["GITLAB_CI"]);
|
|
18
19
|
},
|
|
19
|
-
enumerable:
|
|
20
|
+
enumerable: false,
|
|
20
21
|
configurable: true
|
|
21
22
|
});
|
|
22
23
|
Object.defineProperty(GitLabCI.prototype, "isPR", {
|
|
@@ -25,28 +26,28 @@ var GitLabCI = /** @class */ (function () {
|
|
|
25
26
|
var mustBeInts = ["CI_MERGE_REQUEST_IID"];
|
|
26
27
|
return ci_source_helpers_1.ensureEnvKeysExist(this.env, mustHave) && ci_source_helpers_1.ensureEnvKeysAreInt(this.env, mustBeInts);
|
|
27
28
|
},
|
|
28
|
-
enumerable:
|
|
29
|
+
enumerable: false,
|
|
29
30
|
configurable: true
|
|
30
31
|
});
|
|
31
32
|
Object.defineProperty(GitLabCI.prototype, "pullRequestID", {
|
|
32
33
|
get: function () {
|
|
33
34
|
return this.env.CI_MERGE_REQUEST_IID;
|
|
34
35
|
},
|
|
35
|
-
enumerable:
|
|
36
|
+
enumerable: false,
|
|
36
37
|
configurable: true
|
|
37
38
|
});
|
|
38
39
|
Object.defineProperty(GitLabCI.prototype, "repoSlug", {
|
|
39
40
|
get: function () {
|
|
40
41
|
return this.env.CI_PROJECT_PATH;
|
|
41
42
|
},
|
|
42
|
-
enumerable:
|
|
43
|
+
enumerable: false,
|
|
43
44
|
configurable: true
|
|
44
45
|
});
|
|
45
46
|
Object.defineProperty(GitLabCI.prototype, "commitHash", {
|
|
46
47
|
get: function () {
|
|
47
48
|
return this.env.CI_COMMIT_SHA;
|
|
48
49
|
},
|
|
49
|
-
enumerable:
|
|
50
|
+
enumerable: false,
|
|
50
51
|
configurable: true
|
|
51
52
|
});
|
|
52
53
|
return GitLabCI;
|