@atlaspack/reporter-cli 2.14.2 → 2.14.4-canary.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.
- package/CHANGELOG.md +9 -0
- package/LICENSE +201 -0
- package/lib/CLIReporter.js +6 -1
- package/lib/CLIReporter.js.map +1 -1
- package/package.json +7 -6
- package/src/CLIReporter.js +14 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/reporter-cli",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.4-canary.0+41f62c447",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -26,19 +26,20 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atlaspack/plugin": "2.14.
|
|
30
|
-
"@atlaspack/types": "2.14.
|
|
31
|
-
"@atlaspack/utils": "2.14.
|
|
29
|
+
"@atlaspack/plugin": "2.14.4-canary.0+41f62c447",
|
|
30
|
+
"@atlaspack/types": "2.14.4-canary.0+41f62c447",
|
|
31
|
+
"@atlaspack/utils": "2.14.4-canary.0+41f62c447",
|
|
32
32
|
"chalk": "^4.1.0",
|
|
33
33
|
"term-size": "^2.2.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@atlaspack/feature-flags": "2.14.
|
|
36
|
+
"@atlaspack/feature-flags": "2.14.1-canary.63+41f62c447",
|
|
37
37
|
"filesize": "^6.1.0",
|
|
38
38
|
"nullthrows": "^1.1.1",
|
|
39
39
|
"ora": "^5.2.0",
|
|
40
40
|
"string-width": "^4.2.0",
|
|
41
41
|
"wrap-ansi": "^7.0.0"
|
|
42
42
|
},
|
|
43
|
-
"type": "commonjs"
|
|
43
|
+
"type": "commonjs",
|
|
44
|
+
"gitHead": "41f62c4479595808d8426c1e674d69fbe1bf0d5e"
|
|
44
45
|
}
|
package/src/CLIReporter.js
CHANGED
|
@@ -39,6 +39,12 @@ let statusThrottle = throttle((message: string) => {
|
|
|
39
39
|
updateSpinner(message);
|
|
40
40
|
}, THROTTLE_DELAY);
|
|
41
41
|
|
|
42
|
+
const cacheWriteState: {|
|
|
43
|
+
startTime: number | null,
|
|
44
|
+
|} = {
|
|
45
|
+
startTime: null,
|
|
46
|
+
};
|
|
47
|
+
|
|
42
48
|
// Exported only for test
|
|
43
49
|
export async function _report(
|
|
44
50
|
event: ReporterEvent,
|
|
@@ -158,13 +164,20 @@ export async function _report(
|
|
|
158
164
|
switch (event.phase) {
|
|
159
165
|
case 'start':
|
|
160
166
|
updateSpinner('Writing cache to disk');
|
|
167
|
+
cacheWriteState.startTime = Date.now();
|
|
161
168
|
break;
|
|
162
169
|
case 'end':
|
|
163
170
|
persistSpinner(
|
|
164
171
|
'cache',
|
|
165
172
|
'success',
|
|
166
|
-
chalk.grey.bold(
|
|
173
|
+
chalk.grey.bold(
|
|
174
|
+
`Cache written to disk in ${prettifyTime(
|
|
175
|
+
Date.now() - (cacheWriteState.startTime ?? 0),
|
|
176
|
+
)}`,
|
|
177
|
+
),
|
|
167
178
|
);
|
|
179
|
+
|
|
180
|
+
cacheWriteState.startTime = null;
|
|
168
181
|
break;
|
|
169
182
|
}
|
|
170
183
|
}
|