danger 11.0.2 → 11.0.4
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/.eslintignore +2 -0
- package/.eslintrc.js +66 -0
- package/.release-it.json +2 -1
- package/CHANGELOG.md +91 -32
- package/README.md +1 -1
- package/SECURITY.md +9 -0
- package/distribution/api/fetch.d.ts +1 -1
- package/distribution/api/fetch.js +6 -6
- package/distribution/api/fetch.js.map +1 -1
- package/distribution/ci_source/get_ci_source.js +2 -1
- package/distribution/ci_source/get_ci_source.js.map +1 -1
- package/distribution/commands/ci/runner.js +1 -1
- package/distribution/commands/ci/runner.js.map +1 -1
- package/distribution/commands/danger-local.js +2 -2
- package/distribution/commands/danger-local.js.map +1 -1
- package/distribution/commands/danger-runner.js +0 -2
- package/distribution/commands/danger-runner.js.map +1 -1
- package/distribution/commands/init/default-dangerfile.js +1 -1
- package/distribution/commands/init/default-dangerfile.js.map +1 -1
- package/distribution/commands/init/interfaces.d.ts +3 -3
- package/distribution/commands/utils/runDangerSubprocess.d.ts +1 -0
- package/distribution/commands/utils/runDangerSubprocess.js +6 -3
- package/distribution/commands/utils/runDangerSubprocess.js.map +1 -1
- package/distribution/danger.d.ts +9 -3
- package/distribution/danger.js.flow +1 -1
- package/distribution/platforms/BitBucketCloud.js.map +1 -1
- 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 +18 -11
- package/distribution/platforms/bitbucket_cloud/_tests_/_bitbucket_cloud_git.test.js.map +1 -1
- package/distribution/platforms/git/localGetCommits.js.map +1 -1
- package/distribution/platforms/git/localLogGitCommits.d.ts +1 -1
- package/distribution/platforms/git/localLogGitCommits.js.map +1 -1
- package/distribution/platforms/gitlab/GitLabAPI.js +1 -1
- package/distribution/platforms/gitlab/GitLabAPI.js.map +1 -1
- package/distribution/runner/Executor.js +7 -3
- package/distribution/runner/Executor.js.map +1 -1
- package/distribution/runner/dangerDSLJSON.js.map +1 -1
- package/distribution/runner/runners/utils/transpiler.js +8 -8
- package/distribution/runner/runners/utils/transpiler.js.map +1 -1
- package/package.json +30 -24
- package/tsconfig.spec.json +4 -0
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
es6: true,
|
|
5
|
+
node: true,
|
|
6
|
+
},
|
|
7
|
+
extends: ["plugin:@typescript-eslint/recommended", "plugin:jest/recommended", "prettier"],
|
|
8
|
+
parser: "@typescript-eslint/parser",
|
|
9
|
+
parserOptions: {
|
|
10
|
+
project: "tsconfig.spec.json",
|
|
11
|
+
sourceType: "module",
|
|
12
|
+
},
|
|
13
|
+
plugins: ["eslint-plugin-jest", "eslint-plugin-jsdoc", "@typescript-eslint"],
|
|
14
|
+
rules: {
|
|
15
|
+
"@typescript-eslint/naming-convention": "error",
|
|
16
|
+
"@typescript-eslint/no-empty-function": "error",
|
|
17
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
18
|
+
|
|
19
|
+
// Something is grumpy about these rules re: node imports - TODO
|
|
20
|
+
"@typescript-eslint/no-require-imports": "off",
|
|
21
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
22
|
+
|
|
23
|
+
curly: "error",
|
|
24
|
+
"jsdoc/check-alignment": "error",
|
|
25
|
+
"jsdoc/check-indentation": "off",
|
|
26
|
+
"jsdoc/newline-after-description": "off",
|
|
27
|
+
"no-empty": "error",
|
|
28
|
+
// This is used intentionally in a bunch of ci_source/providers
|
|
29
|
+
"no-empty-function": "off",
|
|
30
|
+
"no-redeclare": "error",
|
|
31
|
+
"no-var": "error",
|
|
32
|
+
// There are a bunch of existing uses of 'let' where this rule would trigger
|
|
33
|
+
"prefer-const": "off",
|
|
34
|
+
|
|
35
|
+
// This project has a ton of interacting APIs, and sometimes it's helpful to be explicit, even if the type is trivial
|
|
36
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
37
|
+
|
|
38
|
+
"no-unused-expressions": "off",
|
|
39
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
40
|
+
|
|
41
|
+
"no-unused-vars": "off",
|
|
42
|
+
"@typescript-eslint/no-unused-vars": [
|
|
43
|
+
"warn",
|
|
44
|
+
{
|
|
45
|
+
// Allow function args to be unused
|
|
46
|
+
args: "none",
|
|
47
|
+
argsIgnorePattern: "^_",
|
|
48
|
+
varsIgnorePattern: "^_",
|
|
49
|
+
caughtErrorsIgnorePattern: "^_",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
|
|
53
|
+
"jest/no-disabled-tests": "warn",
|
|
54
|
+
"jest/no-focused-tests": "error",
|
|
55
|
+
"jest/no-identical-title": "error",
|
|
56
|
+
"jest/prefer-to-have-length": "off",
|
|
57
|
+
"jest/valid-expect": "error",
|
|
58
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
59
|
+
// Tons of violations in the codebase
|
|
60
|
+
"@typescript-eslint/naming-convention": "off",
|
|
61
|
+
// Used liberally in the codebase
|
|
62
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
63
|
+
// This has value in communicating with other Developers even if it has no functional effect.
|
|
64
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
65
|
+
},
|
|
66
|
+
}
|
package/.release-it.json
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
},
|
|
6
6
|
"buildCommand": "yarn package",
|
|
7
7
|
"hooks": {
|
|
8
|
-
"before:bump": "yarn declarations; yarn build:schemas
|
|
8
|
+
"before:bump": "yarn declarations; yarn build:schemas",
|
|
9
|
+
"after:bump": "yarn package",
|
|
9
10
|
"after:release": "VERSION=${version} scripts/create-homebrew-tap-pr.sh"
|
|
10
11
|
}
|
|
11
12
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
// These docs are aimed at users rather than danger developers, so please limit technical
|
|
7
7
|
// terminology in here.
|
|
8
8
|
|
|
9
|
-
// Note: if this is your first PR, you'll need to add your
|
|
10
|
-
// see the bottom of this file.
|
|
9
|
+
// Note: if this is your first PR, you'll need to add your link to your
|
|
10
|
+
// username handle to the footnotes. see the bottom of this file.
|
|
11
|
+
// The list there is sorted, try to follow that.
|
|
11
12
|
|
|
12
13
|
-->
|
|
13
14
|
|
|
@@ -15,10 +16,17 @@
|
|
|
15
16
|
|
|
16
17
|
<!-- Your comment below this -->
|
|
17
18
|
|
|
18
|
-
|
|
19
19
|
<!-- Your comment above this -->
|
|
20
20
|
|
|
21
|
-
# 11.0.
|
|
21
|
+
# 11.0.3
|
|
22
|
+
|
|
23
|
+
- Bump up @babel/* plugins for Core-JS support. [@parvez]
|
|
24
|
+
- Replace deprecated @Babel/polyfill dependency with Core-JS + Regenerator-Runtime. [@gpetrioli]
|
|
25
|
+
- *Fix:* / *Improvement* Don't drop inline comments which fall outside of the diff in GitHub PRs - [#1272](https://github.com/danger/danger-js/pull/1272) [@rouby]
|
|
26
|
+
|
|
27
|
+
- *Chore:* Switch from tslint to eslint (tslint is end-of-life) - [#1205](https://github.com/danger/danger-js/pull/1205) [@fbartho]
|
|
28
|
+
|
|
29
|
+
# 11.0.0 -> 11.0.2
|
|
22
30
|
|
|
23
31
|
- *Breaking:* Upgrade @octokit/rest from ^16.43.1 to ^18.12.0 - [#1204](https://github.com/danger/danger-js/pull/1204) [@fbartho]
|
|
24
32
|
|
|
@@ -103,13 +111,13 @@
|
|
|
103
111
|
|
|
104
112
|
# 10.5.0
|
|
105
113
|
|
|
106
|
-
- Handle deprecations for the APIs used with `--use-github-checks` #1073 [@wardpeet]
|
|
114
|
+
- Handle deprecations for the APIs used with `--use-github-checks` #1073 [@wardpeet]
|
|
107
115
|
|
|
108
116
|
# 10.4.1
|
|
109
117
|
|
|
110
118
|
- Improved `tsconfig.json` file lookup strategy: it now looks for it starting from the location of the danger file.
|
|
111
|
-
#1068 [@igorbek]
|
|
112
|
-
- Upgrade node-fetch to 2.6.1 to fix GHSA-w7rc-rwvf-8q5r. #1071 [@hmcc]
|
|
119
|
+
#1068 [@igorbek]
|
|
120
|
+
- Upgrade node-fetch to 2.6.1 to fix GHSA-w7rc-rwvf-8q5r. #1071 [@hmcc]
|
|
113
121
|
|
|
114
122
|
# 10.4.0
|
|
115
123
|
|
|
@@ -122,7 +130,7 @@
|
|
|
122
130
|
DANGER_MANUAL_GH_REPO: ${{ steps.pr_info.outputs.repo }}
|
|
123
131
|
DANGER_MANUAL_PR: ${{ steps.pr_info.outputs.number }}
|
|
124
132
|
```
|
|
125
|
-
Which looks more intentional instead of: `DANGER_FAKE_CI` etc. [@orta]
|
|
133
|
+
Which looks more intentional instead of: `DANGER_FAKE_CI` etc. [@orta]
|
|
126
134
|
|
|
127
135
|
# 10.3.1
|
|
128
136
|
|
|
@@ -135,7 +143,7 @@
|
|
|
135
143
|
|
|
136
144
|
# 10.2.2
|
|
137
145
|
|
|
138
|
-
- Add support for `danger local` on repos without a master branch - [@ahobson]
|
|
146
|
+
- Add support for `danger local` on repos without a master branch - [@ahobson]
|
|
139
147
|
|
|
140
148
|
# 10.2.1
|
|
141
149
|
|
|
@@ -175,7 +183,7 @@
|
|
|
175
183
|
- Don't use hardcoded userId to update comments if using personal token in Github Actions - [@rohit-gohri]
|
|
176
184
|
- Disable warning in Github Action if using DANGER_GITHUB_API_TOKEN - [@rohit-gohri]
|
|
177
185
|
- Update `parse-diff` library - [@417-72KI]
|
|
178
|
-
- Fix repository slug in Jenkins provider - [sandratatarevicova]
|
|
186
|
+
- Fix repository slug in Jenkins provider - [@sandratatarevicova]
|
|
179
187
|
- Add Gitlab diff support - [@rohit-gohri]
|
|
180
188
|
- Fix Typos across danger-js Repo - [@yohix]
|
|
181
189
|
- Fix `@octokit/rest` deprecation warning when using `.issues.addLabels()` - [@sogame]
|
|
@@ -348,7 +356,7 @@
|
|
|
348
356
|
|
|
349
357
|
# 7.0.19
|
|
350
358
|
|
|
351
|
-
- Taken a stab at trying to make the commit status summary to feel better in both Danger & Peril [@orta][@dblandin]
|
|
359
|
+
- Taken a stab at trying to make the commit status summary to feel better in both Danger & Peril [@orta], [@dblandin]
|
|
352
360
|
|
|
353
361
|
# 7.0.18
|
|
354
362
|
|
|
@@ -729,7 +737,7 @@ Also, `danger pr` now accepts a `--process` arg.
|
|
|
729
737
|
|
|
730
738
|
# 3.7.17
|
|
731
739
|
|
|
732
|
-
- Improvements to PR detection on Team City - @markelog
|
|
740
|
+
- Improvements to PR detection on Team City - [@markelog]
|
|
733
741
|
|
|
734
742
|
# 3.7.16
|
|
735
743
|
|
|
@@ -1863,73 +1871,124 @@ That should do ya. I think. This doesn't support babel, and I haven't explored u
|
|
|
1863
1871
|
|
|
1864
1872
|
Not usable for others, only stubs of classes etc. - [@orta]
|
|
1865
1873
|
|
|
1866
|
-
[
|
|
1867
|
-
[
|
|
1874
|
+
[@417-72ki]: https://github.com/417-72KI
|
|
1875
|
+
[@HonzaMac]: https://github.com/HonzaMac
|
|
1876
|
+
[@JanStevens]: https://github.com/JanStevens
|
|
1877
|
+
[@RDIL]: https://github.com/RDIL
|
|
1878
|
+
[@Teamop]: https://github.com/Teamop
|
|
1879
|
+
[@adam-bratin]: https://github.com/adam-bratin
|
|
1868
1880
|
[@adam-moss]: https://github.com/adam-moss
|
|
1869
1881
|
[@adamnoakes]: https://github.com/adamnoakes
|
|
1870
1882
|
[@aghassi]: https://github.com/aghassi
|
|
1883
|
+
[@ahobson]: https://github.com/ahobson
|
|
1884
|
+
[@alexandermendes]: https://github.com/alexandermendes
|
|
1885
|
+
[@andykenward]: https://github.com/andykenward
|
|
1871
1886
|
[@ashfurrow]: https://github.com/ashfurrow
|
|
1887
|
+
[@awgeorge]: https://github.com/awgeorge
|
|
1872
1888
|
[@azz]: https://github.com/azz
|
|
1889
|
+
[@bdotdub]: https://github.com/bdotdub
|
|
1890
|
+
[@bigkraig]: https://github.com/bigkraig
|
|
1873
1891
|
[@caffodian]: https://github.com/caffodian
|
|
1874
1892
|
[@codestergit]: https://github.com/codestergit
|
|
1875
1893
|
[@cwright017]: https://github.com/Cwright017
|
|
1876
1894
|
[@cysp]: https://github.com/cysp
|
|
1877
1895
|
[@danielrosenwasser]: https://github.com/DanielRosenwasser
|
|
1878
1896
|
[@davidbrunow]: https://github.com/davidbrunow
|
|
1897
|
+
[@davidhouweling]: https://github.com/davidhouweling
|
|
1898
|
+
[@dbgrandi]: https://github.com/dbgrandi
|
|
1899
|
+
[@dblandin]: https://github.com/dblandin
|
|
1900
|
+
[@denieler]: https://github.com/denieler
|
|
1879
1901
|
[@dfalling]: https://github.com/dfalling
|
|
1880
1902
|
[@dkundel]: https://github.com/dkundel
|
|
1903
|
+
[@doniyor2109]: https://github.com/doniyor2109
|
|
1904
|
+
[@ds300]: https://github.com/ds300
|
|
1881
1905
|
[@f-meloni]: https://github.com/f-meloni
|
|
1882
1906
|
[@fbartho]: https://github.com/fbartho
|
|
1907
|
+
[@flovilmart]: https://github.com/flovilmart
|
|
1908
|
+
[@friederbluemle]: https://github.com/friederbluemle
|
|
1883
1909
|
[@fwal]: https://github.com/fwal
|
|
1910
|
+
[@g3offrey]: https://github.com/g3offrey
|
|
1911
|
+
[@gantman]: https://github.com/gantman
|
|
1912
|
+
[@gpetrioli]: https:/github.com/gpetrioli
|
|
1913
|
+
[@gzaripov]: https://github.com/gzaripov
|
|
1914
|
+
[@hanneskaeufler]: https://github.com/hanneskaeufler
|
|
1884
1915
|
[@happylinks]: https://github.com/happylinks
|
|
1916
|
+
[@hellocore]: https://github.com/HelloCore
|
|
1917
|
+
[@hiroppy]: https://github.com/hiroppy
|
|
1885
1918
|
[@hmcc]: https://github.com/hmcc
|
|
1919
|
+
[@hmschreiner]: https://github.com/hmschreiner
|
|
1886
1920
|
[@hongrich]: https://github.com/hongrich
|
|
1887
|
-
[@
|
|
1921
|
+
[@igorbek]: https://github.com/igorbek
|
|
1922
|
+
[@iljadaderko]: https://github.com/IljaDaderko
|
|
1888
1923
|
[@imorente]: https://github.com/imorente
|
|
1924
|
+
[@jamiebuilds]: https://github.com/jamiebuilds
|
|
1925
|
+
[@jamime]: https://github.com/jamime
|
|
1889
1926
|
[@joarwilk]: https://github.com/joarwilk
|
|
1890
1927
|
[@johansteffner]: https://github.com/johansteffner
|
|
1891
1928
|
[@jonny133]: https://github.com/jonny133
|
|
1892
1929
|
[@joshacheson]: https://github.com/joshacheson
|
|
1930
|
+
[@jtreanor]: https://github.com/jtreanor
|
|
1893
1931
|
[@keplersj]: https://github.com/keplersj
|
|
1932
|
+
[@kesne]: https://github.com/kesne
|
|
1933
|
+
[@kristof0425]: https://github.com/kristof0425
|
|
1934
|
+
[@kwonoj]: https://github.com/kwonoj
|
|
1894
1935
|
[@langovoi]: https://github.com/langovoi
|
|
1936
|
+
[@lucasmpaim]: https://github.com/lucasmpaim
|
|
1937
|
+
[@macklinu]: https://github.com/macklinu
|
|
1938
|
+
[@markelog]: https://github.com/markelog
|
|
1939
|
+
[@melvinvermeer]: https://github.com/melvinvermeer
|
|
1895
1940
|
[@mifi]: https://github.com/ionutmiftode
|
|
1941
|
+
[@mlabrum]: https://github.com/mlabrum
|
|
1942
|
+
[@mmiszy]: https://github.com/mmiszy
|
|
1943
|
+
[@mrndjo]: https://github.com/mrndjo
|
|
1944
|
+
[@msteward]: https://github.com/msteward
|
|
1896
1945
|
[@mxstbr]: https://github.com/mxstbr
|
|
1946
|
+
[@nguyenhuy]: https://github.com/nguyenhuy
|
|
1897
1947
|
[@ninjaprox]: https://github.com/ninjaprox
|
|
1898
1948
|
[@nminhnguyen]: https://github.com/NMinhNguyen
|
|
1899
1949
|
[@nornagon]: https://github.com/nornagon
|
|
1950
|
+
[@notjosh]: https://github.com/notjosh
|
|
1900
1951
|
[@notmoni]: https://github.com/NotMoni
|
|
1952
|
+
[@orieken]: https://github.com/orieken
|
|
1901
1953
|
[@orta]: https://github.com/orta
|
|
1902
1954
|
[@osmestad]: https://github.com/osmestad
|
|
1955
|
+
[@ozzieorca]: https://github.com/ozzieorca
|
|
1956
|
+
[@parvez]: https:/github.com/parvez
|
|
1903
1957
|
[@patrickkempff]: https://github.com/patrickkempff
|
|
1958
|
+
[@paulmelnikow]: https://github.com/paulmelnikow
|
|
1904
1959
|
[@peterjgrainger]: https://github.com/peterjgrainger
|
|
1960
|
+
[@pgoudreau]: https://github.com/@pgoudreau
|
|
1961
|
+
[@pinkasey]: https://github.com/pinkasey
|
|
1962
|
+
[@pveyes]: https://github.com/pveyes
|
|
1905
1963
|
[@randak]: https://github.com/randak
|
|
1906
1964
|
[@ravanscafi]: https://github.com/ravanscafi
|
|
1965
|
+
[@rogerluan]: https://github.com/rogerluan
|
|
1907
1966
|
[@rohit-gohri]: https://github.com/rohit-gohri
|
|
1967
|
+
[@rouby]: https://github.com/rouby
|
|
1968
|
+
[@rzgry]: https://github.com/rzgry
|
|
1908
1969
|
[@sajjadzamani]: https://github.com/sajjadzamani
|
|
1970
|
+
[@sandratatarevicova]: https://github.com/sandratatarevicova
|
|
1909
1971
|
[@sebinsua]: https://github.com/sebinsua
|
|
1910
1972
|
[@sgtcoolguy]: https://github.com/sgtcoolguy
|
|
1911
1973
|
[@sharkysharks]: https://github.com/sharkysharks
|
|
1974
|
+
[@shyim]: https://github.com/shyim
|
|
1912
1975
|
[@sogame]: https://github.com/sogame
|
|
1976
|
+
[@soyn]: https://github.com/Soyn
|
|
1977
|
+
[@stefanbuck]: https://github.com/stefanbuck
|
|
1978
|
+
[@steprescott]: https://github.com/steprescott
|
|
1913
1979
|
[@stevemoser]: https://github.com/stevemoser
|
|
1914
1980
|
[@stevenp]: https://github.com/stevenp
|
|
1915
1981
|
[@sunshinejr]: https://github.com/sunshinejr
|
|
1982
|
+
[@thii]: https://github.com/thii
|
|
1983
|
+
[@tibdex]: https://github.com/tibdex
|
|
1984
|
+
[@tim3trick]: https://github.com/tim3trick
|
|
1916
1985
|
[@tychota]: https://github.com/tychota
|
|
1917
1986
|
[@urkle]: https://github.com/urkle
|
|
1987
|
+
[@valscion]: https://github.com/valscion
|
|
1988
|
+
[@wardpeet]: https://github.com/wardpeet
|
|
1989
|
+
[@watchinharrison]: https://github.com/watchinharrison
|
|
1918
1990
|
[@wizardishungry]: https://github.com/wizardishungry
|
|
1919
|
-
[@
|
|
1920
|
-
[@
|
|
1921
|
-
[
|
|
1922
|
-
[
|
|
1923
|
-
[@mrndjo]: https://github.com/mrndjo
|
|
1924
|
-
[@bigkraig]: https://github.com/bigkraig
|
|
1925
|
-
[@notjosh]: https://github.com/notjosh
|
|
1926
|
-
[@iljadaderko]: https://github.com/IljaDaderko
|
|
1927
|
-
[@417-72ki]: https://github.com/417-72KI
|
|
1928
|
-
[@soyn]: https://github.com/Soyn
|
|
1929
|
-
[@tim3trick]: https://github.com/tim3trick
|
|
1930
|
-
[@doniyor2109]: https://github.com/doniyor2109
|
|
1931
|
-
[@alexandermendes]: https://github.com/alexandermendes
|
|
1932
|
-
[@jamiebuilds]: https://github.com/jamiebuilds
|
|
1933
|
-
[@hmschreiner]: https://github.com/hmschreiner
|
|
1934
|
-
[@g3offrey]: https://github.com/g3offrey
|
|
1935
|
-
[@denieler]: https://github.com/denieler
|
|
1991
|
+
[@yohix]: https://github.com/yohix
|
|
1992
|
+
[@zdenektopic]: https://github.com/zdenektopic
|
|
1993
|
+
[danger-go]: https://github.com/bdotdub/danger-go
|
|
1994
|
+
[danger-swift]: https://github.com/danger/danger-swift#danger-swift
|
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ an invite, ping [@Orta](https://twitter.com/orta/) a DM on Twitter with your ema
|
|
|
112
112
|
to stay on top of Danger without all the emails from GitHub.
|
|
113
113
|
|
|
114
114
|
> This project is open source under the MIT license, which means you have full access to the source code and can modify
|
|
115
|
-
> it to fit your own needs.
|
|
115
|
+
> it to fit your own needs but don't have access to deploy.
|
|
116
116
|
>
|
|
117
117
|
> This project subscribes to the [Moya Contributors Guidelines](https://github.com/Moya/contributors) which TLDR: means
|
|
118
118
|
> we give out push access easily and often.
|
package/SECURITY.md
ADDED
|
@@ -15,4 +15,4 @@ export declare function retryableFetch(url: string | node_fetch.Request, init: n
|
|
|
15
15
|
* @param {fetch.RequestInit} [init] the usual options
|
|
16
16
|
* @returns {Promise<fetch.Response>} network-y promise
|
|
17
17
|
*/
|
|
18
|
-
export declare function api(url: string | node_fetch.Request, init: node_fetch.RequestInit, suppressErrorReporting?: boolean,
|
|
18
|
+
export declare function api(url: string | node_fetch.Request, init: node_fetch.RequestInit, suppressErrorReporting?: boolean, processEnv?: NodeJS.ProcessEnv): Promise<node_fetch.Response>;
|
|
@@ -121,13 +121,13 @@ exports.retryableFetch = retryableFetch;
|
|
|
121
121
|
* @param {fetch.RequestInit} [init] the usual options
|
|
122
122
|
* @returns {Promise<fetch.Response>} network-y promise
|
|
123
123
|
*/
|
|
124
|
-
function api(url, init, suppressErrorReporting,
|
|
124
|
+
function api(url, init, suppressErrorReporting, processEnv) {
|
|
125
125
|
var _this = this;
|
|
126
|
-
if (
|
|
126
|
+
if (processEnv === void 0) { processEnv = process.env; }
|
|
127
127
|
var isTests = typeof jest !== "undefined";
|
|
128
128
|
if (isTests && !url.toString().includes("localhost")) {
|
|
129
129
|
var message = "No API calls in tests please: ".concat(url);
|
|
130
|
-
debugger;
|
|
130
|
+
debugger;
|
|
131
131
|
throw new Error(message);
|
|
132
132
|
}
|
|
133
133
|
if (global.verbose && global.verbose === true) {
|
|
@@ -135,8 +135,8 @@ function api(url, init, suppressErrorReporting, provessEnv) {
|
|
|
135
135
|
if (init.method) {
|
|
136
136
|
output.push("-X ".concat(init.method));
|
|
137
137
|
}
|
|
138
|
-
var showToken =
|
|
139
|
-
var token =
|
|
138
|
+
var showToken = processEnv["DANGER_VERBOSE_SHOW_TOKEN"];
|
|
139
|
+
var token = processEnv["DANGER_GITHUB_API_TOKEN"] || processEnv["GITHUB_TOKEN"];
|
|
140
140
|
if (init.headers) {
|
|
141
141
|
for (var prop in init.headers) {
|
|
142
142
|
if (init.headers.hasOwnProperty(prop)) {
|
|
@@ -159,7 +159,7 @@ function api(url, init, suppressErrorReporting, provessEnv) {
|
|
|
159
159
|
d(output.join(" "));
|
|
160
160
|
}
|
|
161
161
|
var agent = init.agent;
|
|
162
|
-
var proxy =
|
|
162
|
+
var proxy = processEnv["HTTPS_PROXY"] || processEnv["https_proxy"] || processEnv["HTTP_PROXY"] || processEnv["http_proxy"];
|
|
163
163
|
if (!agent && proxy) {
|
|
164
164
|
var secure = url.toString().startsWith("https");
|
|
165
165
|
init.agent = secure ? new https_proxy_agent_1.default(proxy) : new http_proxy_agent_1.default(proxy);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../source/api/fetch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,qDAAwC;AAExC,sEAA6C;AAC7C,wEAA+C;AAE/C,4DAAoC;AAEpC,IAAM,CAAC,GAAG,IAAA,aAAK,EAAC,YAAY,CAAC,CAAA;AAG7B,IAAM,MAAM,GAAG,OAAO,IAAI,KAAK,WAAW,CAAA;AAC1C,IAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,cAAM,OAAA,EAAE,EAAF,CAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAA;AAE7C,IAAM,kBAAkB,GAAG,UAAC,GAAwB;IAClD,qFAAqF;IACrF,mFAAmF;IACnF,OAAO,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,CAAA;AACvE,CAAC,CAAA;AAED;;;;;;GAMG;AACH,SAAsB,cAAc,CAClC,GAAgC,EAChC,IAA4B;;;;;YAEtB,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YAC9B,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E,EAAA;;oBAA1C,YAAY,GAAG,SAA2B;;;;oBAGvB,qBAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,EAAA;;oBAAxD,YAAY,GAAG,SAAyC;oBAC9D,IAAI,CAAC,oBAAa,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,CAAE,CAAC,CAAA;;;;oBAE7D,IAAI,CAAC,oBAAa,YAAY,CAAE,CAAC,CAAA;;wBAIrC,sBAAO,QAAQ,EAAA;;;SAChB,CAAC,CAAA;AACJ,CAAC;AA3ED,kBA2EC"}
|
|
@@ -98,7 +98,8 @@ function getCISourceForExternal(env, modulePath) {
|
|
|
98
98
|
console.error("could not load CI provider at ".concat(modulePath, " due to ").concat(error));
|
|
99
99
|
}
|
|
100
100
|
if (stat && stat.isFile()) {
|
|
101
|
-
|
|
101
|
+
// eslint-disable-next-line
|
|
102
|
+
var externalModule = require(path); // @typescript-eslint/no-var-requires @typescript-eslint/no-require-imports
|
|
102
103
|
var moduleConstructor = externalModule.default || externalModule;
|
|
103
104
|
resolve(new moduleConstructor(env));
|
|
104
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_ci_source.js","sourceRoot":"","sources":["../../source/ci_source/get_ci_source.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAuC;AACvC,qCAAwB;AACxB,6BAA8B;AAG9B;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,GAAQ;IACxC,IAAM,kBAAkB,GAAG,kBAAK,qBAAiB,QAAE,GAAG,CAAC,UAAA,QAAQ,IAAI,OAAA,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAjB,CAAiB,CAAC,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,IAAI,EAAN,CAAM,CAAC,CAAA;IACzG,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removePreviousComments: app.removePreviousComments || false,
|
|
106
106
|
};
|
|
107
|
-
processName = (app.process && (0, runDangerSubprocess_1.
|
|
107
|
+
processName = (app.process && (0, runDangerSubprocess_1.addSubprocessCallArguments)(app.process.split(" "))) || undefined;
|
|
108
108
|
runnerCommand = processName || (0, dangerRunToRunnerCLI_1.default)(process.argv);
|
|
109
109
|
d("Preparing to run: ".concat(runnerCommand));
|
|
110
110
|
runConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../../source/commands/ci/runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,qCAAmC;AAEnC,qDAAsE;AACtE,kDAAiE;AACjE,
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../../source/commands/ci/runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,qCAAmC;AAEnC,qDAAsE;AACtE,kDAAiE;AACjE,oEAA8F;AAE9F,mFAA4D;AAE5D,uEAAsD;AACtD,0DAA4D;AAC5D,uFAAgE;AAEhE,yBAAiC;AACjC,6BAA2B;AAE3B,IAAM,CAAC,GAAG,IAAA,aAAK,EAAC,gBAAgB,CAAC,CAAA;AAW1B,IAAM,SAAS,GAAG,UAAO,GAAc,EAAE,MAA8B;;;;;gBACtE,iBAAiB,GAAG,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,uBAAuB,CAAC,EAAE,MAAM,CAAC,CAAA;gBAChF,OAAO,GAAK,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,QAAlC,CAAkC;gBACjD,CAAC,CAAC,oCAA6B,OAAO,CAAE,CAAC,CAAA;gBACzC,CAAC,CAAC,0BAA0B,CAAC,CAAA;gBAEvB,YAAY,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,CAAA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BAC5B,aAAa,EAAE,GAAG,CAAC,aAAa,IAAI,KAAK;oBACzC,0BAA0B,EAAE,CAAC,GAAG,CAAC,eAAe;oBAChD,YAAY,EAAE,GAAG,CAAC,YAAY;oBAC9B,cAAc,EAAE,CAAC,GAAG,CAAC,YAAY;oBACjC,uBAAuB,EAAE,GAAG,CAAC,uBAAuB;oBACpD,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,KAAK;oBACnC,sBAAsB,EAAE,GAAG,CAAC,sBAAsB,IAAI,KAAK;iBAC5D,CAAA;gBAEK,WAAW,GAAG,CAAC,GAAG,CAAC,OAAO,IAAI,IAAA,gDAA0B,EAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,SAAS,CAAA;gBAC9F,aAAa,GAAG,WAAW,IAAI,IAAA,8BAAoB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAA;gBACvE,CAAC,CAAC,4BAAqB,aAAa,CAAE,CAAC,CAAA;gBAIjC,SAAS,GAAiB;oBAC9B,MAAM,QAAA;oBACN,QAAQ,UAAA;oBACR,iBAAiB,EAAE,CAAC,MAAM,IAAI,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE;iBAC9D,CAAA;gBAGK,IAAI,GAAG,IAAI,mBAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,gBAAY,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;gBAC9E,IAAA,yCAAmB,EAAC,aAAa,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;;;;;KAGvE,CAAA;AAjEY,QAAA,SAAS,aAiErB"}
|
|
@@ -13,12 +13,12 @@ commander_1.default
|
|
|
13
13
|
.usage("[options]")
|
|
14
14
|
.description("Runs danger without PR metadata, useful for git hooks.")
|
|
15
15
|
.option("-s, --staging", "Just use staged changes.")
|
|
16
|
-
.option("-b, --base [branch_name]", "Use a different base branch")
|
|
16
|
+
.option("-b, --base [branch_name]", "Use a different base branch", "master")
|
|
17
17
|
.option("-j, --outputJSON", "Outputs the resulting JSON to STDOUT")
|
|
18
18
|
.allowUnknownOption(true);
|
|
19
19
|
(0, sharedDangerfileArgs_1.default)(commander_1.default).parse(process.argv);
|
|
20
20
|
var app = commander_1.default;
|
|
21
|
-
var base = app.base
|
|
21
|
+
var base = app.base;
|
|
22
22
|
var localPlatform = new LocalGit_1.LocalGit({ base: base, staging: app.staging });
|
|
23
23
|
localPlatform.validateThereAreChanges().then(function (changes) {
|
|
24
24
|
if (changes) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"danger-local.js","sourceRoot":"","sources":["../../source/commands/danger-local.ts"],"names":[],"mappings":";;;;;;AAEA,wDAA+B;AAE/B,sFAAuE;AACvE,sCAAuC;AACvC,kDAAgD;AAChD,oDAAoD;AASpD,mBAAO;KACJ,KAAK,CAAC,WAAW,CAAC;KAClB,WAAW,CAAC,wDAAwD,CAAC;KACrE,MAAM,CAAC,eAAe,EAAE,0BAA0B,CAAC;KACnD,MAAM,CAAC,0BAA0B,EAAE,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"danger-local.js","sourceRoot":"","sources":["../../source/commands/danger-local.ts"],"names":[],"mappings":";;;;;;AAEA,wDAA+B;AAE/B,sFAAuE;AACvE,sCAAuC;AACvC,kDAAgD;AAChD,oDAAoD;AASpD,mBAAO;KACJ,KAAK,CAAC,WAAW,CAAC;KAClB,WAAW,CAAC,wDAAwD,CAAC;KACrE,MAAM,CAAC,eAAe,EAAE,0BAA0B,CAAC;KACnD,MAAM,CAAC,0BAA0B,EAAE,6BAA6B,EAAE,QAAQ,CAAC;KAC3E,MAAM,CAAC,kBAAkB,EAAE,sCAAsC,CAAC;KAClE,kBAAkB,CAAC,IAAI,CAAC,CAAA;AAC3B,IAAA,8BAAa,EAAC,mBAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;AAE1C,IAAM,GAAG,GAAI,mBAAsB,CAAA;AACnC,IAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;AAErB,IAAM,aAAa,GAAG,IAAI,mBAAQ,CAAC,EAAE,IAAI,MAAA,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAA;AAClE,aAAa,CAAC,uBAAuB,EAAE,CAAC,IAAI,CAAC,UAAA,OAAO;IAClD,IAAI,OAAO,EAAE;QACX,IAAM,UAAU,GAAG,IAAI,aAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAC1C,uEAAuE;QACvE,wDAAwD;QACxD,IAAA,kBAAS,EAAC,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,EAAE,CAAC,CAAA;KAClH;SAAM;QACL,OAAO,CAAC,GAAG,CAAC,mDAA4C,IAAI,MAAG,CAAC,CAAA;KACjE;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -57,8 +57,6 @@ var path_1 = require("path");
|
|
|
57
57
|
var d = (0, debug_1.debug)("runner");
|
|
58
58
|
// Given the nature of this command, it can be tricky to test, so I use a command like this:
|
|
59
59
|
//
|
|
60
|
-
// tslint:disable-next-line:max-line-length
|
|
61
|
-
//
|
|
62
60
|
// yarn build; cat source/_tests/fixtures/danger-js-pr-395.json | env DANGER_FAKE_CI="YEP" DANGER_TEST_REPO='danger/danger-js' DANGER_TEST_PR='395' node distribution/commands/danger-runner.js --text-only
|
|
63
61
|
//
|
|
64
62
|
// Which will build danger, then run just the dangerfile runner with a fixtured version of the JSON
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"danger-runner.js","sourceRoot":"","sources":["../../source/commands/danger-runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sFAAuE;AACvE,8DAAsC;AAEtC,wDAA+B;AAC/B,kCAAgC;AAChC,wDAAgC;AAChC,g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,SAAS,CAAC,MAAM,gBAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,gBAAM,OAAO,CAAC,KAAK,CAAC,MAAM,gBACvF,OAAO,CAAC,QAAQ,CAAC,MAAM,CACvB,CACH,CAAA;IACD,IAAI,QAAQ,EAAE;QACZ,IAAM,WAAW,GAAG,IAAA,WAAI,EAAC,IAAA,WAAM,GAAE,EAAE,qBAAqB,CAAC,CAAA;QACzD,CAAC,CAAC,+BAAwB,WAAW,CAAE,CAAC,CAAA;QACxC,IAAA,kBAAa,EAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;QACpE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,GAAG,WAAW,CAAC,CAAA;KACvD;AACH,CAAC,CAAC,CAAA;AAEF,wEAAwE;AACxE,UAAU,CAAC;IACT,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC,CAAA;QAChF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAA;QACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KAChB;AACH,CAAC,EAAE,IAAI,CAAC,CAAA;AAER,qCAAqC;AACrC,IAAA,mBAAQ,GAAE,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAc,CAAC,CAAC,CAAA"}
|
|
@@ -61,7 +61,7 @@ var generateDefaultDangerfile = function (state) {
|
|
|
61
61
|
exports.generateDefaultDangerfile = generateDefaultDangerfile;
|
|
62
62
|
var formatDangerfile = function (dangerfile, dangerfileState) {
|
|
63
63
|
if (dangerfileState.hasPrettier) {
|
|
64
|
-
//
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
65
65
|
var format = require("prettier").format;
|
|
66
66
|
// Get package settings
|
|
67
67
|
var localPrettier = fs.existsSync("package.json") && JSON.parse(fs.readFileSync("package.json", "utf8")).prettier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-dangerfile.js","sourceRoot":"","sources":["../../../source/commands/init/default-dangerfile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAwB;AAGxB,IAAM,uBAAuB,GAAG,cAAM,OAAA,CAAC;IACrC,YAAY,EAAE,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC;IAC3C,qBAAqB,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;IACvE,WAAW,EAAE,EAAE,CAAC,UAAU,CAAC,4BAA4B,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,gCAAgC,CAAC;IAC3G,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,wBAAwB,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,4BAA4B,CAAC;CAChG,CAAC,EALoC,CAKpC,CAAA;AAEK,IAAM,yBAAyB,GAAG,UAAC,KAAgB;IACxD,IAAM,eAAe,GAAG,uBAAuB,EAAE,CAAA;IACjD,IAAI,KAAK,GAAa,EAAE,CAAA;IAExB,KAAK,CAAC,IAAI,CAAC,uBAAe,CAAC,CAAA;IAE3B,IAAI,eAAe,CAAC,YAAY,EAAE;QAChC,KAAK,CAAC,IAAI,CAAC,qBAAa,CAAC,CAAA;KAC1B;IAED,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;QACtB,KAAK,CAAC,IAAI,CAAC,qBAAa,CAAC,CAAA;KAC1B;IAED,IAAI,eAAe,CAAC,qBAAqB,IAAI,eAAe,CAAC,OAAO,EAAE;QACpE,IAAM,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAA;QAC7D,IAAM,MAAM,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC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AC,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAA;QACnH,sBAAsB;QACtB,IAAM,MAAM,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,CAAA;QACrC,IAAM,QAAQ,GAAG,aAAa,CAAC,CAAC,uBAAM,MAAM,GAAK,aAAa,EAAG,CAAC,CAAC,MAAM,CAAA;QAEzE,OAAO,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;KACpC;SAAM;QACL,OAAO,UAAU,CAAA;KAClB;AACH,CAAC,CAAA;AAdY,QAAA,gBAAgB,oBAc5B;AAEM,IAAM,YAAY,GAAG,UAAC,KAAgB;IAC3C,IAAI,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,OAAO,EAAE;QACvC,OAAO,qCAAqC,CAAA;KAC7C;SAAM;QACL,OAAO,0CAA0C,CAAA;KAClD;AACH,CAAC,CAAA;AANY,QAAA,YAAY,gBAMxB;AAEY,QAAA,aAAa,GAAG,+UAS5B,CAAA;AAEY,QAAA,eAAe,GAAG,uLAK9B,CAAA;AAEY,QAAA,aAAa,GAAG,4MAK5B,CAAA;AACD,8BAA8B;AACvB,IAAM,wBAAwB,GAAG,UAAC,GAAW,EAAE,KAAa,IAAK,OAAA,kCAChD,GAAG,iLAE6B,GAAG,0EACF,KAAK,iJAK7D,EATuE,CASvE,CAAA;AATY,QAAA,wBAAwB,4BASpC"}
|
|
@@ -15,10 +15,10 @@ export interface InitState {
|
|
|
15
15
|
isGitHub: boolean;
|
|
16
16
|
}
|
|
17
17
|
export interface InitUI {
|
|
18
|
-
header: (msg:
|
|
18
|
+
header: (msg: string) => void;
|
|
19
19
|
command: (command: string) => void;
|
|
20
|
-
say: (msg:
|
|
21
|
-
pause: (secs: number) => Promise<
|
|
20
|
+
say: (msg: string) => void;
|
|
21
|
+
pause: (secs: number) => Promise<unknown>;
|
|
22
22
|
waitForReturn: () => void;
|
|
23
23
|
link: (name: string, href: string) => string;
|
|
24
24
|
askWithAnswers: (message: string, answers: string[]) => string;
|
|
@@ -2,6 +2,7 @@ import { DangerDSLJSONType } from "../../dsl/DangerDSL";
|
|
|
2
2
|
import { Executor } from "../../runner/Executor";
|
|
3
3
|
import { RunnerConfig } from "../ci/runner";
|
|
4
4
|
export declare const prepareDangerDSL: (dangerDSL: DangerDSLJSONType) => string;
|
|
5
|
+
export declare const addSubprocessCallArguments: (call: string[], args?: string[]) => string[];
|
|
5
6
|
export declare const addSubprocessCallAguments: (call: string[], args?: string[]) => string[];
|
|
6
7
|
export declare const runDangerSubprocess: (subprocessName: string[], dslJSON: DangerDSLJSONType, exec: Executor, config: RunnerConfig) => void;
|
|
7
8
|
export default runDangerSubprocess;
|
|
@@ -47,7 +47,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.runDangerSubprocess = exports.addSubprocessCallAguments = exports.prepareDangerDSL = void 0;
|
|
50
|
+
exports.runDangerSubprocess = exports.addSubprocessCallAguments = exports.addSubprocessCallArguments = exports.prepareDangerDSL = void 0;
|
|
51
51
|
var debug_1 = require("../../debug");
|
|
52
52
|
var path_1 = require("path");
|
|
53
53
|
var child_process_1 = require("child_process");
|
|
@@ -62,6 +62,7 @@ var messageToSendDSL = "danger://send-dsl";
|
|
|
62
62
|
// Sanitizes the DSL so for sending via STDOUT
|
|
63
63
|
var prepareDangerDSL = function (dangerDSL) {
|
|
64
64
|
if (dangerDSL.github && dangerDSL.github.api) {
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
65
66
|
// @ts-ignore
|
|
66
67
|
delete dangerDSL.github.api;
|
|
67
68
|
}
|
|
@@ -69,11 +70,13 @@ var prepareDangerDSL = function (dangerDSL) {
|
|
|
69
70
|
return JSON.stringify(dangerJSONOutput, null, " ") + "\n";
|
|
70
71
|
};
|
|
71
72
|
exports.prepareDangerDSL = prepareDangerDSL;
|
|
72
|
-
var
|
|
73
|
+
var addSubprocessCallArguments = function (call, args) {
|
|
73
74
|
if (args === void 0) { args = process.argv; }
|
|
74
75
|
return call.concat(["runner"], args.slice(1, args.length));
|
|
75
76
|
};
|
|
76
|
-
exports.
|
|
77
|
+
exports.addSubprocessCallArguments = addSubprocessCallArguments;
|
|
78
|
+
// @deprecated
|
|
79
|
+
exports.addSubprocessCallAguments = exports.addSubprocessCallArguments;
|
|
77
80
|
// Runs the Danger process
|
|
78
81
|
var runDangerSubprocess = function (subprocessName, dslJSON, exec, config) {
|
|
79
82
|
var processName = subprocessName[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runDangerSubprocess.js","sourceRoot":"","sources":["../../../source/commands/utils/runDangerSubprocess.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAmC;AACnC,6BAAqC;AACrC,+CAAqC;AAIrC,oDAAkD;AAClD,yCAA4E;AAC5E,yBAA4D;AAE5D,yBAA2B;AAE3B,IAAM,CAAC,GAAG,IAAA,aAAK,EAAC,qBAAqB,CAAC,CAAA;AAEtC,kEAAkE;AAClE,8BAA8B;AAC9B,IAAM,gBAAgB,GAAG,mBAAmB,CAAA;AAE5C,8CAA8C;AACvC,IAAM,gBAAgB,GAAG,UAAC,SAA4B;IAC3D,IAAI,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE;QAC5C,aAAa;QACb,OAAO,SAAS,CAAC,MAAM,CAAC,GAAG,CAAA;KAC5B;IAED,IAAM,gBAAgB,GAAe,EAAE,MAAM,EAAE,SAAS,EAAE,CAAA;IAC1D,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAA;AAC5D,CAAC,CAAA;
|
|
1
|
+
{"version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