zarro 1.92.0

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.
Files changed (201) hide show
  1. package/LICENSE +10 -0
  2. package/README.md +260 -0
  3. package/gulp-tasks/.editorconfig +8 -0
  4. package/gulp-tasks/.git +1 -0
  5. package/gulp-tasks/.gitignore +9 -0
  6. package/gulp-tasks/.gitmodules +0 -0
  7. package/gulp-tasks/LICENSE +24 -0
  8. package/gulp-tasks/README.md +144 -0
  9. package/gulp-tasks/build.js +135 -0
  10. package/gulp-tasks/clean.js +37 -0
  11. package/gulp-tasks/cover-dotnet.js +56 -0
  12. package/gulp-tasks/default-report-generator.js +51 -0
  13. package/gulp-tasks/default-tools-installer.js +33 -0
  14. package/gulp-tasks/default.js +17 -0
  15. package/gulp-tasks/dotnet-publish.js +23 -0
  16. package/gulp-tasks/generate-reports.js +7 -0
  17. package/gulp-tasks/get-local-nuget.js +16 -0
  18. package/gulp-tasks/git-submodules.js +83 -0
  19. package/gulp-tasks/increment-package-json-version.js +12 -0
  20. package/gulp-tasks/increment-package-json-version.ts +17 -0
  21. package/gulp-tasks/install-tools.js +24 -0
  22. package/gulp-tasks/modules/add-stream-on-any-handler.js +31 -0
  23. package/gulp-tasks/modules/alter-package-json-version.js +64 -0
  24. package/gulp-tasks/modules/alter-package-json-version.ts +113 -0
  25. package/gulp-tasks/modules/are-all-dotnet-core.js +96 -0
  26. package/gulp-tasks/modules/ask.js +31 -0
  27. package/gulp-tasks/modules/ask.ts +41 -0
  28. package/gulp-tasks/modules/collect-files.js +15 -0
  29. package/gulp-tasks/modules/collect-files.ts +16 -0
  30. package/gulp-tasks/modules/config-generator.js +10 -0
  31. package/gulp-tasks/modules/defaults.js +9 -0
  32. package/gulp-tasks/modules/download-nuget.js +104 -0
  33. package/gulp-tasks/modules/ensure-folder-exists.js +21 -0
  34. package/gulp-tasks/modules/env-helpers.js +49 -0
  35. package/gulp-tasks/modules/env-helpers.ts +67 -0
  36. package/gulp-tasks/modules/env.js +364 -0
  37. package/gulp-tasks/modules/exec.js +257 -0
  38. package/gulp-tasks/modules/exec.ts +346 -0
  39. package/gulp-tasks/modules/fail-after.js +30 -0
  40. package/gulp-tasks/modules/fail-after.ts +34 -0
  41. package/gulp-tasks/modules/fallback.js +6 -0
  42. package/gulp-tasks/modules/find-dirs.js +39 -0
  43. package/gulp-tasks/modules/find-local-nuget.js +42 -0
  44. package/gulp-tasks/modules/find-npm-base.js +42 -0
  45. package/gulp-tasks/modules/fs.js +79 -0
  46. package/gulp-tasks/modules/gather-paths.js +23 -0
  47. package/gulp-tasks/modules/gather-paths.ts +29 -0
  48. package/gulp-tasks/modules/generate-env-help-for.js +30 -0
  49. package/gulp-tasks/modules/get-tools-folder.js +12 -0
  50. package/gulp-tasks/modules/git-push-tags.js +33 -0
  51. package/gulp-tasks/modules/git-push-tags.ts +42 -0
  52. package/gulp-tasks/modules/git-push.js +51 -0
  53. package/gulp-tasks/modules/git-tag.js +36 -0
  54. package/gulp-tasks/modules/gulp-dotnetcover.js +537 -0
  55. package/gulp-tasks/modules/gulp-git-tag-from-csproj.js +50 -0
  56. package/gulp-tasks/modules/gulp-git-tag-from-csproj.ts +71 -0
  57. package/gulp-tasks/modules/gulp-git-tag-from-package-nuspec.js +55 -0
  58. package/gulp-tasks/modules/gulp-increment-nuget-package-dependency-version.js +40 -0
  59. package/gulp-tasks/modules/gulp-increment-nuget-package-version.js +87 -0
  60. package/gulp-tasks/modules/gulp-increment-nuget-package-version.ts +122 -0
  61. package/gulp-tasks/modules/gulp-msbuild.js +1 -0
  62. package/gulp-tasks/modules/gulp-npm-run.js +40 -0
  63. package/gulp-tasks/modules/gulp-npm-run.ts +52 -0
  64. package/gulp-tasks/modules/gulp-nuget-pack.js +168 -0
  65. package/gulp-tasks/modules/gulp-nuget-restore.js +106 -0
  66. package/gulp-tasks/modules/gulp-nunit-runner/.jshintrc +5 -0
  67. package/gulp-tasks/modules/gulp-nunit-runner/.npmignore +16 -0
  68. package/gulp-tasks/modules/gulp-nunit-runner/LICENSE +21 -0
  69. package/gulp-tasks/modules/gulp-nunit-runner/README.md +300 -0
  70. package/gulp-tasks/modules/gulp-nunit-runner/index.js +1 -0
  71. package/gulp-tasks/modules/gulp-nunit-runner/lib/index.js +205 -0
  72. package/gulp-tasks/modules/gulp-nunit-runner/lib/teamcity.js +86 -0
  73. package/gulp-tasks/modules/gulp-purge.js +88 -0
  74. package/gulp-tasks/modules/gulp-util.js +5 -0
  75. package/gulp-tasks/modules/gulp-version.js +8 -0
  76. package/gulp-tasks/modules/gulp-with-help.js +1 -0
  77. package/gulp-tasks/modules/gulp-xbuild.js +62 -0
  78. package/gulp-tasks/modules/gulp.js +92 -0
  79. package/gulp-tasks/modules/http-downloader.js +113 -0
  80. package/gulp-tasks/modules/import-npm-tasks.js +33 -0
  81. package/gulp-tasks/modules/increment-version-string.js +18 -0
  82. package/gulp-tasks/modules/increment-version.js +30 -0
  83. package/gulp-tasks/modules/increment-version.ts +41 -0
  84. package/gulp-tasks/modules/install-local-tools.js +122 -0
  85. package/gulp-tasks/modules/load-xml-file.js +12 -0
  86. package/gulp-tasks/modules/load-xml-file.ts +15 -0
  87. package/gulp-tasks/modules/log-config.js +31 -0
  88. package/gulp-tasks/modules/log.js +142 -0
  89. package/gulp-tasks/modules/longest-string-length.js +13 -0
  90. package/gulp-tasks/modules/looks-like-a-promise.js +11 -0
  91. package/gulp-tasks/modules/ls-r.js +52 -0
  92. package/gulp-tasks/modules/multi-split.js +29 -0
  93. package/gulp-tasks/modules/net-framework-test-assembly-filter.js +45 -0
  94. package/gulp-tasks/modules/nuget-push.js +66 -0
  95. package/gulp-tasks/modules/nuget-update-self.js +9 -0
  96. package/gulp-tasks/modules/nuget.js +8 -0
  97. package/gulp-tasks/modules/nuget.ts +14 -0
  98. package/gulp-tasks/modules/pad-left.js +4 -0
  99. package/gulp-tasks/modules/pad-right.js +4 -0
  100. package/gulp-tasks/modules/pad.js +25 -0
  101. package/gulp-tasks/modules/parse-xml-string.js +5 -0
  102. package/gulp-tasks/modules/parse-xml-string.ts +6 -0
  103. package/gulp-tasks/modules/parse-xml.js +14 -0
  104. package/gulp-tasks/modules/parse-xml.ts +15 -0
  105. package/gulp-tasks/modules/path-unquote.js +6 -0
  106. package/gulp-tasks/modules/promisify-function.js +19 -0
  107. package/gulp-tasks/modules/promisify-function.ts +18 -0
  108. package/gulp-tasks/modules/promisify-stream.js +73 -0
  109. package/gulp-tasks/modules/promisify.js +1 -0
  110. package/gulp-tasks/modules/quote-if-required.js +14 -0
  111. package/gulp-tasks/modules/read-all-git-branches.js +10 -0
  112. package/gulp-tasks/modules/read-all-git-branches.ts +13 -0
  113. package/gulp-tasks/modules/read-all-git-remotes.js +36 -0
  114. package/gulp-tasks/modules/read-all-git-remotes.ts +44 -0
  115. package/gulp-tasks/modules/read-csproj-package-version.js +16 -0
  116. package/gulp-tasks/modules/read-csproj-package-version.ts +26 -0
  117. package/gulp-tasks/modules/read-csproj-version.js +16 -0
  118. package/gulp-tasks/modules/read-csproj-version.ts +26 -0
  119. package/gulp-tasks/modules/read-current-git-branch.js +12 -0
  120. package/gulp-tasks/modules/read-current-git-branch.ts +16 -0
  121. package/gulp-tasks/modules/read-git-commit-delta-count.js +21 -0
  122. package/gulp-tasks/modules/read-git-commit-delta-count.ts +33 -0
  123. package/gulp-tasks/modules/read-git-info.js +28 -0
  124. package/gulp-tasks/modules/read-git-info.ts +31 -0
  125. package/gulp-tasks/modules/read-git-remote.js +17 -0
  126. package/gulp-tasks/modules/read-git-remote.ts +23 -0
  127. package/gulp-tasks/modules/read-last-fetch-time.js +21 -0
  128. package/gulp-tasks/modules/read-last-fetch-time.ts +17 -0
  129. package/gulp-tasks/modules/read-main-branch-name.js +48 -0
  130. package/gulp-tasks/modules/read-main-branch-name.ts +76 -0
  131. package/gulp-tasks/modules/read-nuspec-version.js +14 -0
  132. package/gulp-tasks/modules/read-nuspec-version.ts +22 -0
  133. package/gulp-tasks/modules/read-package-json.js +16 -0
  134. package/gulp-tasks/modules/read-package-json.ts +22 -0
  135. package/gulp-tasks/modules/read-package-version.js +8 -0
  136. package/gulp-tasks/modules/read-package-version.ts +10 -0
  137. package/gulp-tasks/modules/read-text-file.js +14 -0
  138. package/gulp-tasks/modules/read-text-file.ts +14 -0
  139. package/gulp-tasks/modules/reduce-gulp-noise.js +34 -0
  140. package/gulp-tasks/modules/register-environment-variables.js +526 -0
  141. package/gulp-tasks/modules/require-module.js +28 -0
  142. package/gulp-tasks/modules/resolve-git-branch.js +11 -0
  143. package/gulp-tasks/modules/resolve-git-branch.ts +13 -0
  144. package/gulp-tasks/modules/resolve-git-remote.js +11 -0
  145. package/gulp-tasks/modules/resolve-git-remote.ts +13 -0
  146. package/gulp-tasks/modules/resolve-masks.js +47 -0
  147. package/gulp-tasks/modules/resolve-nuget.js +135 -0
  148. package/gulp-tasks/modules/resolve-test-masks.js +10 -0
  149. package/gulp-tasks/modules/rewrite-file.js +26 -0
  150. package/gulp-tasks/modules/rewrite-file.ts +34 -0
  151. package/gulp-tasks/modules/rimraf.js +21 -0
  152. package/gulp-tasks/modules/rimraf.ts +31 -0
  153. package/gulp-tasks/modules/run-sequence.js +16 -0
  154. package/gulp-tasks/modules/safe-git.js +23 -0
  155. package/gulp-tasks/modules/safe-git.ts +23 -0
  156. package/gulp-tasks/modules/seed.js +12 -0
  157. package/gulp-tasks/modules/set-task-name.js +9 -0
  158. package/gulp-tasks/modules/sleep.js +5 -0
  159. package/gulp-tasks/modules/spawn-nuget.js +13 -0
  160. package/gulp-tasks/modules/spawn.js +103 -0
  161. package/gulp-tasks/modules/split-path.js +3 -0
  162. package/gulp-tasks/modules/stat.js +8 -0
  163. package/gulp-tasks/modules/status.js +57 -0
  164. package/gulp-tasks/modules/status.ts +71 -0
  165. package/gulp-tasks/modules/test-path.js +3 -0
  166. package/gulp-tasks/modules/testutil-finder.js +176 -0
  167. package/gulp-tasks/modules/throw-if-no-files.js +15 -0
  168. package/gulp-tasks/modules/uniq.js +6 -0
  169. package/gulp-tasks/modules/uniq.ts +5 -0
  170. package/gulp-tasks/modules/verify-exe.js +17 -0
  171. package/gulp-tasks/modules/version-reading-shared.js +12 -0
  172. package/gulp-tasks/modules/version-reading-shared.ts +16 -0
  173. package/gulp-tasks/modules/write-text-file.js +10 -0
  174. package/gulp-tasks/modules/zarro-error.js +6 -0
  175. package/gulp-tasks/nuget-restore.js +57 -0
  176. package/gulp-tasks/pack.js +118 -0
  177. package/gulp-tasks/purge.js +94 -0
  178. package/gulp-tasks/release-npm.js +58 -0
  179. package/gulp-tasks/release-npm.ts +81 -0
  180. package/gulp-tasks/start/_package.json +39 -0
  181. package/gulp-tasks/start/gulpfile.js +204 -0
  182. package/gulp-tasks/start/update-starter-packages.js +63 -0
  183. package/gulp-tasks/test-dotnet.js +195 -0
  184. package/gulp-tasks/update-git-submodules.js +11 -0
  185. package/gulp-tasks/update-git-submodules.ts +29 -0
  186. package/gulp-tasks/update-self.js +65 -0
  187. package/gulp-tasks/update-self.ts +88 -0
  188. package/gulp-tasks/verify-up-to-date.js +77 -0
  189. package/gulp-tasks/verify-up-to-date.ts +119 -0
  190. package/index-modules/contains-any.js +31 -0
  191. package/index-modules/gather-args.js +21 -0
  192. package/index-modules/handlers/help.js +17 -0
  193. package/index-modules/handlers/init.js +57 -0
  194. package/index-modules/handlers/invoke-gulp.js +111 -0
  195. package/index-modules/handlers/show-env.js +46 -0
  196. package/index-modules/is-dir.js +6 -0
  197. package/index-modules/is-file.js +6 -0
  198. package/index.js +53 -0
  199. package/package.json +96 -0
  200. package/tsconfig.json +66 -0
  201. package/types.d.ts +753 -0
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ (function () {
3
+ const readPackageJson = requireModule("read-package-json");
4
+ module.exports = async function readPackageVersion(packageJsonFile) {
5
+ const index = await readPackageJson(packageJsonFile || "package.json");
6
+ return index.version;
7
+ };
8
+ })();
@@ -0,0 +1,10 @@
1
+ (function () {
2
+ const
3
+ readPackageJson = requireModule<ReadPackageJson>("read-package-json");
4
+
5
+ module.exports = async function readPackageVersion(packageJsonFile: string) {
6
+ const
7
+ index = await readPackageJson(packageJsonFile || "package.json");
8
+ return index.version;
9
+ }
10
+ })();
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ (function () {
3
+ const fs = require("fs");
4
+ module.exports = async function readTextFile(at) {
5
+ return new Promise((resolve, reject) => {
6
+ fs.readFile(at, { encoding: "utf8" }, (err, data) => {
7
+ if (err) {
8
+ return reject(err);
9
+ }
10
+ resolve(data.toString());
11
+ });
12
+ });
13
+ };
14
+ })();
@@ -0,0 +1,14 @@
1
+ (function () {
2
+ const fs = require("fs");
3
+
4
+ module.exports = async function readTextFile(at: string) {
5
+ return new Promise((resolve, reject) => {
6
+ fs.readFile(at, { encoding: "utf8" }, (err: Error, data: string) => {
7
+ if (err) {
8
+ return reject(err);
9
+ }
10
+ resolve(data.toString());
11
+ });
12
+ });
13
+ };
14
+ })();
@@ -0,0 +1,34 @@
1
+ // gulp4 introduces a lot of unnecessary noise
2
+ // in logging, particularly with "<anonymous>" tasks
3
+ // which seem to be created as part of the task dep graph
4
+ // but also because the gulp shim will generate
5
+ // wrappers with `gulp.series` and `gulp.parallel` to
6
+ // provide gulp3 backward-compatibility for task definition
7
+ // -> the aim is to suppress that noise
8
+ const
9
+ marker = "::: [suppress] :::",
10
+ gulp = require("gulp"),
11
+ log = require("gulplog"),
12
+ originalInfo = log.info;
13
+
14
+ log.info = function(...args) {
15
+ var taskName = args[1] || "";
16
+ if (
17
+ taskName.indexOf(marker) > -1 ||
18
+ taskName.indexOf("<anonymous>") > -1
19
+ ) {
20
+ return;
21
+ }
22
+ originalInfo.apply(gulp, args);
23
+ };
24
+
25
+ function markForSuppression(str) {
26
+ return process.argv.indexOf("--tasks") > 0
27
+ ? str
28
+ : `${marker}(${str})`
29
+ }
30
+
31
+ module.exports = {
32
+ marker,
33
+ markForSuppression
34
+ };
@@ -0,0 +1,526 @@
1
+ // when adding items to this file, it's a good idea to add them
2
+ // in alphabetical ordering so that it's easier to scan debug logs
3
+ // for vars you're looking for (:
4
+ // dev note: when updating here, don't forget to add to types.d.ts/global/Env
5
+
6
+ const
7
+ debug = require("debug")("env"),
8
+ { ZarroError } = requireModule("zarro-error"),
9
+ os = require("os"),
10
+ path = require("path"),
11
+ getToolsFolder = requireModule("get-tools-folder");
12
+
13
+ module.exports = function _env(env) {
14
+ debug("-- start env var registration --");
15
+
16
+ env.register({
17
+ name: "USE_SYSTEM_NUGET",
18
+ default: "false",
19
+ help: "Whether or not to use nuget.exe if found in the path"
20
+ }, _env);
21
+
22
+ env.register({
23
+ name: "ENABLE_NUGET_PARALLEL_PROCESSING",
24
+ default: "false",
25
+ help: "Whether to enable parallel processing for nuget restore. Disabled by default as large restores can fail without proper errors"
26
+ });
27
+
28
+ env.register({
29
+ name: "BUILD_SHOW_INFO",
30
+ default: "true",
31
+ help: "Whether or not to show information about the build before it starts"
32
+ });
33
+
34
+ env.register({
35
+ name: "BUILD_FAIL_ON_ERROR",
36
+ default: "true",
37
+ help: "Whether to fail the build immediately on any build error"
38
+ });
39
+
40
+ env.register({
41
+ name: "BUILD_MSBUILD_NODE_REUSE",
42
+ default: "false",
43
+ help: [
44
+ "Whether or not to allow modern msbuild to reuse msbuild.exe nodes",
45
+ "WARNING: enabling node reuse may cause esoteric build errors on shared environments"
46
+ ].join("\n")
47
+ });
48
+
49
+ env.register({
50
+ name: "MAX_CONCURRENCY",
51
+ default: os.cpus().length.toString(),
52
+ help: "Overrides other concurrency settings (BUILD_MAX_CPU_COUNT, MAX_NUNIT_AGENTS)"
53
+ });
54
+
55
+ env.register({
56
+ name: "DOTNET_TEST_PARALLEL",
57
+ default: false,
58
+ help: "(experimental) run your dotnet core tests in parallel"
59
+ });
60
+
61
+ env.register({
62
+ name: "BUILD_MAX_CPU_COUNT",
63
+ default: os.cpus().length.toString(),
64
+ help: "Max number of cpus to use whilst building",
65
+ overriddenBy: "MAX_CONCURRENCY",
66
+ when: overrideIsSmaller
67
+ });
68
+
69
+ function overrideIsSmaller(existing, override) {
70
+ const existingNumber = parseInt(existing, 10);
71
+ const overrideNumber = parseInt(override, 10);
72
+ if (isNaN(existingNumber) || isNaN(overrideNumber)) {
73
+ throw new ZarroError(
74
+ `Can't determine if override '${override}' should take precedence over '${existing}'`
75
+ );
76
+ }
77
+ const result = overrideNumber < existingNumber;
78
+ debug({
79
+ existing,
80
+ override,
81
+ existingNumber,
82
+ overrideNumber,
83
+ result
84
+ });
85
+ return overrideNumber < existingNumber;
86
+ }
87
+
88
+ env.register({
89
+ name: "BUILD_CONFIGURATION",
90
+ default: "Debug",
91
+ help: "Configuration used for building / testing"
92
+ });
93
+
94
+ env.register({
95
+ name: "BUILD_PLATFORM",
96
+ default: "Any CPU",
97
+ help: "Build output platform"
98
+ });
99
+
100
+ env.register({
101
+ name: "BUILD_ARCHITECTURE",
102
+ default: "x64",
103
+ help: "Target architecture of build"
104
+ });
105
+
106
+ env.register({
107
+ name: "MAX_NUNIT_AGENTS",
108
+ default: os.cpus().length - 1,
109
+ help: "How many NUNit agents to use for testing (net framework)",
110
+ overriddenBy: "MAX_CONCURRENCY",
111
+ when: overrideIsSmaller
112
+ });
113
+
114
+ env.register({
115
+ name: "BUILD_INCLUDE",
116
+ default: "*.sln",
117
+ help: "Mask to use for selecting solutions to build"
118
+ });
119
+
120
+ env.register({
121
+ name: "BUILD_EXCLUDE",
122
+ default: `**/node_modules/**/*.sln,./${getToolsFolder(env)}/**/*.sln`,
123
+ help: "Mask to use for specifically omitting solutions from build"
124
+ });
125
+
126
+ env.register({
127
+ name: "BUILD_ADDITIONAL_EXCLUDE",
128
+ default: "",
129
+ help: "Mask of extra exclusions on top of the default set"
130
+ });
131
+
132
+ env.register({
133
+ name: "DOTNET_CORE",
134
+ default: "false",
135
+ help: "Set to a truthy value to guide build to use 'dotnet build'"
136
+ });
137
+
138
+ env.register({
139
+ name: "NUNIT_ARCHITECTURE",
140
+ default: "(auto)"
141
+ });
142
+
143
+ env.register({
144
+ name: "BUILD_REPORT_XML",
145
+ default: "buildreports/nunit-result.xml"
146
+ });
147
+
148
+ env.register({
149
+ name: "NUNIT_LABELS",
150
+ default: "Before"
151
+ });
152
+
153
+ env.register({
154
+ name: "NUNIT_PROCESS",
155
+ default: "auto"
156
+ });
157
+
158
+ const extra = `
159
+ - globs match dotnet core projects or .net framework built assemblies
160
+ - elements surrounded with () are treated as pure gulp.src masks`,
161
+ defaultTestInclude = "*.Tests,*.Tests.*,Tests,Test,Test.*",
162
+ defaultTestExclude = `{!**/node_modules/**/*},{!./${getToolsFolder(env)}/**/*}`;
163
+ env.register({
164
+ name: "TEST_INCLUDE",
165
+ help: `comma-separated list of test projects to match${extra}`,
166
+ default: defaultTestInclude
167
+ });
168
+
169
+ env.register({
170
+ name: "TEST_EXCLUDE",
171
+ help: `comma-separated list of exclusions for tests${extra}`,
172
+ default: defaultTestExclude
173
+ });
174
+
175
+ env.register({
176
+ name: "TEST_VERBOSITY",
177
+ help: "Verbosity of reporting for dotnet core testing",
178
+ default: "normal"
179
+ });
180
+
181
+ env.register({
182
+ name: "BUILD_TOOLSVERSION",
183
+ help: "Tools Version to pass to msbuild for building with",
184
+ default: "auto"
185
+ });
186
+
187
+ env.register({
188
+ name: "BUILD_TARGETS",
189
+ help: "Targets to invoke msbuild with",
190
+ default: "Clean,Build"
191
+ });
192
+
193
+ env.register({
194
+ name: "BUILD_VERBOSITY",
195
+ help: "Verbosity of reporting for msbuild building",
196
+ default: "minimal"
197
+ });
198
+
199
+ const defaultCoverageExclusions =
200
+ "Dapper,MySql.Data,MySqlConnector,FluentMigrator.*,PeanutButter.*,AutoMapper,AutoMapper.*,*.Tests.*,nunit.framework,NExpect";
201
+ env.register({
202
+ name: "COVERAGE_EXCLUDE",
203
+ help: "Exclusion masks to pass to coverage tool (overwrites defaults)",
204
+ default: defaultCoverageExclusions
205
+ });
206
+
207
+ env.register({
208
+ name: "COVERAGE_INCLUDE",
209
+ help: "What to _include_ in coverage (defaults to everything but the excludes, also items mentioned here override excludes)",
210
+ default: "*"
211
+ });
212
+
213
+ env.register({
214
+ name: "COVERAGE_ADDITIONAL_EXCLUDE",
215
+ help: "Exclusion masks to add to the defaults"
216
+ });
217
+
218
+ const defaultReportsPath = path.join("buildreports", "coverage.xml");
219
+ env.register({
220
+ name: "COVERAGE_XML",
221
+ default: defaultReportsPath,
222
+ help: "Path to coverage XML output"
223
+ });
224
+
225
+ const defaultCoverageReportingExclusions =
226
+ "-" +
227
+ [
228
+ "*.Tests",
229
+ "FluentMigrator",
230
+ "FluentMigrator.Runner",
231
+ "PeanutButter.*",
232
+ "GenericBuilderTestArtifactBuilders",
233
+ "GenericBuilderTestArtifactEntities"
234
+ ].join(";-");
235
+ env.register({
236
+ name: "COVERAGE_REPORTING_EXCLUDE",
237
+ default: defaultCoverageReportingExclusions,
238
+ help:
239
+ "Mask to apply for coverage exclusions (see ReportGenerator documentation for '-assemblyfilters')"
240
+ });
241
+
242
+ env.register({
243
+ name: "BUILD_TOOLS_FOLDER",
244
+ help:
245
+ "Location for downloading locally-used build tools (eg nuget, nunit, opencover, report generator)",
246
+ default: "build-tools"
247
+ });
248
+
249
+ env.register({
250
+ name: "DRY_RUN",
251
+ help: "Flag that tasks may observe to only report what they are doing instead of actually doing it",
252
+ default: "false"
253
+ });
254
+
255
+ env.register({
256
+ name: "GIT_OVERRIDE_BRANCH",
257
+ help: "set this to override the GIT_BRANCH set by CI when, eg, you'd like to push to a different branch"
258
+ });
259
+
260
+ env.register({
261
+ name: "GIT_BRANCH",
262
+ help: "the checked-out branch according to git (should be set by CI, and CI may check out a sha but report a branch, so this is useful)",
263
+ default: "",
264
+ overriddenBy: [ "GIT_OVERRIDE_BRANCH" ]
265
+ });
266
+
267
+ env.register({
268
+ name: "GIT_MAIN_BRANCH",
269
+ help: "The main branch (typically master) against which verification is done"
270
+ });
271
+
272
+ env.register({
273
+ name: "GIT_VERIFY_BRANCH",
274
+ help: "The fully-qualified branch name to use when verifying (defaults to checked out branch)"
275
+ });
276
+
277
+ env.register({
278
+ name: "ENFORCE_VERIFICATION",
279
+ help: "(boolean) when set to a truthy value, 'verify-up-to-date' will error if the current branch is behind the main one",
280
+ default: true
281
+ });
282
+
283
+ env.register({
284
+ name: "INTERACTIVE",
285
+ help: "(boolean) flag to enable interactive processing, where available",
286
+ default: false
287
+ });
288
+
289
+ env.register({
290
+ name: "SKIP_FETCH_ON_VERIFY",
291
+ help: "(boolean) skip the fetch on verification: useful from CI where you should already have recently fetched",
292
+ default: false
293
+ });
294
+
295
+ env.register({
296
+ name: "GIT_FETCH_TIMEOUT",
297
+ help: "(number) the max time, in milliseconds, to wait for git fetch",
298
+ default: 30000
299
+ });
300
+
301
+ env.register({
302
+ name: "GIT_VERIFY_TIMEOUT",
303
+ help: "(number) the max time, in milliseconds, to wait for verification sub-processes",
304
+ default: 5000
305
+ });
306
+
307
+ env.register({
308
+ name: "FETCH_RECENT_TIME",
309
+ help: "(number) when testing the last gi fetch time, consider the fetch fresh enough if it happend within this many seconds in the past",
310
+ default: 60 // default is to skip fetch if last fetch < 1 minute ago
311
+ });
312
+
313
+ env.register({
314
+ name: "GIT_OVERRIDE_REMOTE",
315
+ help: "set this to override the GIT_REMOTE set by CI when, eg, you'd like to push to a different remote"
316
+ });
317
+
318
+ env.register({
319
+ name: "GIT_REMOTE",
320
+ help: "the checked-out remote according to git (should be set by CI, and CI may check out a sha but report a remote, so this is useful)",
321
+ default: "",
322
+ overriddenBy: [ "GIT_OVERRIDE_REMOTE" ]
323
+ });
324
+
325
+ env.register({
326
+ name: "NUGET_API_KEY",
327
+ help: "api key to use when attempting to publish to nuget (required for dotnet core, can be used for regular nuget.exe too)",
328
+ default: ""
329
+ });
330
+
331
+ env.register({
332
+ name: "DOTNET_PUBLISH_RUNTIMES",
333
+ help: "Runtimes to publish dotnet core targets for, if required"
334
+ });
335
+
336
+ env.register({
337
+ name: "DOTNET_PUBLISH_BUILD_CONFIGURATION",
338
+ help: "Build configuration to use when publishing dotnet core projects",
339
+ default: "Release"
340
+ });
341
+
342
+ env.register({
343
+ name: "NO_UNICODE",
344
+ help: "Prevent unicode output for status lines",
345
+ default: false
346
+ });
347
+
348
+ env.register({
349
+ name: "NO_COLOR",
350
+ help: "Prevent color output for status lines",
351
+ default: false
352
+ });
353
+
354
+ env.register({
355
+ name: "OUTPUT",
356
+ help: "Override output for whatever task you're running"
357
+ });
358
+
359
+ env.register({
360
+ name: "PURGE_JS_DIRS",
361
+ help: "Comma-separated list of directory names to search for when purging js",
362
+ default: "node_modules,bower_components"
363
+ });
364
+
365
+ env.register({
366
+ name: "PURGE_DOTNET_DIRS",
367
+ help: "Comma-separated list of directory names to search for when purging dotnet",
368
+ default: "obj,bin,packages"
369
+ });
370
+
371
+ env.register({
372
+ name: "PURGE_ADDITIONAL_DIRS",
373
+ help: "Comma-separated list of directory names to purge in addition to js & dotnet",
374
+ default: ""
375
+ });
376
+
377
+ env.register({
378
+ name: "PACKAGE_TARGET_FOLDER",
379
+ help: "Folder to serve as output for package build tasks",
380
+ default: "packages"
381
+ });
382
+
383
+ env.register({
384
+ name: "NUGET_IGNORE_DUPLICATE_PACKAGES",
385
+ help: "Ignore errors produced by attempting to push duplicate packages",
386
+ default: true
387
+ });
388
+
389
+ env.register({
390
+ name: "PACK_INCLUDE_CSPROJ",
391
+ help: "Mask to apply for inclusions to 'dotnet pack'",
392
+ default: ""
393
+ });
394
+
395
+ env.register({
396
+ name: "PACK_EXCLUDE_CSPROJ",
397
+ help: "Mask to apply for exclusions to 'dotnet pack'",
398
+ default: ""
399
+ });
400
+
401
+ env.register({
402
+ name: "PACK_INCLUDE_NUSPEC",
403
+ help: "Mask to apply for inclusions to 'pack' target for nuspec files",
404
+ default: "**/*.nuspec"
405
+ });
406
+
407
+ env.register({
408
+ name: "PACK_EXCLUDE_NUSPEC",
409
+ help: "Mask to apply for exclusions to 'pack' target for nuspec files",
410
+ default: ""
411
+ });
412
+
413
+ env.register({
414
+ name: "PACK_CONFIGURATION",
415
+ help: "Build configuration for dotnet-core packing",
416
+ default: "Release"
417
+ });
418
+
419
+ env.register({
420
+ name: "PACK_INCREMENT_VERSION",
421
+ help: "Flag: should package version be incremented before packing?",
422
+ default: "true"
423
+ });
424
+
425
+ env.register({
426
+ name: "PACK_INCREMENT_VERSION_BY",
427
+ help: "Number (default 1): increment the selected version number by this value",
428
+ default: "1"
429
+ });
430
+
431
+ env.register({
432
+ name: "PACK_BASE_PATH",
433
+ help: "Base path to pack nuget packages from"
434
+ });
435
+
436
+ env.register({
437
+ name: "PACK_INCLUDE_EMPTY_DIRECTORIES",
438
+ help: "Flag: include empty directories in the output nupkg",
439
+ default: false
440
+ });
441
+
442
+ env.register({
443
+ name: "PACK_VERSION",
444
+ help: "Override versioning in nuspec"
445
+ });
446
+
447
+ env.register({
448
+ name: "PACK_INCLUDE_SYMBOLS",
449
+ help: "Include symbols in the output (default is .snupkg)",
450
+ default: true
451
+ });
452
+
453
+ env.register({
454
+ name: "PACK_LEGACY_SYMBOLS",
455
+ help: "When including symbols, use legacy output",
456
+ default: false
457
+ })
458
+
459
+ env.register({
460
+ name: "PACKAGE_JSON",
461
+ help: "Path to package.json to be used for subsequent processing",
462
+ default: "package.json"
463
+ });
464
+
465
+ env.register({
466
+ name: "UPDATE_SUBMODULES_TO_LATEST",
467
+ help: "Flag: whether or not update-git-modules should update submodules to the latest version on their master branch",
468
+ default: true
469
+ });
470
+
471
+ env.register({
472
+ name: "VERSION_INCREMENT_STRATEGY",
473
+ help: [
474
+ "Selects which part of a version is incremented when attempting to increment version numbers",
475
+ "- select from major, minor, patch"
476
+ ].join("\n"),
477
+ default: "patch"
478
+ });
479
+
480
+ env.register({
481
+ name: "INITIAL_RELEASE",
482
+ help: "skip version incrementing for this initial release",
483
+ default: false
484
+ });
485
+
486
+ env.register({
487
+ name: "VERSION_INCREMENT_ZERO",
488
+ help: [
489
+ "Flag: whether or not to reset lower-order version parts when incrementing higher-order ones",
490
+ "eg: when incrementing the MAJOR version, should the MINOR and PATCH be set to zero?"
491
+ ],
492
+ default: "true"
493
+ });
494
+
495
+ env.register({
496
+ name: "INCLUDE_PACKAGE_JSON",
497
+ help: [
498
+ "Mask for which package.json files to include"
499
+ ],
500
+ default: "**/package.json"
501
+ });
502
+
503
+ env.register({
504
+ name: "EXCLUDE_PACKAGE_JSON",
505
+ help: [
506
+ "Mask for which package.json files to exclude"
507
+ ],
508
+ default: "**/node_modules/**"
509
+ });
510
+
511
+ env.register({
512
+ name: "BETA",
513
+ help: [
514
+ "Enable beta flag for operation"
515
+ ],
516
+ default: "false"
517
+ });
518
+
519
+ env.register({
520
+ name: "NPM_PUBLISH_ACCESS",
521
+ help: "Access level to use for package publish",
522
+ default: "public"
523
+ });
524
+
525
+ debug("-- env registration complete --");
526
+ };