@virmator/core 14.19.0 → 14.19.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.
|
@@ -184,14 +184,20 @@ export async function executeVirmatorCommand({ log: logParam, entryPointFilePath
|
|
|
184
184
|
async runShellCommand(command, options, extraOptions) {
|
|
185
185
|
const prefix = extraOptions?.logPrefix ? `${extraOptions.logPrefix} ` : '';
|
|
186
186
|
log.faint(`${prefix}> ${command}`);
|
|
187
|
+
const outputExtraOptions = extraOptions?.prefixCommandOnly
|
|
188
|
+
? {
|
|
189
|
+
...extraOptions,
|
|
190
|
+
logPrefix: undefined,
|
|
191
|
+
}
|
|
192
|
+
: extraOptions;
|
|
187
193
|
const result = await runShellCommand(command, {
|
|
188
194
|
cwd,
|
|
189
195
|
shell: 'bash',
|
|
190
196
|
stderrCallback(stderr) {
|
|
191
|
-
writeLog(stderr, log, LogOutputType.Error,
|
|
197
|
+
writeLog(stderr, log, LogOutputType.Error, outputExtraOptions);
|
|
192
198
|
},
|
|
193
199
|
stdoutCallback(stdout) {
|
|
194
|
-
writeLog(stdout, log, LogOutputType.Standard,
|
|
200
|
+
writeLog(stdout, log, LogOutputType.Standard, outputExtraOptions);
|
|
195
201
|
},
|
|
196
202
|
...options,
|
|
197
203
|
});
|
|
@@ -51,6 +51,13 @@ export type ExtraRunShellCommandOptions = {
|
|
|
51
51
|
* @default false
|
|
52
52
|
*/
|
|
53
53
|
includeErrorMessage: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* If true, `logPrefix` is applied only to the initial command-echo line; streamed stdout/stderr
|
|
56
|
+
* output is emitted without the prefix.
|
|
57
|
+
*
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
prefixCommandOnly: boolean;
|
|
54
61
|
};
|
|
55
62
|
/** A parsed `package.json` with `name` and `version` properties required. */
|
|
56
63
|
export type ValidPackageJson = SetRequired<PackageJson, 'name' | 'version'>;
|