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
package/types.d.ts ADDED
@@ -0,0 +1,753 @@
1
+ import * as fs from "fs";
2
+ import { Stream } from "stream";
3
+ import { StyleFunction } from "ansi-colors";
4
+ import { AlterPackageJsonVersionOptions } from "./gulp-tasks/modules/alter-package-json-version";
5
+ import { RimrafOptions } from "./gulp-tasks/modules/rimraf";
6
+ import { ExecFileOptionsWithBufferEncoding } from "child_process";
7
+ import { IoHandlers } from "./gulp-tasks/modules/exec";
8
+ import { StatsBase } from "fs";
9
+
10
+ // copied out of @types/fancy-log because imports are being stupid
11
+ interface Logger {
12
+ (...args: any[]): Logger;
13
+ dir(...args: any[]): Logger;
14
+ error(...args: any[]): Logger;
15
+ info(...args: any[]): Logger;
16
+ warn(...args: any[]): Logger;
17
+ }
18
+
19
+ declare global {
20
+ function requireModule<T>(module: string): T;
21
+
22
+ type VoidVoid = () => void;
23
+ type GulpCallback =
24
+ (() => Promise<any> | NodeJS.EventEmitter) | ((done: VoidVoid) => Promise<any> | NodeJS.EventEmitter)
25
+
26
+ interface GulpWithHelp {
27
+ task(name: string, callback: GulpCallback): void;
28
+ task(name: string, help: string, callback: GulpCallback): void;
29
+ task(name: string, dependencies: string[], callback: GulpCallback): void;
30
+
31
+ src(mask: string | string[]): NodeJS.ReadableStream;
32
+ dest(target: string): NodeJS.WritableStream;
33
+ }
34
+
35
+ type Gulp = GulpWithHelp;
36
+
37
+ type StringMap = (input: string) => string;
38
+
39
+ interface Dictionary<TValue> {
40
+ [key: string]: TValue;
41
+ }
42
+ interface Author {
43
+ name: string;
44
+ url: string;
45
+ }
46
+
47
+ interface PackageIndex {
48
+ name: string;
49
+ version: string;
50
+ description?: string;
51
+ bin?: Dictionary<string>;
52
+ homepage?: string;
53
+ main?: string;
54
+ scripts?: Dictionary<string>;
55
+ dependencies?: Dictionary<string>;
56
+ devDependencies?: Dictionary<string>;
57
+ files?: string[];
58
+ author: Author; // I'm sure there's a multi-author construct too
59
+ license: LicenseIdentifier
60
+ }
61
+
62
+ type ResolveMasks = (
63
+ includeVar: string,
64
+ excludeVar: string,
65
+ modifierFunction?: StringMap) => string[];
66
+
67
+ interface Env {
68
+ resolve(...names: string[]): string;
69
+ resolveArray(name: string): string[];
70
+ resolveArray(name: string, delimiter: string): string[];
71
+ resolveNumber(name: string): number;
72
+ resolveFlag(name: string): boolean;
73
+ associate(varName: string | string[], tasks: string | string[]): void;
74
+
75
+ // these are generated on the js output by register-environment-variables
76
+ // -> included here to avoid typos: use env.CONSTANT_NAME when you want
77
+ // the constant name somewhere, eg in association
78
+ BETA: string;
79
+ USE_SYSTEM_NUGET: string;
80
+ ENABLE_NUGET_PARALLEL_PROCESSING: string;
81
+ BUILD_SHOW_INFO: string;
82
+ BUILD_FAIL_ON_ERROR: string;
83
+ BUILD_MSBUILD_NODE_REUSE: string;
84
+ MAX_CONCURRENCY: string;
85
+ BUILD_MAX_CPU_COUNT: string;
86
+ BUILD_CONFIGURATION: string;
87
+ BUILD_PLATFORM: string;
88
+ BUILD_ARCHITECTURE: string;
89
+ MAX_NUNIT_AGENTS: string;
90
+ BUILD_INCLUDE: string;
91
+ BUILD_EXCLUDE: string;
92
+ BUILD_ADDITIONAL_EXCLUDE: string;
93
+ DOTNET_CORE: string;
94
+ DOTNET_TEST_PARALLEL: string;
95
+ NUNIT_ARCHITECTURE: string;
96
+ BUILD_REPORT_XML: string;
97
+ NUNIT_LABELS: string;
98
+ NUNIT_PROCESS: string;
99
+ TEST_INCLUDE: string;
100
+ TEST_EXCLUDE: string;
101
+ TEST_VERBOSITY: string;
102
+ BUILD_TOOLSVERSION: string;
103
+ BUILD_TARGETS: string;
104
+ BUILD_VERBOSITY: string;
105
+ COVERAGE_INCLUDE: string;
106
+ COVERAGE_EXCLUDE: string;
107
+ COVERAGE_ADDITIONAL_EXCLUDE: string;
108
+ COVERAGE_XML: string;
109
+ COVERAGE_REPORTING_EXCLUDE: string;
110
+ BUILD_TOOLS_FOLDER: string;
111
+ DRY_RUN: string;
112
+ GIT_OVERRIDE_BRANCH: string;
113
+ GIT_BRANCH: string;
114
+ GIT_OVERRIDE_REMOTE: string;
115
+ NUGET_API_KEY: string;
116
+ DOTNET_PUBLISH_RUNTIMES: string;
117
+ DOTNET_PUBLISH_BUILD_CONFIGURATION: string;
118
+ OUTPUT: string;
119
+ PURGE_JS_DIRS: string;
120
+ PURGE_DOTNET_DIRS: string;
121
+ PURGE_ADDITIONAL_DIRS: string;
122
+ PACKAGE_TARGET_FOLDER: string;
123
+ PACK_EXCLUDE: string;
124
+ PACK_INCLUDE: string;
125
+ PACK_CONFIGURATION: string;
126
+ PACK_INCREMENT_VERSION: string;
127
+ PACK_INCREMENT_VERSION_BY: string;
128
+ PACKAGE_JSON: string;
129
+ VERSION_INCREMENT_STRATEGY: string;
130
+ VERSION_INCREMENT_ZERO: string;
131
+ INITIAL_RELEASE: string;
132
+ INCLUDE_PACKAGE_JSON: string;
133
+ EXCLUDE_PACKAGE_JSON: string;
134
+ UPDATE_SUBMODULES_TO_LATEST: string;
135
+ ENFORCE_VERIFICATION: string;
136
+ GIT_MAIN_BRANCH: string;
137
+ GIT_VERIFY_BRANCH: string;
138
+ SKIP_FETCH_ON_VERIFY: string;
139
+ GIT_FETCH_TIMEOUT: string;
140
+ GIT_VERIFY_TIMEOUT: string;
141
+ GIT_FETCH_RECENT_TIME: string;
142
+ }
143
+
144
+
145
+ type StatFunction = (path: string) => Promise<fs.Stats | null>
146
+
147
+ // module defs: get these via requireModule<T>("module-name");
148
+ type ReadTextFile = (path: string) => Promise<string>;
149
+ type WriteTextFile = (path: string, data: string, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null) => Promise<void>
150
+ type ParseXml = (data: string) => Promise<Dictionary<any>>;
151
+ type IncrementVersion = (version: string, strategy: string, zeroLowerOrder: boolean, incrementBy: number)
152
+ => string;
153
+ type ReadPackageVersion = (packageJsonPath?: string) => string | undefined;
154
+ type ReadNuspecVersion = (pathToNuspec: string) => string | undefined;
155
+ type ReadCsProjVersion = (pathToCsProj: string) => string | undefined;
156
+ type ReadCsProjPackageVersion = (pathToCsProj: string) => string | undefined;
157
+ type GatherPaths = (pathSpecs: string | string[]) => Promise<string[]>;
158
+ type PromisifyStream = (stream: Stream) => Promise<void>;
159
+ type AlterPackageJson = (opts?: AlterPackageJsonVersionOptions) => Promise<void>;
160
+ type Rimraf = (at: string, opts?: RimrafOptions) => Promise<void>;
161
+ type ReadPackageJson = (at?: string) => Promise<PackageIndex>;
162
+ type Exec =
163
+ ((cmd: string, args?: string[], opts?: ExecOpts, handlers?: IoHandlers) => Promise<string>) & {
164
+ alwaysSuppressOutput: boolean
165
+ };
166
+ type Uniq = (values: any[]) => any[];
167
+ type EnvHelpers = {
168
+ env: (name: string, fallback?: string) => string;
169
+ envNumber: (name: string, fallback?: number) => number;
170
+ envFlag: (name: string, fallback?: boolean) => boolean;
171
+ };
172
+
173
+ // @ts-ignore
174
+ export interface ExecOpts extends ExecFileOptionsWithBufferEncoding {
175
+ // force usage of execfile
176
+ _useExecFile?: boolean;
177
+ // exec normally mirrors output (and returns it)
178
+ // -> set this to true to only return the output
179
+ suppressOutput?: boolean;
180
+
181
+ // merge stdout & stderr into one output
182
+ mergeIo?: boolean;
183
+
184
+ encoding?: string | null;
185
+ }
186
+
187
+ type PackOptions = {
188
+ basePath?: string;
189
+ excludeEmptyDirectories?: boolean;
190
+ version?: string;
191
+ symbols?: boolean;
192
+ legacySymbols?: boolean;
193
+ };
194
+ type Pack = (opts?: PackOptions) => Stream;
195
+
196
+ type Colors = "black"
197
+ | "red"
198
+ | "green"
199
+ | "yellow"
200
+ | "blue"
201
+ | "magenta"
202
+ | "cyan"
203
+ | "white"
204
+ | "gray"
205
+ | "grey"
206
+ // bright colors
207
+ | "blackBright"
208
+ | "redBright"
209
+ | "greenBright"
210
+ | "yellowBright"
211
+ | "blueBright"
212
+ | "magentaBright"
213
+ | "cyanBright"
214
+ | "whiteBright"
215
+
216
+ type Status = {
217
+ start(message: string, color?: Colors): void;
218
+ ok(): void;
219
+ fail(): void;
220
+ run<T>(message: string, action: (() => T | Promise<T>)): void;
221
+ };
222
+ type Sleep = (ms: number) => Promise<void>;
223
+ interface Failer {
224
+ promise: Promise<void>;
225
+ cancel(): void;
226
+ }
227
+ type FailAfter = (ms: number, message?: string) => Failer;
228
+
229
+ export interface FileSystemUtils {
230
+ folderExists(at: string): Promise<boolean>;
231
+ fileExists(at: string): Promise<boolean>;
232
+ stat(p: string): Promise<StatsBase<any>>;
233
+ readFile(p: string, opts: any): Promise<Buffer | string>;
234
+ readdir(p: string): Promise<string[]>;
235
+ mkdir(p: string, opts: any): Promise<void>;
236
+
237
+ existsSync(p: string): boolean;
238
+ writeFileSync(p: string, contents: Buffer): void;
239
+ }
240
+
241
+ // simple-git wrappers
242
+ // resolves the (assumed primary) git remote at the current folder or provided override, allowing an environment override via GIT_REMOTE
243
+ type ResolveGitRemote = (at?: string) => Promise<string | undefined>;
244
+ // attempt to read the primary git remote, if there is one
245
+ type ReadGitRemote = (at?: string) => Promise<string | undefined>;
246
+ type ReadAllGitRemotes = (at?: string) => Promise<GitRemote[]>;
247
+ // resolves the git branch at the current folder or provided override, allowing an environment override via GIT_BRANCH
248
+ type ResolveGitBranch = (at?: string) => Promise<string | undefined>;
249
+ // reads the checked out branch name at the current folder or provided override
250
+ type ReadCurrentGitBranch = (at?: string) => Promise<string | undefined>;
251
+ type ReadAllGitBranches = (at?: string) => Promise<string[]>;
252
+ type ReadLastFetchTime = (at?: string) => Promise<Date | undefined>;
253
+ // runs some git functionality, returning undefined if that functionality is run outside a repo folder
254
+ type SafeGit = ((fn: () => Promise<any>, defaultValue?: any) => Promise<any | undefined>)
255
+
256
+ type PromisifyFunction = (fn: Function, parent?: any, cannotError?: any) => ((...args: any[]) => Promise<any>);
257
+
258
+ type ParseXmlString = (str: string) => any; // TODO: get xml types in here?
259
+ type LoadXmlFile = (str: string) => any; // TODO: get xml types in here?
260
+
261
+ type GitTagFromCsProj = (options?: GitTagFromCsProjOptions) => Stream;
262
+ type GitFetch = (all: boolean) => Promise<void>;
263
+
264
+ interface Log {
265
+ setThreshold(level: number): void;
266
+ debug(...args: any[]): void;
267
+ log(...args: any[]): void;
268
+ info(...args: any[]): void;
269
+ notice(...args: any[]): void;
270
+ warn(...args: any[]): void;
271
+ error(...args: any[]): void;
272
+ fail(...args: any[]): void;
273
+ }
274
+
275
+ type ReadGitCommitDeltaCount = (mainBranch: string, otherBranch: string) => Promise<GitCommitDeltaCount>;
276
+ type ReadMainBranchName = () => Promise<string | undefined>;
277
+
278
+ interface GitCommitDeltaCount {
279
+ behind: number;
280
+ ahead: number;
281
+ }
282
+
283
+ interface GitTagFromCsProjOptions extends GitTagOptions {
284
+ push?: boolean;
285
+ }
286
+
287
+ type ReadGitInfo = (at?: string) => Promise<GitInfo>;
288
+ enum GitRemoteUsage {
289
+ fetch,
290
+ push,
291
+ fetchAndPush
292
+ }
293
+ interface GitRemote {
294
+ name: string;
295
+ url: string;
296
+ usage: GitRemoteUsage
297
+ }
298
+
299
+ interface GitInfo {
300
+ isGitRepository: boolean;
301
+ remotes: GitRemote[];
302
+ primaryRemote: string;
303
+ branches: string[];
304
+ currentBranch: string;
305
+ }
306
+
307
+ interface GitTagOptions {
308
+ tag: string;
309
+ comment?: string;
310
+ where?: string;
311
+ dryRun?: boolean;
312
+ }
313
+ interface GitPushOptions {
314
+ dryRun?: boolean;
315
+ quiet?: boolean;
316
+ where?: string
317
+ }
318
+ type GitTag = (tag: string | GitTagOptions, comment?: string, where?: string) => Promise<void>;
319
+ type GitPush = (dryRun?: boolean | GitPushOptions, quiet?: boolean, where?: string) => Promise<void>;
320
+ type GitPushTags = (dryRun?: boolean | GitPushOptions, comment?: string, where?: string) => Promise<void>;
321
+
322
+ type StdioOptions = "pipe" | "ignore" | "inherit" |
323
+ Array<("pipe" | "ipc" | "ignore" | "inherit" | any | number | null | undefined)>;
324
+
325
+ type BufferConsumer = (data: Buffer) => void;
326
+ type ProcessIO = string | BufferConsumer
327
+
328
+ interface SpawnOptions {
329
+ windowsHide?: boolean;
330
+ timeout?: number;
331
+ argv0?: string;
332
+ stdio?: StdioOptions;
333
+ shell?: boolean | string;
334
+ windowsVerbatimArguments?: boolean;
335
+
336
+ uid?: number;
337
+ gid?: number;
338
+ cwd?: string;
339
+ env?: NodeJS.ProcessEnv;
340
+
341
+ stdout?: ProcessIO;
342
+ stderr?: ProcessIO;
343
+
344
+ detached?: boolean;
345
+ }
346
+
347
+ type Spawn = (program: string, args: string[], options?: SpawnOptions)
348
+ => Promise<number>;
349
+
350
+ type AskOptions = {
351
+ }
352
+ type AskFunction = (message: string, options?: AskOptions) => Promise<string>;
353
+ type Ask = {
354
+ ask: AskFunction
355
+ };
356
+
357
+ interface GulpUtil {
358
+ PluginError: PluginError;
359
+ log: Logger;
360
+ colors: StyleFunction;
361
+ }
362
+ interface PluginError extends Error {
363
+ new(pluginName: string, err: string | Error): void;
364
+ }
365
+
366
+ // scraped from https://spdx.org/licenses/
367
+ // with the following fragment from FF dev console
368
+ // copy(Array.from(document.querySelector("table").querySelectorAll("tr")).map(tr => {
369
+ // return Array.from(tr.querySelectorAll("td"))[1]
370
+ // }).filter(td => !!td).map(td => td.innerText))
371
+ type LicenseIdentifier =
372
+ "0BSD" |
373
+ "AAL" |
374
+ "Abstyles" |
375
+ "Adobe-2006" |
376
+ "Adobe-Glyph" |
377
+ "ADSL" |
378
+ "AFL-1.1" |
379
+ "AFL-1.2" |
380
+ "AFL-2.0" |
381
+ "AFL-2.1" |
382
+ "AFL-3.0" |
383
+ "Afmparse" |
384
+ "AGPL-1.0-only" |
385
+ "AGPL-1.0-or-later" |
386
+ "AGPL-3.0-only" |
387
+ "AGPL-3.0-or-later" |
388
+ "Aladdin" |
389
+ "AMDPLPA" |
390
+ "AML" |
391
+ "AMPAS" |
392
+ "ANTLR-PD" |
393
+ "Apache-1.0" |
394
+ "Apache-1.1" |
395
+ "Apache-2.0" |
396
+ "APAFML" |
397
+ "APL-1.0" |
398
+ "APSL-1.0" |
399
+ "APSL-1.1" |
400
+ "APSL-1.2" |
401
+ "APSL-2.0" |
402
+ "Artistic-1.0" |
403
+ "Artistic-1.0-cl8" |
404
+ "Artistic-1.0-Perl" |
405
+ "Artistic-2.0" |
406
+ "Bahyph" |
407
+ "Barr" |
408
+ "Beerware" |
409
+ "BitTorrent-1.0" |
410
+ "BitTorrent-1.1" |
411
+ "blessing" |
412
+ "BlueOak-1.0.0" |
413
+ "Borceux" |
414
+ "BSD-1-Clause" |
415
+ "BSD-2-Clause" |
416
+ "BSD-2-Clause-FreeBSD" |
417
+ "BSD-2-Clause-NetBSD" |
418
+ "BSD-2-Clause-Patent" |
419
+ "BSD-3-Clause" |
420
+ "BSD-3-Clause-Attribution" |
421
+ "BSD-3-Clause-Clear" |
422
+ "BSD-3-Clause-LBNL" |
423
+ "BSD-3-Clause-No-Nuclear-License" |
424
+ "BSD-3-Clause-No-Nuclear-License-2014" |
425
+ "BSD-3-Clause-No-Nuclear-Warranty" |
426
+ "BSD-3-Clause-Open-MPI" |
427
+ "BSD-4-Clause" |
428
+ "BSD-4-Clause-UC" |
429
+ "BSD-Protection" |
430
+ "BSD-Source-Code" |
431
+ "BSL-1.0" |
432
+ "bzip2-1.0.5" |
433
+ "bzip2-1.0.6" |
434
+ "Caldera" |
435
+ "CATOSL-1.1" |
436
+ "CC-BY-1.0" |
437
+ "CC-BY-2.0" |
438
+ "CC-BY-2.5" |
439
+ "CC-BY-3.0" |
440
+ "CC-BY-4.0" |
441
+ "CC-BY-NC-1.0" |
442
+ "CC-BY-NC-2.0" |
443
+ "CC-BY-NC-2.5" |
444
+ "CC-BY-NC-3.0" |
445
+ "CC-BY-NC-4.0" |
446
+ "CC-BY-NC-ND-1.0" |
447
+ "CC-BY-NC-ND-2.0" |
448
+ "CC-BY-NC-ND-2.5" |
449
+ "CC-BY-NC-ND-3.0" |
450
+ "CC-BY-NC-ND-4.0" |
451
+ "CC-BY-NC-SA-1.0" |
452
+ "CC-BY-NC-SA-2.0" |
453
+ "CC-BY-NC-SA-2.5" |
454
+ "CC-BY-NC-SA-3.0" |
455
+ "CC-BY-NC-SA-4.0" |
456
+ "CC-BY-ND-1.0" |
457
+ "CC-BY-ND-2.0" |
458
+ "CC-BY-ND-2.5" |
459
+ "CC-BY-ND-3.0" |
460
+ "CC-BY-ND-4.0" |
461
+ "CC-BY-SA-1.0" |
462
+ "CC-BY-SA-2.0" |
463
+ "CC-BY-SA-2.5" |
464
+ "CC-BY-SA-3.0" |
465
+ "CC-BY-SA-4.0" |
466
+ "CC-PDDC" |
467
+ "CC0-1.0" |
468
+ "CDDL-1.0" |
469
+ "CDDL-1.1" |
470
+ "CDLA-Permissive-1.0" |
471
+ "CDLA-Sharing-1.0" |
472
+ "CECILL-1.0" |
473
+ "CECILL-1.1" |
474
+ "CECILL-2.0" |
475
+ "CECILL-2.1" |
476
+ "CECILL-B" |
477
+ "CECILL-C" |
478
+ "CERN-OHL-1.1" |
479
+ "CERN-OHL-1.2" |
480
+ "ClArtistic" |
481
+ "CNRI-Jython" |
482
+ "CNRI-Python" |
483
+ "CNRI-Python-GPL-Compatible" |
484
+ "Condor-1.1" |
485
+ "copyleft-next-0.3.0" |
486
+ "copyleft-next-0.3.1" |
487
+ "CPAL-1.0" |
488
+ "CPL-1.0" |
489
+ "CPOL-1.02" |
490
+ "Crossword" |
491
+ "CrystalStacker" |
492
+ "CUA-OPL-1.0" |
493
+ "Cube" |
494
+ "curl" |
495
+ "D-FSL-1.0" |
496
+ "diffmark" |
497
+ "DOC" |
498
+ "Dotseqn" |
499
+ "DSDP" |
500
+ "dvipdfm" |
501
+ "ECL-1.0" |
502
+ "ECL-2.0" |
503
+ "EFL-1.0" |
504
+ "EFL-2.0" |
505
+ "eGenix" |
506
+ "Entessa" |
507
+ "EPL-1.0" |
508
+ "EPL-2.0" |
509
+ "ErlPL-1.1" |
510
+ "etalab-2.0" |
511
+ "EUDatagrid" |
512
+ "EUPL-1.0" |
513
+ "EUPL-1.1" |
514
+ "EUPL-1.2" |
515
+ "Eurosym" |
516
+ "Fair" |
517
+ "Frameworx-1.0" |
518
+ "FreeImage" |
519
+ "FSFAP" |
520
+ "FSFUL" |
521
+ "FSFULLR" |
522
+ "FTL" |
523
+ "GFDL-1.1-only" |
524
+ "GFDL-1.1-or-later" |
525
+ "GFDL-1.2-only" |
526
+ "GFDL-1.2-or-later" |
527
+ "GFDL-1.3-only" |
528
+ "GFDL-1.3-or-later" |
529
+ "Giftware" |
530
+ "GL2PS" |
531
+ "Glide" |
532
+ "Glulxe" |
533
+ "gnuplot" |
534
+ "GPL-1.0-only" |
535
+ "GPL-1.0-or-later" |
536
+ "GPL-2.0-only" |
537
+ "GPL-2.0-or-later" |
538
+ "GPL-3.0-only" |
539
+ "GPL-3.0-or-later" |
540
+ "gSOAP-1.3b" |
541
+ "HaskellReport" |
542
+ "HPND" |
543
+ "HPND-sell-variant" |
544
+ "IBM-pibs" |
545
+ "ICU" |
546
+ "IJG" |
547
+ "ImageMagick" |
548
+ "iMatix" |
549
+ "Imlib2" |
550
+ "Info-ZIP" |
551
+ "Intel" |
552
+ "Intel-ACPI" |
553
+ "Interbase-1.0" |
554
+ "IPA" |
555
+ "IPL-1.0" |
556
+ "ISC" |
557
+ "JasPer-2.0" |
558
+ "JPNIC" |
559
+ "JSON" |
560
+ "LAL-1.2" |
561
+ "LAL-1.3" |
562
+ "Latex2e" |
563
+ "Leptonica" |
564
+ "LGPL-2.0-only" |
565
+ "LGPL-2.0-or-later" |
566
+ "LGPL-2.1-only" |
567
+ "LGPL-2.1-or-later" |
568
+ "LGPL-3.0-only" |
569
+ "LGPL-3.0-or-later" |
570
+ "LGPLLR" |
571
+ "Libpng" |
572
+ "libpng-2.0" |
573
+ "libselinux-1.0" |
574
+ "libtiff" |
575
+ "LiLiQ-P-1.1" |
576
+ "LiLiQ-R-1.1" |
577
+ "LiLiQ-Rplus-1.1" |
578
+ "Linux-OpenIB" |
579
+ "LPL-1.0" |
580
+ "LPL-1.02" |
581
+ "LPPL-1.0" |
582
+ "LPPL-1.1" |
583
+ "LPPL-1.2" |
584
+ "LPPL-1.3a" |
585
+ "LPPL-1.3c" |
586
+ "MakeIndex" |
587
+ "MirOS" |
588
+ "MIT" |
589
+ "MIT-0" |
590
+ "MIT-advertising" |
591
+ "MIT-CMU" |
592
+ "MIT-enna" |
593
+ "MIT-feh" |
594
+ "MITNFA" |
595
+ "Motosoto" |
596
+ "mpich2" |
597
+ "MPL-1.0" |
598
+ "MPL-1.1" |
599
+ "MPL-2.0" |
600
+ "MPL-2.0-no-copyleft-exception" |
601
+ "MS-PL" |
602
+ "MS-RL" |
603
+ "MTLL" |
604
+ "MulanPSL-1.0" |
605
+ "Multics" |
606
+ "Mup" |
607
+ "NASA-1.3" |
608
+ "Naumen" |
609
+ "NBPL-1.0" |
610
+ "NCSA" |
611
+ "Net-SNMP" |
612
+ "NetCDF" |
613
+ "Newsletr" |
614
+ "NGPL" |
615
+ "NLOD-1.0" |
616
+ "NLPL" |
617
+ "Nokia" |
618
+ "NOSL" |
619
+ "Noweb" |
620
+ "NPL-1.0" |
621
+ "NPL-1.1" |
622
+ "NPOSL-3.0" |
623
+ "NRL" |
624
+ "NTP" |
625
+ "NTP-0" |
626
+ "OCCT-PL" |
627
+ "OCLC-2.0" |
628
+ "ODbL-1.0" |
629
+ "ODC-By-1.0" |
630
+ "OFL-1.0" |
631
+ "OFL-1.0-no-RFN" |
632
+ "OFL-1.0-RFN" |
633
+ "OFL-1.1" |
634
+ "OFL-1.1-no-RFN" |
635
+ "OFL-1.1-RFN" |
636
+ "OGL-Canada-2.0" |
637
+ "OGL-UK-1.0" |
638
+ "OGL-UK-2.0" |
639
+ "OGL-UK-3.0" |
640
+ "OGTSL" |
641
+ "OLDAP-1.1" |
642
+ "OLDAP-1.2" |
643
+ "OLDAP-1.3" |
644
+ "OLDAP-1.4" |
645
+ "OLDAP-2.0" |
646
+ "OLDAP-2.0.1" |
647
+ "OLDAP-2.1" |
648
+ "OLDAP-2.2" |
649
+ "OLDAP-2.2.1" |
650
+ "OLDAP-2.2.2" |
651
+ "OLDAP-2.3" |
652
+ "OLDAP-2.4" |
653
+ "OLDAP-2.5" |
654
+ "OLDAP-2.6" |
655
+ "OLDAP-2.7" |
656
+ "OLDAP-2.8" |
657
+ "OML" |
658
+ "OpenSSL" |
659
+ "OPL-1.0" |
660
+ "OSET-PL-2.1" |
661
+ "OSL-1.0" |
662
+ "OSL-1.1" |
663
+ "OSL-2.0" |
664
+ "OSL-2.1" |
665
+ "OSL-3.0" |
666
+ "Parity-6.0.0" |
667
+ "PDDL-1.0" |
668
+ "PHP-3.0" |
669
+ "PHP-3.01" |
670
+ "Plexus" |
671
+ "PostgreSQL" |
672
+ "PSF-2.0" |
673
+ "psfrag" |
674
+ "psutils" |
675
+ "Python-2.0" |
676
+ "Qhull" |
677
+ "QPL-1.0" |
678
+ "Rdisc" |
679
+ "RHeCos-1.1" |
680
+ "RPL-1.1" |
681
+ "RPL-1.5" |
682
+ "RPSL-1.0" |
683
+ "RSA-MD" |
684
+ "RSCPL" |
685
+ "Ruby" |
686
+ "SAX-PD" |
687
+ "Saxpath" |
688
+ "SCEA" |
689
+ "Sendmail" |
690
+ "Sendmail-8.23" |
691
+ "SGI-B-1.0" |
692
+ "SGI-B-1.1" |
693
+ "SGI-B-2.0" |
694
+ "SHL-0.5" |
695
+ "SHL-0.51" |
696
+ "SimPL-2.0" |
697
+ "SISSL" |
698
+ "SISSL-1.2" |
699
+ "Sleepycat" |
700
+ "SMLNJ" |
701
+ "SMPPL" |
702
+ "SNIA" |
703
+ "Spencer-86" |
704
+ "Spencer-94" |
705
+ "Spencer-99" |
706
+ "SPL-1.0" |
707
+ "SSH-OpenSSH" |
708
+ "SSH-short" |
709
+ "SSPL-1.0" |
710
+ "SugarCRM-1.1.3" |
711
+ "SWL" |
712
+ "TAPR-OHL-1.0" |
713
+ "TCL" |
714
+ "TCP-wrappers" |
715
+ "TMate" |
716
+ "TORQUE-1.1" |
717
+ "TOSL" |
718
+ "TU-Berlin-1.0" |
719
+ "TU-Berlin-2.0" |
720
+ "UCL-1.0" |
721
+ "Unicode-DFS-2015" |
722
+ "Unicode-DFS-2016" |
723
+ "Unicode-TOU" |
724
+ "Unlicense" |
725
+ "UPL-1.0" |
726
+ "Vim" |
727
+ "VOSTROM" |
728
+ "VSL-1.0" |
729
+ "W3C" |
730
+ "W3C-19980720" |
731
+ "W3C-20150513" |
732
+ "Watcom-1.0" |
733
+ "Wsuipa" |
734
+ "WTFPL" |
735
+ "X11" |
736
+ "Xerox" |
737
+ "XFree86-1.1" |
738
+ "xinetd" |
739
+ "Xnet" |
740
+ "xpp" |
741
+ "XSkat" |
742
+ "YPL-1.0" |
743
+ "YPL-1.1" |
744
+ "Zed" |
745
+ "Zend-2.0" |
746
+ "Zimbra-1.3" |
747
+ "Zimbra-1.4" |
748
+ "Zlib" |
749
+ "zlib-acknowledgement" |
750
+ "ZPL-1.1" |
751
+ "ZPL-2.0" |
752
+ "ZPL-2.1"
753
+ }