zarro 1.133.1 → 1.136.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.
|
@@ -101,6 +101,11 @@
|
|
|
101
101
|
pushMsbuildProperties(args, opts);
|
|
102
102
|
pushEnvVars(args, opts.env);
|
|
103
103
|
pushAdditionalArgs(args, opts);
|
|
104
|
+
// there's a lot of stdio/stderr from tests, and it
|
|
105
|
+
// should be shown already - including it in the
|
|
106
|
+
// error dump is not only unnecessary, it confuses
|
|
107
|
+
// the test handler wrt quackers output handling
|
|
108
|
+
opts.suppressStdIoInErrors = true;
|
|
104
109
|
return runDotNetWith(args, opts);
|
|
105
110
|
}
|
|
106
111
|
async function pack(opts) {
|
|
@@ -169,7 +174,8 @@
|
|
|
169
174
|
try {
|
|
170
175
|
return await spawn("dotnet", args, {
|
|
171
176
|
stdout: opts.stdout,
|
|
172
|
-
stderr: opts.stderr
|
|
177
|
+
stderr: opts.stderr,
|
|
178
|
+
suppressStdIoInErrors: opts.suppressStdIoInErrors
|
|
173
179
|
});
|
|
174
180
|
}
|
|
175
181
|
catch (e) {
|
|
@@ -9,8 +9,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
this._args = args;
|
|
10
10
|
this._exe = exe;
|
|
11
11
|
this._exitCode = exitCode;
|
|
12
|
-
this._stderr = [...stderr];
|
|
13
|
-
this._stdout = [...stdout];
|
|
12
|
+
this._stderr = stderr ? [...stderr] : null;
|
|
13
|
+
this._stdout = stdout ? [...stdout] : null;
|
|
14
14
|
}
|
|
15
15
|
get args() {
|
|
16
16
|
return this._args;
|
|
@@ -22,16 +22,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
return this._exitCode;
|
|
23
23
|
}
|
|
24
24
|
get stdout() {
|
|
25
|
-
return [...this._stdout];
|
|
25
|
+
return this._stdout ? [...this._stdout] : [];
|
|
26
26
|
}
|
|
27
27
|
get stderr() {
|
|
28
|
-
return [...this._stderr];
|
|
28
|
+
return this._stderr ? [...this._stderr] : [];
|
|
29
29
|
}
|
|
30
30
|
toString() {
|
|
31
31
|
const lines = [
|
|
32
32
|
`${this.exe} ${this.args.join(" ")}`,
|
|
33
33
|
`Process exited with code: ${this.exitCode}`,
|
|
34
34
|
];
|
|
35
|
+
if (this._stderr === null && this._stdout === null) {
|
|
36
|
+
// io has been suppressed;
|
|
37
|
+
return lines.join("\n");
|
|
38
|
+
}
|
|
35
39
|
const hasStdOut = this.stdout && this.stdout.length > 0;
|
|
36
40
|
const hasStdErr = this.stderr && this.stderr.length > 0;
|
|
37
41
|
const hasOutput = hasStdErr || hasStdOut;
|
|
@@ -113,7 +117,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
113
117
|
opts.stderr = undefined;
|
|
114
118
|
opts.stdout = undefined;
|
|
115
119
|
}
|
|
116
|
-
if (
|
|
120
|
+
if (debug("gulp") > -1) {
|
|
117
121
|
console.log("running gulp", opts);
|
|
118
122
|
}
|
|
119
123
|
if (!opts.stdio && defaultOptions.stdio /* this is just to make ts happy*/) {
|
|
@@ -147,13 +151,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
147
151
|
return new Promise((resolve, reject) => {
|
|
148
152
|
try {
|
|
149
153
|
const child = child_process.spawn(executable, quotedArgs, opts);
|
|
150
|
-
if (executable.indexOf("gulp") > -1) {
|
|
151
|
-
console.log("gulp io", {
|
|
152
|
-
stdout: child.stdout,
|
|
153
|
-
stderr: child.stderr,
|
|
154
|
-
stdin: child.stdin
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
154
|
if (!child) {
|
|
158
155
|
reject(new Error(`unable to spawn ${executable} with args [${args.join(",")}]`));
|
|
159
156
|
}
|
|
@@ -163,7 +160,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
163
160
|
child.on("error", (err) => {
|
|
164
161
|
debug(`child error: ${err}`);
|
|
165
162
|
destroyPipesOn(child);
|
|
166
|
-
const e = new SpawnError(`"${[executable].concat(args).join(" ")}" failed with "${err}"`, executable, quotedArgs, -1, stderr, stdout);
|
|
163
|
+
const e = new SpawnError(`"${[executable].concat(args).join(" ")}" failed with "${err}"`, executable, quotedArgs, -1, opts.suppressStdIoInErrors ? null : stderr, opts.suppressStdIoInErrors ? null : stdout);
|
|
167
164
|
reject(e);
|
|
168
165
|
});
|
|
169
166
|
let exited = false;
|
|
@@ -188,7 +185,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
188
185
|
else {
|
|
189
186
|
const err = new SpawnError(`"${[executable]
|
|
190
187
|
.concat(args)
|
|
191
|
-
.join(" ")}" failed with exit code ${code}`, executable, args, code, stdout, stderr);
|
|
188
|
+
.join(" ")}" failed with exit code ${code}`, executable, args, code, opts.suppressStdIoInErrors ? null : stdout, opts.suppressStdIoInErrors ? null : stderr);
|
|
192
189
|
reject(err);
|
|
193
190
|
}
|
|
194
191
|
};
|
|
@@ -230,6 +230,10 @@ function runNpmWith(args) {
|
|
|
230
230
|
const os = require("os");
|
|
231
231
|
|
|
232
232
|
return os.platform() === "win32"
|
|
233
|
-
? spawn("cmd", [ "/c", "npm" ].concat(args)
|
|
234
|
-
|
|
233
|
+
? spawn("cmd", [ "/c", "npm" ].concat(args), {
|
|
234
|
+
interactive: true
|
|
235
|
+
})
|
|
236
|
+
: spawn("npm", args, {
|
|
237
|
+
interactive: true
|
|
238
|
+
});
|
|
235
239
|
}
|
|
@@ -34,7 +34,8 @@ function updateZarroPipe(beta) {
|
|
|
34
34
|
}
|
|
35
35
|
console.log(chalk.yellow(`update zarro in: ${file.dirname}`));
|
|
36
36
|
const proc = "npm", tag = beta ? "beta" : "latest", args = ["install", save ? "--save" : "--save-dev", `zarro@${tag}`, "--no-progress", "--silent"], opts = {
|
|
37
|
-
cwd: file.dirname
|
|
37
|
+
cwd: file.dirname,
|
|
38
|
+
interactive: true
|
|
38
39
|
};
|
|
39
40
|
if (env.resolveFlag(env.DRY_RUN)) {
|
|
40
41
|
console.log({
|
|
@@ -53,10 +54,10 @@ function updateZarroPipe(beta) {
|
|
|
53
54
|
stream.emit("end");
|
|
54
55
|
}
|
|
55
56
|
catch (err) {
|
|
56
|
-
console.error(chalk.redBright(`
|
|
57
|
-
==================================================
|
|
58
|
-
| WARNING: Unable to update zarro, error(s) follow |
|
|
59
|
-
==================================================
|
|
57
|
+
console.error(chalk.redBright(`
|
|
58
|
+
==================================================
|
|
59
|
+
| WARNING: Unable to update zarro, error(s) follow |
|
|
60
|
+
==================================================
|
|
60
61
|
`));
|
|
61
62
|
stream.emit("error", err);
|
|
62
63
|
}
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ declare global {
|
|
|
32
32
|
(() => Promise<any> | NodeJS.EventEmitter) | ((done: VoidVoid) => Promise<any> | NodeJS.EventEmitter)
|
|
33
33
|
type TryDo<T> = (logic: AsyncVoidFunc<T>, retries: number | string, onTransientError?: ErrorReporter, onFinalFailure?: VoidVoid) => Promise<void>;
|
|
34
34
|
type Optional<T> = T | undefined;
|
|
35
|
+
type Nullable<T> = T | null;
|
|
35
36
|
type ResolveNuget = (nugetPath: Optional<string>, errorOnMissing: boolean) => string;
|
|
36
37
|
type FindLocalNuget = () => Promise<string>;
|
|
37
38
|
|
|
@@ -516,6 +517,7 @@ declare global {
|
|
|
516
517
|
* collection is done as the IO is left as "inherit"
|
|
517
518
|
*/
|
|
518
519
|
interactive?: boolean;
|
|
520
|
+
suppressStdIoInErrors?: boolean
|
|
519
521
|
}
|
|
520
522
|
|
|
521
523
|
interface SpawnError extends Error {
|
|
@@ -568,6 +570,7 @@ declare global {
|
|
|
568
570
|
verbosity?: DotNetVerbosity;
|
|
569
571
|
// when set, errors are returned instead of thrown
|
|
570
572
|
suppressErrors?: boolean;
|
|
573
|
+
suppressStdIoInErrors?: boolean;
|
|
571
574
|
}
|
|
572
575
|
|
|
573
576
|
interface DotNetCommonBuildOptions extends DotNetBaseOptions {
|