diff --git a/license-checker-format.json b/license-checker/license-checker-format.json similarity index 100% rename from license-checker-format.json rename to license-checker/license-checker-format.json diff --git a/license-checker/license-checker-static.json b/license-checker/license-checker-static.json index 82bb94870..b642e9381 100644 --- a/license-checker/license-checker-static.json +++ b/license-checker/license-checker-static.json @@ -20,27 +20,6 @@ "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", "licenseText": "The MIT License (MIT)\r\n\r\nCopyright (c) 2011-2019 Twitter, Inc.\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in\r\nall copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\nTHE SOFTWARE." }, - "codemirror1": { - "licenses": "MIT", - "name": "codemirror", - "version": "4.13.0", - "description": "In-browser code editing made bearable", - "licenseText": "Copyright (C) 2014 by Marijn Haverbeke and others\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE." - }, - "codemirror2": { - "licenses": "MIT", - "name": "codemirror", - "version": "5.17.0", - "description": "In-browser code editing made bearable", - "licenseText": "Copyright (C) 2016 by Marijn Haverbeke and others\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE." - }, - "cytoscape": { - "licenses": "MIT", - "name": "cytoscape", - "version": "2.7.29", - "description": "Graph theory (network) library for visualisation and analysis : https://js.cytoscape.org", - "licenseText": "Copyright (c) 2016 The Cytoscape Consortium\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the “Software”), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE." - }, "d3-tip": { "licenses": "MIT", "name": "d3-tip", @@ -62,27 +41,6 @@ "description": "An HTML5 saveAs() FileSaver implementation", "licenseText": "The MIT License\n\nCopyright © 2016 [Eli Grey][1].\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n [1]: http://eligrey.com" }, - "jquery-ui": { - "licenses": "MIT", - "name": "jquery-ui", - "version": "1.10.5", - "description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.", - "licenseText": "Copyright 2013 jQuery Foundation and other contributors,\nhttp://jqueryui.com/\n\nThis software consists of voluntary contributions made by many\nindividuals (AUTHORS.txt, http://jqueryui.com/about) For exact\ncontribution history, see the revision history and logs, available\nat http://jquery-ui.googlecode.com/svn/\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." - }, - "jquery1": { - "licenses": "MIT", - "name": "jquery", - "version": "1.11.3", - "description": "JavaScript library for DOM operations", - "licenseText": "Copyright jQuery Foundation and other contributors, https://jquery.org/\n\nThis software consists of voluntary contributions made by many\nindividuals. For exact contribution history, see the revision history\navailable at https://github.com/jquery/jquery\n\nThe following license applies to all parts of this software except as\ndocumented below:\n\n====\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n====\n\nAll files located in the node_modules and external directories are\nexternally maintained libraries used by this software which have their\nown licenses; we recommend you read them, as their terms may differ from\nthe terms above." - }, - "jquery2": { - "licenses": "MIT", - "name": "jquery", - "version": "2.2.4", - "description": "JavaScript library for DOM operations", - "licenseText": "Copyright jQuery Foundation and other contributors, https://jquery.org/\n\nThis software consists of voluntary contributions made by many\nindividuals. For exact contribution history, see the revision history\navailable at https://github.com/jquery/jquery\n\nThe following license applies to all parts of this software except as\ndocumented below:\n\n====\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n====\n\nAll files located in the node_modules and external directories are\nexternally maintained libraries used by this software which have their\nown licenses; we recommend you read them, as their terms may differ from\nthe terms above." - }, "jquery3": { "licenses": "MIT", "name": "jquery", @@ -90,13 +48,6 @@ "description": "JavaScript library for DOM operations", "licenseText": "Copyright jQuery Foundation and other contributors, https://jquery.org/\n\nThis software consists of voluntary contributions made by many\nindividuals. For exact contribution history, see the revision history\navailable at https://github.com/jquery/jquery\n\nThe following license applies to all parts of this software except as\ndocumented below:\n\n====\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n====\n\nAll files located in the node_modules and external directories are\nexternally maintained libraries used by this software which have their\nown licenses; we recommend you read them, as their terms may differ from\nthe terms above." }, - "lodash": { - "licenses": "MIT", - "name": "lodash", - "version": "3.10.1", - "description": "A modern JavaScript utility library delivering modularity, performance & extras.", - "licenseText": "Copyright 2012-2013 The Dojo Foundation \nBased on Underscore.js 1.4.3, copyright 2009-2013 Jeremy Ashkenas,\nDocumentCloud Inc. \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." - }, "apache-echarts": { "licenses": "Apache-2.0", "name": "apache-echarts", @@ -110,19 +61,5 @@ "version": "2.2.6", "description": "Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.", "licenseText": "Copyright 2016 SmartBear Software\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License." - }, - "yasgui-yasqe": { - "licenses": "MIT", - "name": "yasgui-yasqe", - "version": "2.10.5-ontotext", - "description": "Yet Another SPARQL Query Editor", - "licenseText": "MIT License:\n \n Copyright (c) 2014 Laurens Rietveld\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE." - }, - "yasgui-yasr": { - "licenses": "MIT", - "name": "yasgui-yasr", - "version": "2.4.12-ontotext", - "description": "Yet Another SPARQL Resultset GUI", - "licenseText": "MIT License:\n \n Copyright (c) 2014 Laurens Rietveld\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE." } } diff --git a/package-lock.json b/package-lock.json index f69f28f64..4ab3e2a5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,10 +17,12 @@ "css-loader": "^7.1.2", "css-minimizer-webpack-plugin": "^7.0.0", "expose-loader": "^5.0.0", + "fs-extra": "^11.2.0", "html-loader": "^0.5.5", "ignore-loader": "^0.1.2", "less-loader": "^12.2.0", "license-checker": "^25.0.1", + "merge-jsons-webpack-plugin": "^2.0.1", "mini-css-extract-plugin": "^2.9.0", "string-replace-loader": "^3.1.0", "style-loader": "^4.0.0", @@ -3376,6 +3378,20 @@ "node": ">= 0.6" } }, + "node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4405,6 +4421,18 @@ "json5": "lib/cli.js" } }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -4734,6 +4762,33 @@ "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", "dev": true }, + "node_modules/merge-jsons-webpack-plugin": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/merge-jsons-webpack-plugin/-/merge-jsons-webpack-plugin-2.0.1.tgz", + "integrity": "sha512-8GP8rpOX3HSFsm7Gx+b3OAQR7yhgeAQvMqcZOJ+/cQIrqdak1c42a2T2vyeee8pzGPBf7pMLumthPh4CHgv2BA==", + "dev": true, + "dependencies": { + "glob": "7.1.1" + } + }, + "node_modules/merge-jsons-webpack-plugin/node_modules/glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", + "integrity": "sha512-mRyN/EsN2SyNhKWykF3eEGhDpeNplMWaW18Bmh76tnOqk5TbELAVwFAYOCmKVssOYFrYvvLMguiA+NXO3ZTuVA==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -7538,6 +7593,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", diff --git a/package.json b/package.json index 5c3c69f4d..f15043356 100644 --- a/package.json +++ b/package.json @@ -6,18 +6,23 @@ "clean": "sh scripts/clean.sh", "install": "sh scripts/install.sh", "postinstall": "npm run build:api && npm run build:shared", + "prebuild": "npm run license-report-api && npm run license-report-root-config && npm run license-report-legacy-workbench && npm run license-report-shared-components && npm run license-report-workbench", "build": "sh scripts/build.sh", - "postbuild": "webpack --config=webpack.config.prod.js && npm run license-report", + "postbuild": "webpack --env BUILD_MODE=production --config=webpack.config.prod.js", "build-dev": "sh scripts/build.sh", - "postbuild-dev": "webpack --config=webpack.config.dev.js", + "postbuild-dev": "webpack --env BUILD_MODE=development --config=webpack.config.dev.js", "build:modules": "concurrently \"npm run build:api\" \"npm run build:shared\"", "build:api": "cd packages/api && npm run build", "build:shared": "cd packages/shared-components && npm run build", "start": "concurrently \"npm run start-workbench-api\" \"npm run start-workbench\" \"npm run start-root\"", "start-workbench-api": "cd packages/api && npm run start", "start-workbench": "cd packages/workbench && npm run start", - "start-root": "webpack serve --port 9000 --open --config=webpack.config.dev.js", - "license-report": "license-checker --production --json --customPath license-checker-format.json --out dist/license-checker.json --start ./ --start packages/shared-components --start packages/api --start packages/legacy-workbench --start packages/root-config --start packages/workbench" + "start-root": "webpack serve --port 9000 --open --env BUILD_MODE=development --config=webpack.config.dev.js", + "license-report-root-config": "license-checker --production --json --customPath license-checker/license-checker-format.json --start packages/root-config -out packages/root-config/dist/license-checker.json", + "license-report-api": "license-checker --production --json --customPath license-checker/license-checker-format.json --start packages/api --out packages/api/dist/license-checker.json", + "license-report-legacy-workbench": "license-checker --production --json --customPath license-checker/license-checker-format.json --start packages/legacy-workbench --out packages/legacy-workbench/dist/license-checker.json", + "license-report-shared-components": "license-checker --production --json --customPath license-checker/license-checker-format.json --start packages/shared-components --out packages/shared-components/dist/license-checker.json", + "license-report-workbench": "license-checker --production --json --customPath license-checker/license-checker-format.json --start packages/workbench --out packages/workbench/dist/license-checker.json" }, "files": [], "repository": { @@ -46,10 +51,12 @@ "css-loader": "^7.1.2", "css-minimizer-webpack-plugin": "^7.0.0", "expose-loader": "^5.0.0", + "fs-extra": "^11.2.0", "html-loader": "^0.5.5", "ignore-loader": "^0.1.2", "less-loader": "^12.2.0", "license-checker": "^25.0.1", + "merge-jsons-webpack-plugin": "^2.0.1", "mini-css-extract-plugin": "^2.9.0", "string-replace-loader": "^3.1.0", "style-loader": "^4.0.0", diff --git a/packages/root-config/package-lock.json b/packages/root-config/package-lock.json index 7ed2d6102..18b70f132 100644 --- a/packages/root-config/package-lock.json +++ b/packages/root-config/package-lock.json @@ -9,8 +9,11 @@ "@types/jest": "^27.0.1", "@types/systemjs": "^6.1.1", "font-awesome": "^4.7.0", + "import-map-overrides": "^3.1.1", + "regenerator-runtime": "^0.14.1", "single-spa": "^5.9.3", - "single-spa-layout": "^1.6.0" + "single-spa-layout": "^1.6.0", + "systemjs": "^6.15.1" }, "devDependencies": { "@babel/core": "^7.23.3", @@ -6302,6 +6305,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-map-overrides": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/import-map-overrides/-/import-map-overrides-3.1.1.tgz", + "integrity": "sha512-NgET1tr18FQa+/7y6TPGU1U+EhmxluzsVtwwuE0t1OiTBXwwWstHm2hMOH1MSwlmIiDf6ztjArQmVjv3eVJKAw==", + "dependencies": { + "cookie": "^0.4.1" + } + }, + "node_modules/import-map-overrides/node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -9471,8 +9490,7 @@ "node_modules/regenerator-runtime": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regenerator-transform": { "version": "0.15.2", @@ -10445,6 +10463,11 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "node_modules/systemjs": { + "version": "6.15.1", + "resolved": "https://registry.npmjs.org/systemjs/-/systemjs-6.15.1.tgz", + "integrity": "sha512-Nk8c4lXvMB98MtbmjX7JwJRgJOL8fluecYCfCeYBznwmpOs8Bf15hLM6z4z71EDAhQVrQrI+wt1aLWSXZq+hXA==" + }, "node_modules/table": { "version": "6.8.2", "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", diff --git a/packages/root-config/package.json b/packages/root-config/package.json index 7d0d6b93f..dea440f9e 100644 --- a/packages/root-config/package.json +++ b/packages/root-config/package.json @@ -30,7 +30,10 @@ "@types/jest": "^27.0.1", "@types/systemjs": "^6.1.1", "font-awesome": "^4.7.0", + "import-map-overrides": "^3.1.1", + "regenerator-runtime": "^0.14.1", "single-spa": "^5.9.3", - "single-spa-layout": "^1.6.0" + "single-spa-layout": "^1.6.0", + "systemjs": "^6.15.1" } } diff --git a/packages/root-config/src/index.ejs b/packages/root-config/src/index.ejs index 34f30caa2..0dc2a0cee 100644 --- a/packages/root-config/src/index.ejs +++ b/packages/root-config/src/index.ejs @@ -12,15 +12,49 @@ This is needed by babel to share largeish helper code for compiling async/await in older browsers. More information at https://github.com/single-spa/create-single-spa/issues/112 --> - + + content=" default-src 'self' <%= microFrontEndsUrls %>; + script-src 'self' 'unsafe-inline' 'unsafe-eval' <%= microFrontEndsUrls %>; + connect-src 'self' <%= microFrontEndsUrls %>; + style-src 'self' 'unsafe-inline' <%= microFrontEndsUrls %>; + img-src 'self' data: <%= microFrontEndsUrls %>; + font-src 'self' <%= microFrontEndsUrls %>; + base-uri 'self';"> + + + + + + + <% if (isDevelopmentMode) { %> + + + + <% } else { %> + + + + <% } %> + @@ -33,38 +67,17 @@ More information about shared dependencies can be found at https://single-spa.js.org/docs/recommended-setup#sharing-with-import-maps. --> + - - - - - - - - - - - - <% if (isLocal) { %> - - - <% } else { %> - - - <% } %> diff --git a/webpack.config.common.js b/webpack.config.common.js index 8f7d83880..2e3b99ea3 100644 --- a/webpack.config.common.js +++ b/webpack.config.common.js @@ -5,6 +5,7 @@ const MergeIntoSingleFilePlugin = require('webpack-merge-and-include-globally'); const {merge} = require("webpack-merge"); const singleSpaDefaults = require("webpack-config-single-spa"); const HtmlWebpackPlugin = require("html-webpack-plugin"); +const {MergeJsonPlugin} = require('./webpack/merge-json-plugin.js'); const path = require("path"); // The "string-replace-loader" replaces the version in all HTML and JS files except those copied by CopyPlugin. @@ -56,12 +57,13 @@ module.exports = (webpackConfigEnv, argv) => { template: "packages/root-config/src/index.ejs", templateParameters: (compilation, assets, assetTags, options) => { return { - isLocal: webpackConfigEnv && webpackConfigEnv.isLocal, - orgName, - mainBundle: Object.keys(compilation.assets).find(asset => asset.includes('main') && asset.endsWith('.js')), - legacyWorkbenchBundle: Object.keys(compilation.assets).find(asset => asset.includes('legacyWorkbench') && asset.endsWith('.js')), - contentHash: assets.contentHash, - buildVersion: PACKAGE.version + isDevelopmentMode: argv.env.BUILD_MODE === 'development', + orgName, + mainBundle: Object.keys(compilation.assets).find(asset => asset.includes('main') && asset.endsWith('.js')), + legacyWorkbenchBundle: Object.keys(compilation.assets).find(asset => asset.includes('legacyWorkbench') && asset.endsWith('.js')), + contentHash: assets.contentHash, + buildVersion: PACKAGE.version, + microFrontEndsUrls: 'http://localhost:9002 http://localhost:9003 ws://localhost:9003 ws://localhost:9002' }; }, chunks: ['main'], @@ -77,6 +79,16 @@ module.exports = (webpackConfigEnv, argv) => { ] } }), + new MergeJsonPlugin({ + files: [ + 'packages/api/dist/license-checker.json', + 'packages/legacy-workbench/dist/license-checker.json', + 'packages/root-config/dist/license-checker.json', + 'packages/shared-components/dist/license-checker.json', + 'packages/workbench/dist/license-checker.json', + ], + output: 'license-checker.json' + }), new CopyPlugin({ patterns: [ { @@ -223,6 +235,15 @@ module.exports = (webpackConfigEnv, argv) => { { from: 'license-checker/license-checker-static.json', to: '' + }, + { + from: 'packages/root-config/node_modules/regenerator-runtime/runtime.js', + to: 'resources' + } + , + { + from: 'packages/root-config/node_modules/import-map-overrides/dist/import-map-overrides.js', + to: 'resources' } ] }) diff --git a/webpack.config.dev.js b/webpack.config.dev.js index cc8fad32a..19e7dab71 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -1,14 +1,32 @@ const path = require('path'); const {merge} = require('webpack-merge'); -const commonConfig = require('./webpack.config.common')(); +const commonConfig = require('./webpack.config.common'); +const CopyPlugin = require("copy-webpack-plugin"); const host = 'localhost'; const portHere = 9000; const portThere = 7200; -module.exports = merge(commonConfig, { +module.exports = (env, argv) => merge(commonConfig(env, argv), { mode: 'development', devtool: 'source-map', + plugins: [ + new CopyPlugin({ + patterns: [ + { + from: 'packages/root-config/node_modules/systemjs/dist/system.js', + to: 'resources' + }, + { + from: 'packages/root-config/node_modules/systemjs/dist/extras/amd.js', + to: 'resources' + }, + { + from: 'packages/root-config/node_modules/single-spa/lib/system/single-spa.dev.js', + to: 'resources' + }] + }) + ], module: { rules: [ { diff --git a/webpack.config.prod.js b/webpack.config.prod.js index 985beb56a..efccf634b 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -1,11 +1,12 @@ const path = require('path'); const {merge} = require('webpack-merge'); -const commonConfig = require('./webpack.config.common')(); +const commonConfig = require('./webpack.config.common'); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const {CleanWebpackPlugin} = require('clean-webpack-plugin'); const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); +const CopyPlugin = require("copy-webpack-plugin"); -module.exports = merge(commonConfig, { +module.exports = (env, argv) => merge(commonConfig(env, argv), { mode: 'production', performance: { maxEntrypointSize: 990000, @@ -49,6 +50,21 @@ module.exports = merge(commonConfig, { ] }, plugins: [ + new CopyPlugin({ + patterns: [ + { + from: 'packages/root-config/node_modules/systemjs/dist/system.min.js', + to: 'resources' + }, + { + from: 'packages/root-config/node_modules/systemjs/dist/extras/amd.min.js', + to: 'resources' + }, + { + from: 'packages/root-config/node_modules/single-spa/lib/system/single-spa.min.js', + to: 'resources' + }] + }), new MiniCssExtractPlugin({filename: "[name].[contenthash].css"}), new CssMinimizerPlugin(), new CleanWebpackPlugin() diff --git a/webpack/merge-json-plugin.js b/webpack/merge-json-plugin.js new file mode 100644 index 000000000..76805ba1a --- /dev/null +++ b/webpack/merge-json-plugin.js @@ -0,0 +1,56 @@ +const fs = require('fs-extra'); +const path = require('path'); + +class MergeJsonPlugin { + static defaultOptions = { + output: 'merged-output.json', + files: [] + }; + + constructor(options = {}) { + this.options = { ...MergeJsonPlugin.defaultOptions, ...options }; + } + + apply(compiler) { + const pluginName = MergeJsonPlugin.name; + const { webpack } = compiler; + const { Compilation } = webpack; + const { RawSource } = webpack.sources; + + compiler.hooks.thisCompilation.tap(pluginName, (compilation) => { + compilation.hooks.processAssets.tapPromise( + { + name: pluginName, + stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE, + }, + async (assets) => { + try { + const mergedResult = {}; + + for (const file of this.options.files) { + const filePath = path.resolve(compiler.context, file); + if (await fs.pathExists(filePath)) { + const fileContent = await fs.readJson(filePath); + Object.assign(mergedResult, fileContent); + } else { + console.error(`File not found: ${filePath}`); + } + } + + const outputPath = path.resolve(compiler.context, this.options.output); + const outputDir = path.dirname(outputPath); + await fs.ensureDir(outputDir); + + const mergedJsonContent = JSON.stringify(mergedResult, null, 2); + compilation.emitAsset(this.options.output, new RawSource(mergedJsonContent)); + console.log(`Merged JSON saved to ${this.options.output}`); + } catch (error) { + console.error('Error merging JSON files:', error); + } + } + ); + }); + } +} + +module.exports = { MergeJsonPlugin };