@jsenv/file-size-impact 11.0.1 → 12.1.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.
- package/index.js +2 -4
- package/package.json +6 -6
- package/readme.md +28 -25
- package/src/{getFileSizeReport.js → generateFileSizeReport.js} +7 -1
- package/src/internal/compareTwoFileSizeReports.js +3 -32
- package/src/{logFileSizeReport.js → internal/formatFileSizeReportForLog.js} +9 -6
- package/src/internal/jsenvCommentParameters.js +7 -1
- package/src/internal/manifest.js +32 -0
- package/src/reportFileSizeImpact.js +9 -28
- package/src/internal/worker_generating_file_size_report.js +0 -17
package/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export { readGitHubWorkflowEnv } from "@jsenv/github-pull-request-impact"
|
|
2
|
-
|
|
3
1
|
export { jsenvTrackingConfig } from "./src/jsenvTrackingConfig.js"
|
|
4
2
|
export { transform as raw } from "./src/rawTransformation.js"
|
|
5
3
|
export { transform as gzip } from "./src/gzipTransformation.js"
|
|
6
4
|
export { transform as brotli } from "./src/brotliTransformation.js"
|
|
5
|
+
export { generateFileSizeReport } from "./src/generateFileSizeReport.js"
|
|
7
6
|
|
|
8
|
-
export {
|
|
9
|
-
export { logFileSizeReport } from "./src/logFileSizeReport.js"
|
|
7
|
+
export { readGitHubWorkflowEnv } from "@jsenv/github-pull-request-impact"
|
|
10
8
|
export { reportFileSizeImpact } from "./src/reportFileSizeImpact.js"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/file-size-impact",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.1.1",
|
|
4
4
|
"description": "Add files size impact into pull requests",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
"node": ">=14.17.0"
|
|
12
12
|
},
|
|
13
13
|
"publishConfig": {
|
|
14
|
-
"access": "public"
|
|
15
|
-
"registry": "https://registry.npmjs.org"
|
|
14
|
+
"access": "public"
|
|
16
15
|
},
|
|
17
16
|
"type": "module",
|
|
18
17
|
"exports": {
|
|
@@ -28,7 +27,7 @@
|
|
|
28
27
|
"scripts": {
|
|
29
28
|
"eslint-check": "node ./node_modules/eslint/bin/eslint.js . --ext=.js,.mjs",
|
|
30
29
|
"generate-importmap": "node ./script/importmap/generate_importmap.mjs",
|
|
31
|
-
"measure-file-sizes": "node ./script/file_size/generate_file_size_report.mjs --
|
|
30
|
+
"measure-file-sizes": "node ./script/file_size/generate_file_size_report.mjs --log",
|
|
32
31
|
"generate-comment-snapshot-file": "node ./test/comment/generate_comment_snapshot_file.mjs",
|
|
33
32
|
"test": "node ./script/test/test.mjs",
|
|
34
33
|
"test-with-coverage": "npm run test -- --coverage",
|
|
@@ -39,9 +38,10 @@
|
|
|
39
38
|
"postpublish": "node ./script/publish/restore_postinstall.mjs"
|
|
40
39
|
},
|
|
41
40
|
"dependencies": {
|
|
41
|
+
"@jsenv/dynamic-import-worker": "1.0.0",
|
|
42
|
+
"@jsenv/filesystem": "2.3.1",
|
|
42
43
|
"@jsenv/github-pull-request-impact": "1.6.4",
|
|
43
44
|
"@jsenv/logger": "4.0.1",
|
|
44
|
-
"@jsenv/filesystem": "2.2.0",
|
|
45
45
|
"pretty-bytes": "5.6.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@jsenv/assert": "2.3.2",
|
|
51
51
|
"@jsenv/cancellation": "3.0.0",
|
|
52
52
|
"@jsenv/codecov-upload": "3.5.0",
|
|
53
|
-
"@jsenv/core": "23.0.
|
|
53
|
+
"@jsenv/core": "23.0.5",
|
|
54
54
|
"@jsenv/eslint-config": "16.0.8",
|
|
55
55
|
"@jsenv/filesystem": "2.2.0",
|
|
56
56
|
"@jsenv/github-release-package": "1.2.3",
|
package/readme.md
CHANGED
|
@@ -44,22 +44,25 @@ npm install --save-dev @jsenv/file-size-impact
|
|
|
44
44
|
_generate_file_size_report.mjs_
|
|
45
45
|
|
|
46
46
|
```js
|
|
47
|
-
import {
|
|
48
|
-
|
|
49
|
-
export const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
47
|
+
import { generateFileSizeReport } from "@jsenv/file-size-impact"
|
|
48
|
+
|
|
49
|
+
export const filesizeReport = await generateFileSizeReport({
|
|
50
|
+
log: process.argv.includes("--log"),
|
|
51
|
+
projectDirectoryUrl: new URL("./", import.meta.url),
|
|
52
|
+
trackingConfig: {
|
|
53
|
+
dist: {
|
|
54
|
+
"./dist/**/*": true,
|
|
55
|
+
"./dist/**/*.map": false,
|
|
57
56
|
},
|
|
58
|
-
}
|
|
59
|
-
}
|
|
57
|
+
},
|
|
58
|
+
})
|
|
60
59
|
```
|
|
61
60
|
|
|
62
|
-
At this stage, you could generate a file size report on your machine
|
|
61
|
+
At this stage, you could generate a file size report on your machine with the following command.
|
|
62
|
+
|
|
63
|
+
```console
|
|
64
|
+
node ./generate_file_size_report.mjs --log
|
|
65
|
+
```
|
|
63
66
|
|
|
64
67
|
Now it's time to configure a workflow to compare file size reports before and after merging a pull request.
|
|
65
68
|
|
|
@@ -176,14 +179,14 @@ In order to analyse the impact of a pull request on file size the following step
|
|
|
176
179
|
7. Analyse differences between the two file size reports
|
|
177
180
|
8. Post or update comment in the pull request
|
|
178
181
|
|
|
179
|
-
#
|
|
182
|
+
# generateFileSizeReport
|
|
180
183
|
|
|
181
|
-
|
|
184
|
+
_generateFileSizeReport_ is an async function scanning filesystem to compute a list of file sizes and return these infos into an object.
|
|
182
185
|
|
|
183
186
|
```js
|
|
184
|
-
import {
|
|
187
|
+
import { generateFileSizeReport, raw, gzip } from "@jsenv/file-size-impact"
|
|
185
188
|
|
|
186
|
-
const fileSizeReport = await
|
|
189
|
+
const fileSizeReport = await generateFileSizeReport({
|
|
187
190
|
projectDirectoryUrl: new URL("./", import.meta.url),
|
|
188
191
|
trackingConfig: {
|
|
189
192
|
dist: {
|
|
@@ -204,9 +207,9 @@ _trackingConfig_ values are objects associating a pattern to a value. This objec
|
|
|
204
207
|
For example you can create two groups named _"critical files"_ and _"remaining files"_ like this:
|
|
205
208
|
|
|
206
209
|
```js
|
|
207
|
-
import {
|
|
210
|
+
import { generateFileSizeReport } from "@jsenv/file-size-impact"
|
|
208
211
|
|
|
209
|
-
await
|
|
212
|
+
await generateFileSizeReport({
|
|
210
213
|
trackingConfig: {
|
|
211
214
|
"critical files": {
|
|
212
215
|
"./dist/main.js": true,
|
|
@@ -231,9 +234,9 @@ _transformations_ parameter is an object used to transform files content before
|
|
|
231
234
|
You can use this parameter to track file size after gzip compression.
|
|
232
235
|
|
|
233
236
|
```js
|
|
234
|
-
import {
|
|
237
|
+
import { generateFileSizeReport, raw, gzip, brotli } from "@jsenv/file-size-impact"
|
|
235
238
|
|
|
236
|
-
await
|
|
239
|
+
await generateFileSizeReport({
|
|
237
240
|
transformations: { raw, gzip, brotli },
|
|
238
241
|
})
|
|
239
242
|
```
|
|
@@ -245,9 +248,9 @@ _raw_, _gzip_ and _brotli_ compression can be enabled this way.
|
|
|
245
248
|
It's also possible to control compression level.
|
|
246
249
|
|
|
247
250
|
```js
|
|
248
|
-
import {
|
|
251
|
+
import { generateFileSizeReport, raw, gzip } from "@jsenv/file-size-impact"
|
|
249
252
|
|
|
250
|
-
await
|
|
253
|
+
await generateFileSizeReport({
|
|
251
254
|
transformations: {
|
|
252
255
|
raw,
|
|
253
256
|
gzip7: (buffer) => gzip(buffer, { level: 7 }),
|
|
@@ -259,9 +262,9 @@ await getFileSizeReport({
|
|
|
259
262
|
Finally _transformations_ can be used to add custom _transformations_.
|
|
260
263
|
|
|
261
264
|
```js
|
|
262
|
-
import {
|
|
265
|
+
import { generateFileSizeReport, raw, gzip, brotli } from "@jsenv/file-size-impact"
|
|
263
266
|
|
|
264
|
-
await
|
|
267
|
+
await generateFileSizeReport({
|
|
265
268
|
transformations: {
|
|
266
269
|
raw,
|
|
267
270
|
trim: (buffer) => String(buffer).trim(),
|
|
@@ -10,9 +10,11 @@ import {
|
|
|
10
10
|
import { transform as rawTransform } from "./rawTransformation.js"
|
|
11
11
|
import { jsenvTrackingConfig } from "./jsenvTrackingConfig.js"
|
|
12
12
|
import { applyTrackingConfig } from "./internal/applyTrackingConfig.js"
|
|
13
|
+
import { formatFileSizeReportForLog } from "./internal/formatFileSizeReportForLog.js"
|
|
13
14
|
|
|
14
|
-
export const
|
|
15
|
+
export const generateFileSizeReport = async ({
|
|
15
16
|
cancellationToken,
|
|
17
|
+
log,
|
|
16
18
|
logLevel,
|
|
17
19
|
projectDirectoryUrl,
|
|
18
20
|
trackingConfig = jsenvTrackingConfig,
|
|
@@ -60,6 +62,10 @@ export const getFileSizeReport = async ({
|
|
|
60
62
|
groups,
|
|
61
63
|
}
|
|
62
64
|
|
|
65
|
+
if (log) {
|
|
66
|
+
logger.info(formatFileSizeReportForLog(fileSizeReport))
|
|
67
|
+
}
|
|
68
|
+
|
|
63
69
|
return fileSizeReport
|
|
64
70
|
}
|
|
65
71
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { comparePathnames } from "@jsenv/filesystem"
|
|
2
|
+
|
|
3
|
+
import { manifestToMappings, manifestKeyFromRelativeUrl } from "./manifest.js"
|
|
2
4
|
|
|
3
5
|
export const compareTwoFileSizeReports = ({
|
|
4
6
|
afterMergeFileSizeReport,
|
|
@@ -146,37 +148,6 @@ const compareTwoGroups = (beforeMergeGroup, afterMergeGroup) => {
|
|
|
146
148
|
}
|
|
147
149
|
}
|
|
148
150
|
|
|
149
|
-
const ABSTRACT_DIRECTORY_URL = "file:///directory/"
|
|
150
|
-
|
|
151
|
-
const manifestToMappings = (manifestMap) => {
|
|
152
|
-
const mappings = {}
|
|
153
|
-
Object.keys(manifestMap).forEach((manifestRelativeUrl) => {
|
|
154
|
-
const manifest = manifestMap[manifestRelativeUrl]
|
|
155
|
-
const manifestAbstractUrl = resolveUrl(manifestRelativeUrl, ABSTRACT_DIRECTORY_URL)
|
|
156
|
-
Object.keys(manifest).forEach((manifestKey) => {
|
|
157
|
-
const manifestValue = manifest[manifestKey]
|
|
158
|
-
const manifestKeyAsAbstractUrl = resolveUrl(manifestKey, manifestAbstractUrl)
|
|
159
|
-
const manifestValueAsAbstractUrl = resolveUrl(manifestValue, manifestAbstractUrl)
|
|
160
|
-
const manifestKeyAsRelativeUrl = urlToRelativeUrl(
|
|
161
|
-
manifestKeyAsAbstractUrl,
|
|
162
|
-
ABSTRACT_DIRECTORY_URL,
|
|
163
|
-
)
|
|
164
|
-
const manifestValueAsRelativeUrl = urlToRelativeUrl(
|
|
165
|
-
manifestValueAsAbstractUrl,
|
|
166
|
-
ABSTRACT_DIRECTORY_URL,
|
|
167
|
-
)
|
|
168
|
-
mappings[manifestKeyAsRelativeUrl] = manifestValueAsRelativeUrl
|
|
169
|
-
})
|
|
170
|
-
})
|
|
171
|
-
return mappings
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
const manifestKeyFromRelativeUrl = (relativeUrl, mappings) => {
|
|
175
|
-
return Object.keys(mappings).find((keyCandidate) => {
|
|
176
|
-
return mappings[keyCandidate] === relativeUrl
|
|
177
|
-
})
|
|
178
|
-
}
|
|
179
|
-
|
|
180
151
|
const sortFileStructure = (fileStructure) => {
|
|
181
152
|
const relativeUrlSortedArray = Object.keys(fileStructure).sort(comparePathnames)
|
|
182
153
|
const fileStructureSorted = {}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import { formatSize } from "./
|
|
1
|
+
import { formatSize } from "./formatSize.js"
|
|
2
|
+
import { manifestToMappings, manifestKeyFromRelativeUrl } from "./manifest.js"
|
|
2
3
|
|
|
3
|
-
export const
|
|
4
|
+
export const formatFileSizeReportForLog = (fileSizeReport) => {
|
|
4
5
|
const { groups } = fileSizeReport
|
|
5
6
|
|
|
6
7
|
const groupMessages = Object.keys(groups).map((groupName) => {
|
|
7
|
-
const { fileMap } = groups[groupName]
|
|
8
|
+
const { fileMap, manifestMap } = groups[groupName]
|
|
8
9
|
|
|
10
|
+
const mappings = manifestToMappings(manifestMap)
|
|
9
11
|
const fileMessages = Object.keys(fileMap).map((fileRelativeUrl) => {
|
|
12
|
+
const fileDisplayed = manifestKeyFromRelativeUrl(fileRelativeUrl, mappings) || fileRelativeUrl
|
|
10
13
|
const file = fileMap[fileRelativeUrl]
|
|
11
14
|
const { sizeMap } = file
|
|
12
15
|
const sizeNames = Object.keys(sizeMap)
|
|
13
16
|
if (sizeNames.length === 1) {
|
|
14
|
-
return `${
|
|
17
|
+
return `${fileDisplayed}: ${formatSize(sizeMap[sizeNames[0]])}`
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
const sizesFormatted = sizeNames.map((sizeName) => {
|
|
18
21
|
return `${sizeName}: ${formatSize(sizeMap[sizeName])}`
|
|
19
22
|
})
|
|
20
|
-
return `${
|
|
23
|
+
return `${fileDisplayed}: { ${sizesFormatted.join(`, `)} }`
|
|
21
24
|
})
|
|
22
25
|
|
|
23
26
|
return `${groupName}
|
|
@@ -32,5 +35,5 @@ ${groupMessages.join(`
|
|
|
32
35
|
`)}
|
|
33
36
|
`
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
return message
|
|
36
39
|
}
|
|
@@ -108,7 +108,13 @@ export const jsenvCommentParameters = {
|
|
|
108
108
|
const formatSizeImpactAsPercentage = ({ sizeBeforeMerge, sizeAfterMerge }) => {
|
|
109
109
|
const sizeDiff = sizeAfterMerge - sizeBeforeMerge
|
|
110
110
|
const sizeDiffRatio =
|
|
111
|
-
|
|
111
|
+
sizeDiff === 0
|
|
112
|
+
? 0
|
|
113
|
+
: sizeBeforeMerge === 0
|
|
114
|
+
? 1
|
|
115
|
+
: sizeAfterMerge === 0
|
|
116
|
+
? -1
|
|
117
|
+
: sizeDiff / sizeBeforeMerge
|
|
112
118
|
const sizeDiffAsPercentage = sizeDiffRatio * 100
|
|
113
119
|
const sizeDiffAsPercentageFormatted = `${sizeDiffAsPercentage < 0 ? `-` : "+"}${Math.abs(
|
|
114
120
|
limitDecimals(sizeDiffAsPercentage, 2),
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { resolveUrl, urlToRelativeUrl } from "@jsenv/filesystem"
|
|
2
|
+
|
|
3
|
+
export const manifestToMappings = (manifestMap) => {
|
|
4
|
+
const mappings = {}
|
|
5
|
+
Object.keys(manifestMap).forEach((manifestRelativeUrl) => {
|
|
6
|
+
const manifest = manifestMap[manifestRelativeUrl]
|
|
7
|
+
const manifestAbstractUrl = resolveUrl(manifestRelativeUrl, ABSTRACT_DIRECTORY_URL)
|
|
8
|
+
Object.keys(manifest).forEach((manifestKey) => {
|
|
9
|
+
const manifestValue = manifest[manifestKey]
|
|
10
|
+
const manifestKeyAsAbstractUrl = resolveUrl(manifestKey, manifestAbstractUrl)
|
|
11
|
+
const manifestValueAsAbstractUrl = resolveUrl(manifestValue, manifestAbstractUrl)
|
|
12
|
+
const manifestKeyAsRelativeUrl = urlToRelativeUrl(
|
|
13
|
+
manifestKeyAsAbstractUrl,
|
|
14
|
+
ABSTRACT_DIRECTORY_URL,
|
|
15
|
+
)
|
|
16
|
+
const manifestValueAsRelativeUrl = urlToRelativeUrl(
|
|
17
|
+
manifestValueAsAbstractUrl,
|
|
18
|
+
ABSTRACT_DIRECTORY_URL,
|
|
19
|
+
)
|
|
20
|
+
mappings[manifestKeyAsRelativeUrl] = manifestValueAsRelativeUrl
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
return mappings
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const ABSTRACT_DIRECTORY_URL = "file:///directory/"
|
|
27
|
+
|
|
28
|
+
export const manifestKeyFromRelativeUrl = (relativeUrl, mappings) => {
|
|
29
|
+
return Object.keys(mappings).find((keyCandidate) => {
|
|
30
|
+
return mappings[keyCandidate] === relativeUrl
|
|
31
|
+
})
|
|
32
|
+
}
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
assertAndNormalizeDirectoryUrl,
|
|
4
|
-
fileSystemPathToUrl,
|
|
5
|
-
isFileSystemPath,
|
|
6
|
-
resolveUrl,
|
|
7
|
-
urlToFileSystemPath,
|
|
8
|
-
} from "@jsenv/filesystem"
|
|
1
|
+
import { assertAndNormalizeDirectoryUrl, resolveUrl } from "@jsenv/filesystem"
|
|
9
2
|
import { commentGitHubPullRequestImpact } from "@jsenv/github-pull-request-impact"
|
|
3
|
+
import { importOneExportFromFile } from "@jsenv/dynamic-import-worker"
|
|
10
4
|
|
|
11
5
|
import { formatComment } from "./internal/formatComment.js"
|
|
12
6
|
import { jsenvCommentParameters } from "./internal/jsenvCommentParameters.js"
|
|
13
7
|
|
|
14
|
-
const workerFileUrl = resolveUrl(
|
|
15
|
-
"./internal/worker_generating_file_size_report.js",
|
|
16
|
-
import.meta.url,
|
|
17
|
-
)
|
|
18
|
-
|
|
19
8
|
export const reportFileSizeImpact = async ({
|
|
20
9
|
logLevel,
|
|
21
10
|
commandLogs,
|
|
@@ -29,7 +18,7 @@ export const reportFileSizeImpact = async ({
|
|
|
29
18
|
pullRequestNumber,
|
|
30
19
|
installCommand = "npm install",
|
|
31
20
|
buildCommand = "npm run-script build",
|
|
32
|
-
|
|
21
|
+
fileSizeReportModulePath,
|
|
33
22
|
|
|
34
23
|
// We could just to ...jsenvCommentParameters but explicitely passing params
|
|
35
24
|
// helps autocompletion in vscode for dev using the function.
|
|
@@ -59,14 +48,13 @@ export const reportFileSizeImpact = async ({
|
|
|
59
48
|
throw new TypeError(`buildCommand must be a string but received ${buildCommand}`)
|
|
60
49
|
}
|
|
61
50
|
|
|
62
|
-
if (typeof
|
|
63
|
-
throw new TypeError(
|
|
51
|
+
if (typeof fileSizeReportModulePath !== "string") {
|
|
52
|
+
throw new TypeError(
|
|
53
|
+
`fileSizeReportModulePath must be a string but received ${fileSizeReportModulePath}`,
|
|
54
|
+
)
|
|
64
55
|
}
|
|
65
56
|
projectDirectoryUrl = assertAndNormalizeDirectoryUrl(projectDirectoryUrl)
|
|
66
|
-
const
|
|
67
|
-
? fileSystemPathToUrl(fileSizeModulePath)
|
|
68
|
-
: resolveUrl(fileSizeModulePath, projectDirectoryUrl)
|
|
69
|
-
const workerFilePath = urlToFileSystemPath(workerFileUrl)
|
|
57
|
+
const fileSizeReportModuleUrl = resolveUrl(fileSizeReportModulePath, projectDirectoryUrl)
|
|
70
58
|
|
|
71
59
|
return commentGitHubPullRequestImpact({
|
|
72
60
|
logLevel,
|
|
@@ -83,14 +71,7 @@ export const reportFileSizeImpact = async ({
|
|
|
83
71
|
collectInfo: async ({ execCommandInProjectDirectory }) => {
|
|
84
72
|
if (installCommand) await execCommandInProjectDirectory(installCommand)
|
|
85
73
|
if (buildCommand) await execCommandInProjectDirectory(buildCommand)
|
|
86
|
-
|
|
87
|
-
const worker = new Worker(workerFilePath)
|
|
88
|
-
const { fileSizeReport } = await new Promise((resolve, reject) => {
|
|
89
|
-
worker.postMessage({ fileSizeModuleUrl })
|
|
90
|
-
worker.on("message", resolve)
|
|
91
|
-
worker.on("error", reject)
|
|
92
|
-
})
|
|
93
|
-
|
|
74
|
+
const fileSizeReport = await importOneExportFromFile(fileSizeReportModuleUrl)
|
|
94
75
|
return { version: 1, data: fileSizeReport }
|
|
95
76
|
},
|
|
96
77
|
commentIdentifier: `<!-- Generated by @jsenv/file-size-impact -->`,
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { parentPort } from "node:worker_threads"
|
|
2
|
-
|
|
3
|
-
parentPort.once("message", async ({ fileSizeModuleUrl }) => {
|
|
4
|
-
const { generateFileSizeReport } = await import(fileSizeModuleUrl)
|
|
5
|
-
|
|
6
|
-
if (typeof generateFileSizeReport !== "function") {
|
|
7
|
-
throw new TypeError(
|
|
8
|
-
`generateFileSizeReport export must be a function, got ${generateFileSizeReport}`,
|
|
9
|
-
)
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const fileSizeReport = await generateFileSizeReport()
|
|
13
|
-
|
|
14
|
-
parentPort.postMessage({
|
|
15
|
-
fileSizeReport,
|
|
16
|
-
})
|
|
17
|
-
})
|