@virmator/core 14.19.0 → 14.19.2

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, extraOptions);
197
+ writeLog(stderr, log, LogOutputType.Error, outputExtraOptions);
192
198
  },
193
199
  stdoutCallback(stdout) {
194
- writeLog(stdout, log, LogOutputType.Standard, extraOptions);
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'>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virmator/core",
3
- "version": "14.19.0",
3
+ "version": "14.19.2",
4
4
  "description": "Shared core functionality for all virmator plugins and the virmator CLI.",
5
5
  "keywords": [
6
6
  "automation",
@@ -15,7 +15,7 @@
15
15
  "type": "git",
16
16
  "url": "git+https://github.com/electrovir/virmator.git"
17
17
  },
18
- "license": "(MIT or CC0 1.0)",
18
+ "license": "(MIT OR CC0-1.0)",
19
19
  "author": {
20
20
  "name": "electrovir",
21
21
  "url": "https://github.com/electrovir"