@oclif/multi-stage-output 0.7.18 → 0.8.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.
|
@@ -32,6 +32,10 @@ type Info<T extends Record<string, unknown>> = {
|
|
|
32
32
|
* Set to `true` to only show this key-value pair or message at the very end of the CI output. Defaults to false.
|
|
33
33
|
*/
|
|
34
34
|
onlyShowAtEndInCI?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Set to `true` to always render this key-value pair or message in CI output (ignores throttling). Defaults to false.
|
|
37
|
+
*/
|
|
38
|
+
alwaysPrintInCI?: boolean;
|
|
35
39
|
};
|
|
36
40
|
export type KeyValuePair<T extends Record<string, unknown>> = Info<T> & {
|
|
37
41
|
/**
|
|
@@ -201,10 +201,12 @@ class CIMultiStageOutput {
|
|
|
201
201
|
continue;
|
|
202
202
|
const key = info.type === 'message' ? formattedData : info.label;
|
|
203
203
|
const str = info.type === 'message' ? formattedData : `${info.label}: ${formattedData}`;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
204
|
+
if (!info.alwaysPrintInCI) {
|
|
205
|
+
const lastUpdateTime = this.lastUpdateByInfo.get(key);
|
|
206
|
+
// Skip if the info has been printed before the throttle time
|
|
207
|
+
if (lastUpdateTime && Date.now() - lastUpdateTime < this.throttle && !force)
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
208
210
|
const didPrint = this.maybeStdout(str, indent, force);
|
|
209
211
|
if (didPrint)
|
|
210
212
|
this.lastUpdateByInfo.set(key, Date.now());
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/multi-stage-output",
|
|
3
3
|
"description": "Terminal output for oclif commands with multiple stages",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/multi-stage-output/issues",
|
|
7
7
|
"dependencies": {
|