From 3de0fd9b83a7cbfa1ee28c01693c224ca5953874 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Mon, 12 Jul 2021 18:39:57 +0200 Subject: [PATCH] =?UTF-8?q?IDEA-273510=20Building=20of=20distribution=20?= =?UTF-8?q?=E2=80=94=20provide=20report=20like=20webpack/rollup=20do?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitOrigin-RevId: 0b838c5995df58136f4af8771144aac744902555 --- .../build/IntelliJCoreArtifactsBuilder.groovy | 2 +- .../intellij/build/tasks/mergeJars.kt | 7 +- docs/.gitignore | 2 +- docs/dist-visualizer/index.html | 17 + docs/dist-visualizer/package.json | 20 + docs/dist-visualizer/pnpm-lock.yaml | 932 ++++++++++++++++++ docs/dist-visualizer/postcss.config.js | 7 + docs/dist-visualizer/src/main.css | 4 + docs/dist-visualizer/src/main.js | 120 +++ docs/dist-visualizer/tailwind.config.js | 13 + docs/dist-visualizer/vite.config.js | 3 + intellij.idea.community.main.iml | 1 + .../dev-server/src/IdeBuilder.kt | 4 +- .../intellij/build/impl/BuildHelper.groovy | 4 +- .../build/impl/DistributionJARsBuilder.groovy | 76 +- .../intellij/build/impl/LayoutBuilder.groovy | 33 +- .../ProjectLibraryEntry.groovy | 14 +- .../ProjectStructureMapping.groovy | 100 ++ 18 files changed, 1301 insertions(+), 58 deletions(-) create mode 100644 docs/dist-visualizer/index.html create mode 100644 docs/dist-visualizer/package.json create mode 100644 docs/dist-visualizer/pnpm-lock.yaml create mode 100644 docs/dist-visualizer/postcss.config.js create mode 100644 docs/dist-visualizer/src/main.css create mode 100644 docs/dist-visualizer/src/main.js create mode 100644 docs/dist-visualizer/tailwind.config.js create mode 100644 docs/dist-visualizer/vite.config.js diff --git a/build/groovy/org/jetbrains/intellij/build/IntelliJCoreArtifactsBuilder.groovy b/build/groovy/org/jetbrains/intellij/build/IntelliJCoreArtifactsBuilder.groovy index 1a0b359a2752..22348a393692 100644 --- a/build/groovy/org/jetbrains/intellij/build/IntelliJCoreArtifactsBuilder.groovy +++ b/build/groovy/org/jetbrains/intellij/build/IntelliJCoreArtifactsBuilder.groovy @@ -106,7 +106,7 @@ final class IntelliJCoreArtifactsBuilder { void generateProjectStructureMapping(@NotNull File targetFile) { def mapping = new ProjectStructureMapping() processCoreLayout(buildContext.paths.tempDir, mapping, false) - mapping.addEntry(new ProjectLibraryEntry("annotations.jar", "jetbrains-annotations-java5", "")) + mapping.addEntry(new ProjectLibraryEntry("annotations.jar", "jetbrains-annotations-java5", null, 0)) mapping.generateJsonFile(targetFile.toPath()) } diff --git a/build/tasks/src/org/jetbrains/intellij/build/tasks/mergeJars.kt b/build/tasks/src/org/jetbrains/intellij/build/tasks/mergeJars.kt index 1d929e3bd3b7..6e23f4411679 100644 --- a/build/tasks/src/org/jetbrains/intellij/build/tasks/mergeJars.kt +++ b/build/tasks/src/org/jetbrains/intellij/build/tasks/mergeJars.kt @@ -8,14 +8,16 @@ import java.nio.channels.FileChannel import java.nio.file.Files import java.nio.file.Path -fun mergeJars(targetFile: Path, files: List) { +fun mergeJars(targetFile: Path, files: List): Map { Files.createDirectories(targetFile.parent) FileChannel.open(targetFile, RW_CREATE_NEW).use { outChannel -> val packageIndexBuilder = PackageIndexBuilder() val zipCreator = ZipFileWriter(outChannel, deflater = null) + val sizes = HashMap() for (file in files) { ImmutableZipFile.load(file).use { zipFile -> + @Suppress("SpellCheckingInspection") val entries = zipFile.entries.filter { val name = it.name !name.endsWith(".kotlin_metadata") && @@ -42,10 +44,13 @@ fun mergeJars(targetFile: Path, files: List) { } writeEntries(entries, zipCreator, zipFile) packageIndexBuilder.add(entries) + + sizes.put(file, entries.asSequence().map { it.size }.sum()) } } writeDirs(packageIndexBuilder.dirsToCreate, zipCreator) packageIndexBuilder.writePackageIndex(zipCreator) zipCreator.finish() + return sizes } } \ No newline at end of file diff --git a/docs/.gitignore b/docs/.gitignore index 399f6a9725a3..1d2232f3f766 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,4 +1,4 @@ dist -plugin-graph/node_modules +node_modules plugin-graph/plugin-graph.local.json .DS_Store \ No newline at end of file diff --git a/docs/dist-visualizer/index.html b/docs/dist-visualizer/index.html new file mode 100644 index 000000000000..4ab25b55e4a8 --- /dev/null +++ b/docs/dist-visualizer/index.html @@ -0,0 +1,17 @@ + + + + + Dist Content + + + + + +
+ + + \ No newline at end of file diff --git a/docs/dist-visualizer/package.json b/docs/dist-visualizer/package.json new file mode 100644 index 000000000000..c7d42377cb21 --- /dev/null +++ b/docs/dist-visualizer/package.json @@ -0,0 +1,20 @@ +{ + "version": "0.0.0", + "private": true, + "scripts": { + "dev": "vite", + "build": "vite build --emptyOutDir", + "deploy": "pnpm run build && space hosting publish --public ij dist-content ./dist", + "serve": "vite preview" + }, + "dependencies": { + "echarts": "^5.1.2", + "pretty-bytes": "^5.6.0" + }, + "devDependencies": { + "autoprefixer": "^10.2.6", + "postcss": "^8.3.5", + "tailwindcss": "^2.2.4", + "vite": "^2.4.2" + } +} \ No newline at end of file diff --git a/docs/dist-visualizer/pnpm-lock.yaml b/docs/dist-visualizer/pnpm-lock.yaml new file mode 100644 index 000000000000..d943ebfc859e --- /dev/null +++ b/docs/dist-visualizer/pnpm-lock.yaml @@ -0,0 +1,932 @@ +lockfileVersion: 5.3 + +specifiers: + autoprefixer: ^10.2.6 + echarts: ^5.1.2 + postcss: ^8.3.5 + pretty-bytes: ^5.6.0 + tailwindcss: ^2.2.4 + vite: ^2.4.2 + +dependencies: + echarts: 5.1.2 + pretty-bytes: 5.6.0 + +devDependencies: + autoprefixer: 10.3.0_postcss@8.3.5 + postcss: 8.3.5 + tailwindcss: 2.2.4_ab1f570292601e188570cd782149477a + vite: 2.4.2 + +packages: + + /@babel/code-frame/7.14.5: + resolution: {integrity: sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.14.5 + dev: true + + /@babel/helper-validator-identifier/7.14.5: + resolution: {integrity: sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/highlight/7.14.5: + resolution: {integrity: sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.14.5 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + + /@fullhuman/postcss-purgecss/4.0.3_postcss@8.3.5: + resolution: {integrity: sha512-/EnQ9UDWGGqHkn1UKAwSgh+gJHPKmD+Z+5dQ4gWT4qq2NUyez3zqAfZNwFH3eSgmgO+wjTXfhlLchx2M9/K+7Q==} + peerDependencies: + postcss: ^8.0.0 + dependencies: + postcss: 8.3.5 + purgecss: 4.0.3 + dev: true + + /@nodelib/fs.scandir/2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat/2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk/1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.11.1 + dev: true + + /@types/parse-json/4.0.0: + resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} + dev: true + + /acorn-node/1.8.2: + resolution: {integrity: sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==} + dependencies: + acorn: 7.4.1 + acorn-walk: 7.2.0 + xtend: 4.0.2 + dev: true + + /acorn-walk/7.2.0: + resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} + engines: {node: '>=0.4.0'} + dev: true + + /acorn/7.4.1: + resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + + /ansi-styles/3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + dependencies: + color-convert: 1.9.3 + dev: true + + /ansi-styles/4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /anymatch/3.1.2: + resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.0 + dev: true + + /arg/5.0.0: + resolution: {integrity: sha512-4P8Zm2H+BRS+c/xX1LrHw0qKpEhdlZjLCgWy+d78T9vqa2Z2SiD2wMrYuWIAFy5IZUD7nnNXroRttz+0RzlrzQ==} + dev: true + + /autoprefixer/10.3.0_postcss@8.3.5: + resolution: {integrity: sha512-BzVzdjs47nT3MphTddr8eSsPVEIUCF96X6iC8V5iEB8RtxrU+ybtdhHV5rsqRqOsoyh/acQaYs7YupHPUECgmg==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + dependencies: + browserslist: 4.16.6 + caniuse-lite: 1.0.30001243 + colorette: 1.2.2 + fraction.js: 4.1.1 + normalize-range: 0.1.2 + postcss: 8.3.5 + postcss-value-parser: 4.1.0 + dev: true + + /balanced-match/1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /binary-extensions/2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: true + + /brace-expansion/1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /braces/3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /browserslist/4.16.6: + resolution: {integrity: sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001243 + colorette: 1.2.2 + electron-to-chromium: 1.3.772 + escalade: 3.1.1 + node-releases: 1.1.73 + dev: true + + /bytes/3.1.0: + resolution: {integrity: sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==} + engines: {node: '>= 0.8'} + dev: true + + /callsites/3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + dev: true + + /camelcase-css/2.0.1: + resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} + engines: {node: '>= 6'} + dev: true + + /caniuse-lite/1.0.30001243: + resolution: {integrity: sha512-vNxw9mkTBtkmLFnJRv/2rhs1yufpDfCkBZexG3Y0xdOH2Z/eE/85E4Dl5j1YUN34nZVsSp6vVRFQRrez9wJMRA==} + dev: true + + /chalk/2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + dev: true + + /chalk/4.1.1: + resolution: {integrity: sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /chokidar/3.5.2: + resolution: {integrity: sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.2 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.1 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /color-convert/1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + dependencies: + color-name: 1.1.3 + dev: true + + /color-convert/2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name/1.1.3: + resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=} + dev: true + + /color-name/1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /color-string/1.5.5: + resolution: {integrity: sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==} + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + dev: true + + /color/3.1.3: + resolution: {integrity: sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ==} + dependencies: + color-convert: 1.9.3 + color-string: 1.5.5 + dev: true + + /colorette/1.2.2: + resolution: {integrity: sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==} + dev: true + + /commander/6.2.1: + resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==} + engines: {node: '>= 6'} + dev: true + + /concat-map/0.0.1: + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + dev: true + + /cosmiconfig/7.0.0: + resolution: {integrity: sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==} + engines: {node: '>=10'} + dependencies: + '@types/parse-json': 4.0.0 + import-fresh: 3.3.0 + parse-json: 5.2.0 + path-type: 4.0.0 + yaml: 1.10.2 + dev: true + + /css-unit-converter/1.1.2: + resolution: {integrity: sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA==} + dev: true + + /cssesc/3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + dev: true + + /defined/1.0.0: + resolution: {integrity: sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=} + dev: true + + /detective/5.2.0: + resolution: {integrity: sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==} + engines: {node: '>=0.8.0'} + hasBin: true + dependencies: + acorn-node: 1.8.2 + defined: 1.0.0 + minimist: 1.2.5 + dev: true + + /didyoumean/1.2.2: + resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + dev: true + + /dlv/1.1.3: + resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + dev: true + + /echarts/5.1.2: + resolution: {integrity: sha512-okUhO4sw22vwZp+rTPNjd/bvTdpug4K4sHNHyrV8NdAncIX9/AarlolFqtJCAYKGFYhUBNjIWu1EznFrSWTFxg==} + dependencies: + tslib: 2.0.3 + zrender: 5.1.1 + dev: false + + /electron-to-chromium/1.3.772: + resolution: {integrity: sha512-X/6VRCXWALzdX+RjCtBU6cyg8WZgoxm9YA02COmDOiNJEZ59WkQggDbWZ4t/giHi/3GS+cvdrP6gbLISANAGYA==} + dev: true + + /error-ex/1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + dependencies: + is-arrayish: 0.2.1 + dev: true + + /esbuild/0.12.9: + resolution: {integrity: sha512-MWRhAbMOJ9RJygCrt778rz/qNYgA4ZVj6aXnNPxFjs7PmIpb0fuB9Gmg5uWrr6n++XKwwm/RmSz6RR5JL2Ocsw==} + hasBin: true + requiresBuild: true + dev: true + + /escalade/3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} + dev: true + + /escape-string-regexp/1.0.5: + resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=} + engines: {node: '>=0.8.0'} + dev: true + + /fast-glob/3.2.7: + resolution: {integrity: sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==} + engines: {node: '>=8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.4 + dev: true + + /fastq/1.11.1: + resolution: {integrity: sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==} + dependencies: + reusify: 1.0.4 + dev: true + + /fill-range/7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /fraction.js/4.1.1: + resolution: {integrity: sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg==} + dev: true + + /fs-extra/10.0.0: + resolution: {integrity: sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==} + engines: {node: '>=12'} + dependencies: + graceful-fs: 4.2.6 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: true + + /fs.realpath/1.0.0: + resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} + dev: true + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + dev: true + optional: true + + /function-bind/1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: true + + /glob-parent/5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.1 + dev: true + + /glob-parent/6.0.0: + resolution: {integrity: sha512-Hdd4287VEJcZXUwv1l8a+vXC1GjOQqXe+VS30w/ypihpcnu9M1n3xeYeJu5CBpeEQj2nAab2xxz28GuA3vp4Ww==} + engines: {node: '>=10.13.0'} + dependencies: + is-glob: 4.0.1 + dev: true + + /glob/7.1.7: + resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.0.4 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /graceful-fs/4.2.6: + resolution: {integrity: sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==} + dev: true + + /has-flag/3.0.0: + resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=} + engines: {node: '>=4'} + dev: true + + /has-flag/4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /has/1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + dependencies: + function-bind: 1.1.1 + dev: true + + /html-tags/3.1.0: + resolution: {integrity: sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==} + engines: {node: '>=8'} + dev: true + + /import-cwd/3.0.0: + resolution: {integrity: sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==} + engines: {node: '>=8'} + dependencies: + import-from: 3.0.0 + dev: true + + /import-fresh/3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: true + + /import-from/3.0.0: + resolution: {integrity: sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==} + engines: {node: '>=8'} + dependencies: + resolve-from: 5.0.0 + dev: true + + /inflight/1.0.6: + resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits/2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true + + /is-arrayish/0.2.1: + resolution: {integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=} + dev: true + + /is-arrayish/0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + dev: true + + /is-binary-path/2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: true + + /is-core-module/2.4.0: + resolution: {integrity: sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==} + dependencies: + has: 1.0.3 + dev: true + + /is-extglob/2.1.1: + resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} + engines: {node: '>=0.10.0'} + dev: true + + /is-glob/4.0.1: + resolution: {integrity: sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-number/7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /js-tokens/4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: true + + /json-parse-even-better-errors/2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + dev: true + + /jsonfile/6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.0 + optionalDependencies: + graceful-fs: 4.2.6 + dev: true + + /lilconfig/2.0.3: + resolution: {integrity: sha512-EHKqr/+ZvdKCifpNrJCKxBTgk5XupZA3y/aCPY9mxfgBzmgh93Mt/WqjjQ38oMxXuvDokaKiM3lAgvSH2sjtHg==} + engines: {node: '>=10'} + dev: true + + /lines-and-columns/1.1.6: + resolution: {integrity: sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=} + dev: true + + /lodash.toarray/4.4.0: + resolution: {integrity: sha1-JMS/zWsvuji/0FlNsRedjptlZWE=} + dev: true + + /lodash.topath/4.5.2: + resolution: {integrity: sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=} + dev: true + + /lodash/4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true + + /merge2/1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /micromatch/4.0.4: + resolution: {integrity: sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.0 + dev: true + + /minimatch/3.0.4: + resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimist/1.2.5: + resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} + dev: true + + /modern-normalize/1.1.0: + resolution: {integrity: sha512-2lMlY1Yc1+CUy0gw4H95uNN7vjbpoED7NNRSBHE25nWfLBdmMzFCsPshlzbxHz+gYMcBEUN8V4pU16prcdPSgA==} + engines: {node: '>=6'} + dev: true + + /nanoid/3.1.23: + resolution: {integrity: sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /node-emoji/1.10.0: + resolution: {integrity: sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw==} + dependencies: + lodash.toarray: 4.4.0 + dev: true + + /node-releases/1.1.73: + resolution: {integrity: sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==} + dev: true + + /normalize-path/3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + + /normalize-range/0.1.2: + resolution: {integrity: sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=} + engines: {node: '>=0.10.0'} + dev: true + + /object-hash/2.2.0: + resolution: {integrity: sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==} + engines: {node: '>= 6'} + dev: true + + /once/1.4.0: + resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=} + dependencies: + wrappy: 1.0.2 + dev: true + + /parent-module/1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + dependencies: + callsites: 3.1.0 + dev: true + + /parse-json/5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + dependencies: + '@babel/code-frame': 7.14.5 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.1.6 + dev: true + + /path-is-absolute/1.0.1: + resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} + engines: {node: '>=0.10.0'} + dev: true + + /path-parse/1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true + + /path-type/4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: true + + /picomatch/2.3.0: + resolution: {integrity: sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==} + engines: {node: '>=8.6'} + dev: true + + /postcss-js/3.0.3: + resolution: {integrity: sha512-gWnoWQXKFw65Hk/mi2+WTQTHdPD5UJdDXZmX073EY/B3BWnYjO4F4t0VneTCnCGQ5E5GsCdMkzPaTXwl3r5dJw==} + engines: {node: '>=10.0'} + dependencies: + camelcase-css: 2.0.1 + postcss: 8.3.5 + dev: true + + /postcss-load-config/3.1.0: + resolution: {integrity: sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==} + engines: {node: '>= 10'} + peerDependencies: + ts-node: '>=9.0.0' + peerDependenciesMeta: + ts-node: + optional: true + dependencies: + import-cwd: 3.0.0 + lilconfig: 2.0.3 + yaml: 1.10.2 + dev: true + + /postcss-nested/5.0.5_postcss@8.3.5: + resolution: {integrity: sha512-GSRXYz5bccobpTzLQZXOnSOfKl6TwVr5CyAQJUPub4nuRJSOECK5AqurxVgmtxP48p0Kc/ndY/YyS1yqldX0Ew==} + engines: {node: '>=10.0'} + peerDependencies: + postcss: ^8.1.13 + dependencies: + postcss: 8.3.5 + postcss-selector-parser: 6.0.6 + dev: true + + /postcss-selector-parser/6.0.6: + resolution: {integrity: sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==} + engines: {node: '>=4'} + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + dev: true + + /postcss-value-parser/3.3.1: + resolution: {integrity: sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==} + dev: true + + /postcss-value-parser/4.1.0: + resolution: {integrity: sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==} + dev: true + + /postcss/8.3.5: + resolution: {integrity: sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + colorette: 1.2.2 + nanoid: 3.1.23 + source-map-js: 0.6.2 + dev: true + + /pretty-bytes/5.6.0: + resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} + engines: {node: '>=6'} + dev: false + + /pretty-hrtime/1.0.3: + resolution: {integrity: sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=} + engines: {node: '>= 0.8'} + dev: true + + /purgecss/4.0.3: + resolution: {integrity: sha512-PYOIn5ibRIP34PBU9zohUcCI09c7drPJJtTDAc0Q6QlRz2/CHQ8ywGLdE7ZhxU2VTqB7p5wkvj5Qcm05Rz3Jmw==} + hasBin: true + dependencies: + commander: 6.2.1 + glob: 7.1.7 + postcss: 8.3.5 + postcss-selector-parser: 6.0.6 + dev: true + + /queue-microtask/1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /quick-lru/5.1.1: + resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} + engines: {node: '>=10'} + dev: true + + /readdirp/3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.0 + dev: true + + /reduce-css-calc/2.1.8: + resolution: {integrity: sha512-8liAVezDmUcH+tdzoEGrhfbGcP7nOV4NkGE3a74+qqvE7nt9i4sKLGBuZNOnpI4WiGksiNPklZxva80061QiPg==} + dependencies: + css-unit-converter: 1.1.2 + postcss-value-parser: 3.3.1 + dev: true + + /resolve-from/4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + dev: true + + /resolve-from/5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + dev: true + + /resolve/1.20.0: + resolution: {integrity: sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==} + dependencies: + is-core-module: 2.4.0 + path-parse: 1.0.7 + dev: true + + /reusify/1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /rimraf/3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true + dependencies: + glob: 7.1.7 + dev: true + + /rollup/2.52.2: + resolution: {integrity: sha512-4RlFC3k2BIHlUsJ9mGd8OO+9Lm2eDF5P7+6DNQOp5sx+7N/1tFM01kELfbxlMX3MxT6owvLB1ln4S3QvvQlbUA==} + engines: {node: '>=10.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /run-parallel/1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /simple-swizzle/0.2.2: + resolution: {integrity: sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=} + dependencies: + is-arrayish: 0.3.2 + dev: true + + /source-map-js/0.6.2: + resolution: {integrity: sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==} + engines: {node: '>=0.10.0'} + dev: true + + /supports-color/5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + dependencies: + has-flag: 3.0.0 + dev: true + + /supports-color/7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /tailwindcss/2.2.4_ab1f570292601e188570cd782149477a: + resolution: {integrity: sha512-OdBCPgazNNsknSP+JfrPzkay9aqKjhKtFhbhgxHgvEFdHy/GuRPo2SCJ4w1SFTN8H6FPI4m6qD/Jj20NWY1GkA==} + engines: {node: '>=12.13.0'} + hasBin: true + peerDependencies: + autoprefixer: ^10.0.2 + postcss: ^8.0.9 + dependencies: + '@fullhuman/postcss-purgecss': 4.0.3_postcss@8.3.5 + arg: 5.0.0 + autoprefixer: 10.3.0_postcss@8.3.5 + bytes: 3.1.0 + chalk: 4.1.1 + chokidar: 3.5.2 + color: 3.1.3 + cosmiconfig: 7.0.0 + detective: 5.2.0 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.2.7 + fs-extra: 10.0.0 + glob-parent: 6.0.0 + html-tags: 3.1.0 + is-glob: 4.0.1 + lodash: 4.17.21 + lodash.topath: 4.5.2 + modern-normalize: 1.1.0 + node-emoji: 1.10.0 + normalize-path: 3.0.0 + object-hash: 2.2.0 + postcss: 8.3.5 + postcss-js: 3.0.3 + postcss-load-config: 3.1.0 + postcss-nested: 5.0.5_postcss@8.3.5 + postcss-selector-parser: 6.0.6 + postcss-value-parser: 4.1.0 + pretty-hrtime: 1.0.3 + quick-lru: 5.1.1 + reduce-css-calc: 2.1.8 + resolve: 1.20.0 + tmp: 0.2.1 + transitivePeerDependencies: + - ts-node + dev: true + + /tmp/0.2.1: + resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==} + engines: {node: '>=8.17.0'} + dependencies: + rimraf: 3.0.2 + dev: true + + /to-regex-range/5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /tslib/2.0.3: + resolution: {integrity: sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==} + dev: false + + /universalify/2.0.0: + resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + engines: {node: '>= 10.0.0'} + dev: true + + /util-deprecate/1.0.2: + resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} + dev: true + + /vite/2.4.2: + resolution: {integrity: sha512-2MifxD2I9fjyDmmEzbULOo3kOUoqX90A58cT6mECxoVQlMYFuijZsPQBuA14mqSwvV3ydUsqnq+BRWXyO9Qa+w==} + engines: {node: '>=12.0.0'} + hasBin: true + dependencies: + esbuild: 0.12.9 + postcss: 8.3.5 + resolve: 1.20.0 + rollup: 2.52.2 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /wrappy/1.0.2: + resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} + dev: true + + /xtend/4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + dev: true + + /yaml/1.10.2: + resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} + engines: {node: '>= 6'} + dev: true + + /zrender/5.1.1: + resolution: {integrity: sha512-oeWlmUZPQdS9f5hK4pV21tHPqA3wgQ7CkKkw7l0CCBgWlJ/FP+lRgLFtUBW6yam4JX8y9CdHJo1o587VVrbcoQ==} + dependencies: + tslib: 2.0.3 + dev: false diff --git a/docs/dist-visualizer/postcss.config.js b/docs/dist-visualizer/postcss.config.js new file mode 100644 index 000000000000..2c75474bc6b9 --- /dev/null +++ b/docs/dist-visualizer/postcss.config.js @@ -0,0 +1,7 @@ +// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/docs/dist-visualizer/src/main.css b/docs/dist-visualizer/src/main.css new file mode 100644 index 000000000000..677889857381 --- /dev/null +++ b/docs/dist-visualizer/src/main.css @@ -0,0 +1,4 @@ +/* Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. */ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/docs/dist-visualizer/src/main.js b/docs/dist-visualizer/src/main.js new file mode 100644 index 000000000000..52b28c542fb2 --- /dev/null +++ b/docs/dist-visualizer/src/main.js @@ -0,0 +1,120 @@ +// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +import "./main.css" +import {TreemapChart} from "echarts/charts" +import {CanvasRenderer} from "echarts/renderers" +import {init as initChart, throttle, use} from "echarts/core" +import {ToolboxComponent, TooltipComponent} from "echarts/components" +import prettyBytes from "pretty-bytes" + +use([TooltipComponent, CanvasRenderer, TreemapChart, ToolboxComponent]) + +async function init() { + const fileInput = document.getElementById("fileInput") + fileInput.addEventListener("change", event => { + handleFile(event.target.files[0]) + }) + + const dropbox = document.body + dropbox.addEventListener("dragenter", preventDefault) + dropbox.addEventListener("dragover", preventDefault) + dropbox.addEventListener("drop", event => { + event.stopPropagation() + event.preventDefault() + + const file = event.dataTransfer.files[0] + // noinspection JSCheckFunctionSignatures + const timeFormat = new Intl.DateTimeFormat("default", { + timeStyle: "medium", + }) + document.title = `${file.name} (${timeFormat.format(new Date())})` + handleFile(file) + }) + + const data = localStorage.getItem("data") + if (data != null) { + updateChart(JSON.parse(data)) + } +} + +let chart + +function createChart() { + const chartManager = new ChartManagerHelper(document.getElementById("app")) + chart = chartManager.chart + chart.setOption({ + toolbox: { + feature: { + saveAsImage: {}, + }, + }, + tooltip: { + formatter: info => { + let result = `${info.marker} ${info.name}` + return result + `${prettyBytes(info.value, {binary: true})}` + }, + }, + }) +} + +function preventDefault(e) { + e.stopPropagation(); + e.preventDefault(); +} + +function handleFile(selectedFile) { + selectedFile.text().then(it => { + localStorage.setItem("data", it) + updateChart(JSON.parse(it)) + }) +} + +function updateChart(data) { + if (chart == null) { + createChart() + } + + chart.setOption({ + series: [{ + type: "treemap", + data, + levels: [ + {}, + { + colorSaturation: [0.35, 0.5], + itemStyle: { + borderWidth: 5, + gapWidth: 1, + borderColorSaturation: 0.6, + }, + upperLabel: {show: true}, + }, + ], + leafDepth: 2, + label: { + // formatter(data) { + // return `${(data.data as ItemExtraInfo).abbreviatedName} (${numberFormat.format(data["value"] as number)})` + // } + } + }], + }) +} + +class ChartManagerHelper { + constructor(container) { + this.chart = initChart(container) + + this.resizeObserver = new ResizeObserver(throttle(() => { + this.chart.resize() + }, 300)) + this.resizeObserver.observe(this.chart.getDom()) + } + + dispose() { + this.resizeObserver.unobserve(this.chart.getDom()) + this.chart.dispose() + } +} + +init().catch(e => { + console.error(e) +}) \ No newline at end of file diff --git a/docs/dist-visualizer/tailwind.config.js b/docs/dist-visualizer/tailwind.config.js new file mode 100644 index 000000000000..9fd7fd6a12f2 --- /dev/null +++ b/docs/dist-visualizer/tailwind.config.js @@ -0,0 +1,13 @@ +// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +module.exports = { + purge: ["./index.html", "./src/**/*.{vue,ts,js}"], + darkMode: "class", + mode: "jit", + theme: { + extend: {}, + }, + variants: { + extend: {}, + }, + plugins: [], +} diff --git a/docs/dist-visualizer/vite.config.js b/docs/dist-visualizer/vite.config.js new file mode 100644 index 000000000000..d4b213c96ea8 --- /dev/null +++ b/docs/dist-visualizer/vite.config.js @@ -0,0 +1,3 @@ +// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +export default { +} \ No newline at end of file diff --git a/intellij.idea.community.main.iml b/intellij.idea.community.main.iml index b28c7237c2bd..24d411b01218 100644 --- a/intellij.idea.community.main.iml +++ b/intellij.idea.community.main.iml @@ -7,6 +7,7 @@ + diff --git a/platform/build-scripts/dev-server/src/IdeBuilder.kt b/platform/build-scripts/dev-server/src/IdeBuilder.kt index e9ed0a940903..f4b44df3eaef 100644 --- a/platform/build-scripts/dev-server/src/IdeBuilder.kt +++ b/platform/build-scripts/dev-server/src/IdeBuilder.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.intellij.build.devServer import com.intellij.util.PathUtilRt @@ -139,7 +139,7 @@ private fun createLibClassPath(buildContext: BuildContext, classPath.add(buildContext.getModuleOutputPath(buildContext.findRequiredModule(entry.moduleName))) } is ProjectLibraryEntry -> { - classPath.add(entry.libraryFilePath) + classPath.add(entry.libraryFile.toString()) } is ModuleLibraryFileEntry -> { classPath.add(entry.libraryFilePath) diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/BuildHelper.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/BuildHelper.groovy index 6eb1e24aca05..f7b28844dabd 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/BuildHelper.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/BuildHelper.groovy @@ -75,8 +75,8 @@ final class BuildHelper { string, path, logger)) mergeJars = lookup.findStatic(helperClassLoader.loadClass("org.jetbrains.intellij.build.tasks.MergeJarsKt"), - "mergeJars", - MethodType.methodType(voidClass, path, List.class as Class)) + "mergeJars", + MethodType.methodType(Map.class as Class, path, List.class as Class)) } static void copyDir(Path fromDir, Path targetDir, BuildContext buildContext) { diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/DistributionJARsBuilder.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/DistributionJARsBuilder.groovy index f8c204850b71..61d1c73a4e22 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/DistributionJARsBuilder.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/DistributionJARsBuilder.groovy @@ -1,6 +1,7 @@ // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.intellij.build.impl + import com.intellij.openapi.util.Pair import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.io.FileUtilRt @@ -44,7 +45,6 @@ import java.util.stream.Collectors import java.util.stream.Stream import java.util.zip.ZipEntry import java.util.zip.ZipOutputStream - /** * Assembles output of modules to platform JARs (in {@link org.jetbrains.intellij.build.BuildPaths#distAll distAll}/lib directory), * bundled plugins' JARs (in {@link org.jetbrains.intellij.build.BuildPaths#distAll distAll}/plugins directory) and zip archives with @@ -60,6 +60,8 @@ final class DistributionJARsBuilder { private static final String THIRD_PARTY_LIBRARIES_FILE_PATH = "license/third-party-libraries.html" private static final String PLUGINS_DIRECTORY = "plugins" + private static final String UBER_JAR_NAME = "3rd-party.jar" + private final BuildContext buildContext final ProjectStructureMapping projectStructureMapping = new ProjectStructureMapping() final PlatformLayout platform @@ -196,6 +198,13 @@ final class DistributionJARsBuilder { buildNonBundledPluginsBlockMaps() } buildThirdPartyLibrariesList(projectStructureMapping) + + Path artifactOut = Path.of(buildContext.paths.artifacts) + Files.createDirectories(artifactOut) + projectStructureMapping.generateJsonFile(artifactOut.resolve("content-mapping.json")) + Files.newBufferedWriter(artifactOut.resolve("content.json")).withCloseable { + ProjectStructureMapping.buildJarContentReport(projectStructureMapping, it, buildContext.paths) + } } static void reorderJars(@NotNull BuildContext buildContext) { @@ -1018,7 +1027,7 @@ final class DistributionJARsBuilder { boolean mergeLibs, BuildContext buildContext) { Map copiedFiles = new HashMap<>() - Map> toMerge = mergeLibs ? new HashMap>() : Collections.>emptyMap() + Map> toMerge = mergeLibs ? new HashMap>() : Collections.>emptyMap() boolean copyFiles = layoutSpec.copyFiles libProcessing: @@ -1049,35 +1058,35 @@ final class DistributionJARsBuilder { } } - if (copyFiles) { - String lowerCasedLibName = libName.toLowerCase() - if (mergeLibs) { - String uberJarName - if (!excludedFromMergeLibs.contains(libName) && - !libName.startsWith("kotlin") && !libName.startsWith("rd-") && - !lowerCasedLibName.contains("annotations") && - !lowerCasedLibName.startsWith("junit") && - !lowerCasedLibName.startsWith("cucumber-") && - !lowerCasedLibName.contains("groovy")) { - uberJarName = "3rd-party.jar" - buildContext.messages.debug(" pack $libName into $uberJarName") - } - else { - uberJarName = null - } + String lowerCasedLibName = libName.toLowerCase() + if (mergeLibs && + !excludedFromMergeLibs.contains(libName) && + !libName.startsWith("kotlin") && !libName.startsWith("rd-") && + !lowerCasedLibName.contains("annotations") && + !lowerCasedLibName.startsWith("junit") && + !lowerCasedLibName.startsWith("cucumber-") && + !lowerCasedLibName.contains("groovy")) { + buildContext.messages.debug(" pack $libName into $UBER_JAR_NAME") - if (uberJarName != null) { - toMerge.computeIfAbsent(uberJarName, { new ArrayList<>() }).addAll(nioFiles) - layoutSpec.addLibraryMapping(library, uberJarName, outputDir.resolve(uberJarName).toString()) - continue libProcessing + if (copyFiles) { + toMerge.put(library, nioFiles) + } + else { + for (Path nioFile : nioFiles) { + layoutSpec.addLibraryMapping(library, UBER_JAR_NAME, nioFile) } } + continue libProcessing + } + if (copyFiles) { Files.createDirectories(libOutputDir) if (!removeVersionFromJarName && nioFiles.size() > 1 && lowerCasedLibName != "gradle") { Path targetFile = outputDir.resolve(FileUtil.sanitizeFileName(lowerCasedLibName, false) + ".jar") BuildHelper.getInstance(buildContext).mergeJars.invokeWithArguments(targetFile, nioFiles) - layoutSpec.addLibraryMapping(library, targetFile.fileName.toString(), targetFile.toString()) + for (Path nioFile : nioFiles) { + layoutSpec.addLibraryMapping(library, targetFile.fileName.toString(), nioFile) + } continue libProcessing } } @@ -1089,14 +1098,14 @@ final class DistributionJARsBuilder { if (copyFiles) { Files.copy(file, libOutputDir.resolve(newName)) } - layoutSpec.addLibraryMapping(library, newName, file.toString()) + layoutSpec.addLibraryMapping(library, newName, file) buildContext.messages.debug(" include $newName (renamed from $file) from library '${LayoutBuilder.LayoutSpec.getLibraryName(library)}'") } else { if (copyFiles) { Files.copy(file, libOutputDir.resolve(file.fileName)) } - layoutSpec.addLibraryMapping(library, file.fileName.toString(), file.toString()) + layoutSpec.addLibraryMapping(library, file.fileName.toString(), file) buildContext.messages.debug(" include $file from library '${LayoutBuilder.LayoutSpec.getLibraryName(library)}'") } } @@ -1104,11 +1113,18 @@ final class DistributionJARsBuilder { if (!toMerge.isEmpty()) { MethodHandle mergeJarsMethod = BuildHelper.getInstance(buildContext).mergeJars - for (Map.Entry> entry : toMerge.entrySet()) { - List list = entry.value - list.sort(null) - buildContext.messages.debug(" merge $list to ${entry.key}") - mergeJarsMethod.invokeWithArguments(outputDir.resolve(entry.key), list) + List allFiles = new ArrayList<>() + for (Map.Entry> entry : toMerge.entrySet()) { + allFiles.addAll(entry.value) + } + allFiles.sort(null) + buildContext.messages.debug(" merge $allFiles to $UBER_JAR_NAME") + Path uberJarFile = outputDir.resolve(UBER_JAR_NAME) + Map sizes = mergeJarsMethod.invokeWithArguments(uberJarFile, allFiles) as Map + for (Map.Entry> entry : toMerge.entrySet()) { + for (Path nioFile : entry.value) { + layoutSpec.addProjectLibraryMapping(entry.key, nioFile, sizes.get(nioFile), uberJarFile) + } } } } diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/LayoutBuilder.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/LayoutBuilder.groovy index 27b5d4240f80..3c63f1df2d3c 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/LayoutBuilder.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/LayoutBuilder.groovy @@ -1,20 +1,15 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.intellij.build.impl import com.intellij.openapi.util.io.FileUtil import com.intellij.util.PathUtilRt -import com.intellij.util.SystemProperties import com.intellij.util.containers.MultiMap import groovy.transform.CompileStatic import groovy.transform.TypeCheckingMode import org.apache.tools.ant.AntClassLoader import org.jetbrains.annotations.NotNull import org.jetbrains.intellij.build.CompilationContext -import org.jetbrains.intellij.build.impl.projectStructureMapping.ModuleLibraryFileEntry -import org.jetbrains.intellij.build.impl.projectStructureMapping.ModuleOutputEntry -import org.jetbrains.intellij.build.impl.projectStructureMapping.ModuleTestOutputEntry -import org.jetbrains.intellij.build.impl.projectStructureMapping.ProjectLibraryEntry -import org.jetbrains.intellij.build.impl.projectStructureMapping.ProjectStructureMapping +import org.jetbrains.intellij.build.impl.projectStructureMapping.* import org.jetbrains.jps.model.artifact.JpsArtifact import org.jetbrains.jps.model.artifact.JpsArtifactService import org.jetbrains.jps.model.artifact.elements.JpsArchivePackagingElement @@ -304,14 +299,14 @@ final class LayoutBuilder { if (copyFiles) { ant.renamedFile(filePath: file.absolutePath, newName: newName) } - addLibraryMapping(library, newName, file.absolutePath) + addLibraryMapping(library, newName, file.toPath()) context.messages.debug(" include $newName (renamed from $file.absolutePath) from library '${getLibraryName(library)}'") } else { if (copyFiles) { ant.fileset(file: file.absolutePath) } - addLibraryMapping(library, file.name, file.absolutePath) + addLibraryMapping(library, file.name, file.toPath()) context.messages.debug(" include $file.name ($file.absolutePath) from library '${getLibraryName(library)}'") } } @@ -343,20 +338,26 @@ final class LayoutBuilder { return name } - void addLibraryMapping(JpsLibrary library, String outputFileName, String libraryFilePath) { - def outputFilePath = getCurrentPathString().isEmpty() ? outputFileName : getCurrentPathString() + "/" + outputFileName + void addLibraryMapping(JpsLibrary library, String outputFileName, Path libraryFile) { def parentReference = library.createReference().parentReference if (parentReference instanceof JpsModuleReference) { - def projectHome = context.paths.projectHome + File.separator - def mavenLocalRepo = new File(SystemProperties.getUserHome(), ".m2/repository").absolutePath + File.separator - String shortenedPath = libraryFilePath.replace(projectHome, "\$PROJECT_DIR\$/").replace(mavenLocalRepo, "\$MAVEN_REPOSITORY\$/") - projectStructureMapping.addEntry(new ModuleLibraryFileEntry(outputFilePath, shortenedPath, libraryFilePath)) + String shortenedPath = ProjectStructureMapping.shortenPath(libraryFile, context.paths) + projectStructureMapping.addEntry(new ModuleLibraryFileEntry(getOutputFilePath(outputFileName), shortenedPath, libraryFile.toString())) } else { - projectStructureMapping.addEntry(new ProjectLibraryEntry(outputFilePath, library.name, libraryFilePath)) + projectStructureMapping.addEntry(new ProjectLibraryEntry(getOutputFilePath(outputFileName), library.name, libraryFile, 0)) } } + void addProjectLibraryMapping(JpsLibrary library, Path libraryFile, int fileSize, Path outputFile) { + assert !(library.createReference().parentReference instanceof JpsModuleReference) + projectStructureMapping.addEntry(new ProjectLibraryEntry(getOutputFilePath(outputFile.fileName.toString()), library.name, libraryFile, fileSize)) + } + + private String getOutputFilePath(String outputFileName) { + return currentPath.isEmpty() ? outputFileName : getCurrentPathString() + "/" + outputFileName + } + private void addArtifactMapping(@NotNull JpsArtifact artifact) { JpsCompositePackagingElement rootElement = artifact.getRootElement() String artifactFilePath = getCurrentPathString() diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/projectStructureMapping/ProjectLibraryEntry.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/projectStructureMapping/ProjectLibraryEntry.groovy index 851df393d42b..5167d03c8838 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/projectStructureMapping/ProjectLibraryEntry.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/projectStructureMapping/ProjectLibraryEntry.groovy @@ -1,21 +1,25 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.intellij.build.impl.projectStructureMapping import groovy.transform.AutoClone import groovy.transform.CompileStatic +import java.nio.file.Path + /** * Represents a project-level library */ @CompileStatic @AutoClone final class ProjectLibraryEntry extends DistributionFileEntry { - String libraryName - String libraryFilePath + final String libraryName + final transient Path libraryFile + final int fileSize - ProjectLibraryEntry(String path, String libraryName, String libraryFilePath) { + ProjectLibraryEntry(String path, String libraryName, Path libraryFile, int fileSize) { super(path, "project-library") this.libraryName = libraryName - this.libraryFilePath = libraryFilePath + this.libraryFile = libraryFile + this.fileSize = fileSize } } diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/projectStructureMapping/ProjectStructureMapping.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/projectStructureMapping/ProjectStructureMapping.groovy index e6a3f92cc530..9be063e99dec 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/projectStructureMapping/ProjectStructureMapping.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/projectStructureMapping/ProjectStructureMapping.groovy @@ -2,7 +2,10 @@ package org.jetbrains.intellij.build.impl.projectStructureMapping import com.google.gson.GsonBuilder +import com.google.gson.stream.JsonWriter +import com.intellij.util.SystemProperties import groovy.transform.CompileStatic +import org.jetbrains.intellij.build.BuildPaths import java.nio.file.Files import java.nio.file.Path @@ -58,4 +61,101 @@ final class ProjectStructureMapping { new GsonBuilder().setPrettyPrinting().create().toJson(entries, it) } } + + static void buildJarContentReport(ProjectStructureMapping projectStructureMapping, Writer out, BuildPaths buildPaths) { + // jackson is not available in build scripts - use GSON + JsonWriter writer = new JsonWriter(out) + writer.setIndent(" ") + + List entries = projectStructureMapping.entries + Map> fileToEntry = new HashMap<>() + for (DistributionFileEntry entry : entries) { + fileToEntry.computeIfAbsent(entry.path, { new ArrayList() }).add(entry) + } + + List files = fileToEntry.keySet().toList() + files.sort(null) + + writer.beginArray() + for (String file : files) { + List fileEntries = fileToEntry.get(file) + writer.beginObject() + writer.name("name").value(file); + + writer.name("children") + writer.beginArray() + writeProjectLibs(fileEntries, writer, buildPaths) + for (DistributionFileEntry entry : fileEntries) { + if (entry instanceof ProjectLibraryEntry) { + continue + } + + writer.beginObject() + + long fileSize = 0 + if (entry instanceof ModuleOutputEntry) { + writer.name("name").value(entry.moduleName) + // well, the only possible way to compute the size of the module - calculate it as part of writing to JAR, + // maybe it will be done later + } + else if (entry instanceof ModuleLibraryFileEntry) { + writer.name("name").value(entry.filePath) + fileSize = Files.size(Path.of(entry.libraryFilePath)) + } + else { + throw new IllegalStateException("Unsupported entry: $entry") + } + + writer.name("value").value(fileSize) + writer.endObject() + } + writer.endArray() + + writer.endObject() + } + writer.endArray() + } + + private static void writeProjectLibs(List entries, JsonWriter writer, BuildPaths buildPaths) { + Path mavenLocalRepo = Path.of(SystemProperties.getUserHome(), ".m2/repository") + // group by library + Map> map = new TreeMap<>() + for (DistributionFileEntry entry : entries) { + if (entry instanceof ProjectLibraryEntry) { + map.computeIfAbsent(entry.libraryName, { new ArrayList()}).add(entry as ProjectLibraryEntry) + } + } + + for (Map.Entry> entry : map.entrySet()) { + writer.beginObject() + + writer.name("name").value(entry.key) + + writer.name("children") + writer.beginArray() + for (ProjectLibraryEntry fileEntry : entry.value) { + writer.beginObject() + writer.name("name").value(shortenPath(fileEntry.libraryFile, buildPaths)) + writer.name("value").value(fileEntry.fileSize as long) + writer.endObject() + } + writer.endArray() + + writer.endObject() + } + } + + static String shortenPath(Path libraryFile, BuildPaths buildPaths) { + Path mavenRepo = Path.of(SystemProperties.getUserHome(), ".m2/repository") + Path projectHome = Path.of(buildPaths.projectHome) + if (libraryFile.startsWith(mavenRepo)) { + return "\$MAVEN_REPOSITORY\$" + File.separatorChar + mavenRepo.relativize(libraryFile).toString() + } + else if (libraryFile.startsWith(projectHome)) { + return "\$PROJECT_DIR\$" + File.separatorChar + projectHome.relativize(libraryFile).toString() + } + else { + return libraryFile.toString() + } + } }