@atlaspack/reporter-build-metrics 2.14.5-canary.138 → 2.14.5-canary.139
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/reporter-build-metrics",
|
|
3
|
-
"version": "2.14.5-canary.
|
|
3
|
+
"version": "2.14.5-canary.139+d2fd84977",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,15 +9,19 @@
|
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/atlassian-labs/atlaspack.git"
|
|
11
11
|
},
|
|
12
|
-
"main": "lib/BuildMetricsReporter.js",
|
|
13
|
-
"source": "src/BuildMetricsReporter.
|
|
12
|
+
"main": "./lib/BuildMetricsReporter.js",
|
|
13
|
+
"source": "./src/BuildMetricsReporter.ts",
|
|
14
|
+
"types": "./lib/BuildMetricsReporter.d.ts",
|
|
14
15
|
"engines": {
|
|
15
16
|
"node": ">= 16.0.0"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"@atlaspack/plugin": "2.14.5-canary.
|
|
19
|
-
"@atlaspack/utils": "2.14.5-canary.
|
|
19
|
+
"@atlaspack/plugin": "2.14.5-canary.139+d2fd84977",
|
|
20
|
+
"@atlaspack/utils": "2.14.5-canary.139+d2fd84977"
|
|
20
21
|
},
|
|
21
22
|
"type": "commonjs",
|
|
22
|
-
"
|
|
23
|
-
|
|
23
|
+
"scripts": {
|
|
24
|
+
"check-ts": "tsc --emitDeclarationOnly --rootDir src"
|
|
25
|
+
},
|
|
26
|
+
"gitHead": "d2fd849770fe6305e9c694bd97b1bd905abd9d94"
|
|
27
|
+
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
// @flow strict-local
|
|
2
1
|
import path from 'path';
|
|
3
2
|
|
|
4
3
|
import {Reporter} from '@atlaspack/plugin';
|
|
5
4
|
import {generateBuildMetrics} from '@atlaspack/utils';
|
|
6
5
|
|
|
7
|
-
type TimingValue = {
|
|
8
|
-
timings: {
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
type TimingValue = {
|
|
7
|
+
timings: {
|
|
8
|
+
[key: string]: number;
|
|
9
|
+
};
|
|
10
|
+
lastPhase: string;
|
|
11
|
+
};
|
|
11
12
|
|
|
12
13
|
let timingsMap = new Map();
|
|
13
14
|
const getValue = (instanceId: string): TimingValue => {
|
|
@@ -18,11 +19,10 @@ const getValue = (instanceId: string): TimingValue => {
|
|
|
18
19
|
});
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
// $FlowFixMe
|
|
22
22
|
return timingsMap.get(instanceId);
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
export default
|
|
25
|
+
export default new Reporter({
|
|
26
26
|
async report({event, options}) {
|
|
27
27
|
if (event.type === 'buildProgress') {
|
|
28
28
|
let value = getValue(options.instanceId);
|
|
@@ -70,4 +70,4 @@ export default (new Reporter({
|
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
})
|
|
73
|
+
}) as Reporter;
|
package/tsconfig.json
ADDED