zarro 1.208.0 → 1.208.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  gulp.task("build", "Builds Visual Studio solutions in tree", ["prebuild"], tryBuild);
27
27
  gulp.task("quick-build", "Quick build without pre-cursors", tryBuild);
28
28
  async function tryBuild() {
29
- return tryDo(build, "BUILD_RETRIES", e => console.error(chalk.red(`Build fails: ${e}`)), () => console.log(chalk.magentaBright(`Build fails! If the error looks transient, I suggest setting the environment variable 'BUILD_RETRIES' to some number > 0 🔨.`)));
29
+ return tryDo(build, "BUILD_RETRIES", e => console.error(chalk.red(`Build fails: ${e}`)), e => console.log(chalk.magentaBright(`
30
+ Build fails!
31
+
32
+ ${e}
33
+
34
+ If the error looks transient, I suggest setting the environment
35
+ variable 'BUILD_RETRIES' to some number > 0
36
+ `.trim())));
30
37
  }
31
38
  async function build() {
32
39
  const slnMasks = resolveMasks(env.BUILD_INCLUDE, [env.BUILD_EXCLUDE, env.BUILD_ADDITIONAL_EXCLUDE]);
@@ -30,7 +30,7 @@
30
30
  else {
31
31
  if (requestedRetries < 1) {
32
32
  if (onFinalFailure) {
33
- await onFinalFailure();
33
+ await onFinalFailure(e);
34
34
  }
35
35
  else {
36
36
  console.log(chalk.magentaBright(`Failed after ${totalAttempts} attempts`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zarro",
3
- "version": "1.208.0",
3
+ "version": "1.208.1",
4
4
  "description": "Some glue to make gulp easier, perhaps even zero- or close-to-zero-conf",
5
5
  "bin": {
6
6
  "zarro": "index.js"
package/types.d.ts CHANGED
@@ -149,7 +149,7 @@ declare global {
149
149
  logic: AsyncVoidFunc<T>,
150
150
  retries: number | string,
151
151
  onTransientError?: ErrorReporter,
152
- onFinalFailure?: VoidVoid
152
+ onFinalFailure?: ((e: Error) => void) | ((e: Error) => Promise<void>)
153
153
  ) => Promise<T>;
154
154
  type Optional<T> = T | undefined;
155
155
  type Nullable<T> = T | null;