diff --git a/public/locales/en/components.json b/public/locales/en/components.json index b0e7c1b5..c4a23487 100644 --- a/public/locales/en/components.json +++ b/public/locales/en/components.json @@ -4,7 +4,14 @@ "logo-alt-text": "OpenSpace logo", "about-openspace-description": "OpenSpace is open-source interactive data visualization software designed to visualize the entire known universe and portray our ongoing efforts to investigate the cosmos.", "fetching-version-number": "Fetching OpenSpace version...", - "custom-version-number": "Custom" + "custom-version-number": "Custom", + "openspace-institutions": "OpenSpace is stewarded by Linköping University and the American Museum of Natural History with support from NASA, the Swedish e-Science Research Center, and the Knut and Alice Wallenberg Foundation.", + "contributors-title": "Contributors", + "contributors-loading": "Loading contributors...", + "contributors-error": "Failed to load contributors", + "third-party-title": "Third Party Licenses", + "third-party-license-label": "License", + "third-party-url-label": "URL" }, "clear-button": { "aria-label": "Clear" diff --git a/scripts/generateThirdParty.ts b/scripts/generateThirdParty.ts new file mode 100644 index 00000000..9c7f532e --- /dev/null +++ b/scripts/generateThirdParty.ts @@ -0,0 +1,135 @@ +/** + * Preprocessing script that parses a third-party license markdown file and + * generates a static TypeScript data file at src/data/ThirdPartyDependencies.ts. + * + * Usage: + * npx tsx scripts/generateThirdParty.ts [output-path] + * + * Example: + * npx tsx scripts/generateThirdParty.ts LICENSES.md + * npx tsx scripts/generateThirdParty.ts LICENSES.md src/data/ThirdPartyDependencies.ts + * + * Expected input format: + * A markdown file where each library has a section like: + * + * ## Library Name + * + * **License:** MIT + * **URL:** https://example.com + * + * + */ + +import fs from 'fs'; +import path from 'path'; + +interface Dependency { + name: string; + license: string; + url: string; + licenseText: string; +} + +function parseMarkdown(content: string): Dependency[] { + // Split into sections on lines that start a new ## heading. + // The first chunk is the intro/table — skip it. + const chunks = content.split(/\n(?=## )/); + + const dependencies: Dependency[] = []; + + for (const chunk of chunks.slice(1)) { + const lines = chunk.split('\n'); + + const name = lines[0].replace(/^##\s+/, '').trim(); + + const licenseMatch = chunk.match(/^\*\*License:\*\*\s*(.+)$/m); + const urlMatch = chunk.match(/^\*\*URL:\*\*\s*(.+)$/m); + + if (!licenseMatch || !urlMatch) { + console.warn(`Skipping section "${name}": missing License or URL field.`); + continue; + } + + const license = licenseMatch[1].trim(); + const url = urlMatch[1].trim(); + + // License text is everything after the **URL:** line. + const urlLineIndex = lines.findIndex((l) => l.startsWith('**URL:**')); + const licenseText = lines + .slice(urlLineIndex + 1) + .join('\n') + .trim(); + + dependencies.push({ name, license, url, licenseText }); + } + + return dependencies; +} + +function generateTypeScript(dependencies: Dependency[]): string { + const entries = dependencies + .map((dep) => { + return [ + ` {`, + ` name: ${JSON.stringify(dep.name)},`, + ` license: ${JSON.stringify(dep.license)},`, + ` url: ${JSON.stringify(dep.url)},`, + ` licenseText: ${JSON.stringify(dep.licenseText)}`, + ` }` + ].join('\n'); + }) + .join(',\n'); + + return `// This file is auto-generated. Do not edit manually. +// To regenerate, run: +// npx tsx scripts/generateThirdParty.ts + +export interface ThirdPartyDependency { + name: string; + license: string; + url: string; + licenseText: string; +} + +export const ThirdPartyDependencies: ThirdPartyDependency[] = [ +${entries} +]; +`; +} + +async function main() { + const inputPath = process.argv[2]; + if (!inputPath) { + console.error('Error: No input file specified.'); + console.error('Usage: npx tsx scripts/generateThirdParty.ts '); + process.exit(1); + } + + const resolvedInput = path.resolve(inputPath); + if (!fs.existsSync(resolvedInput)) { + console.error(`Error: File not found: ${resolvedInput}`); + process.exit(1); + } + + const outputPath = path.resolve( + process.argv[3] ?? 'src/data/ThirdPartyDependencies.ts' + ); + + const content = fs.readFileSync(resolvedInput, 'utf-8'); + const dependencies = parseMarkdown(content); + + if (dependencies.length === 0) { + console.error('Error: No dependency sections found in the input file.'); + process.exit(1); + } + + const output = generateTypeScript(dependencies); + + fs.mkdirSync(path.dirname(outputPath), { recursive: true }); + fs.writeFileSync(outputPath, output, 'utf-8'); + + console.log(`Parsed ${dependencies.length} dependencies.`); + console.log(`Written to: ${outputPath}`); +} + +main(); diff --git a/src/components/About/About.tsx b/src/components/About/About.tsx index fee57ad1..f1282404 100644 --- a/src/components/About/About.tsx +++ b/src/components/About/About.tsx @@ -1,8 +1,25 @@ +import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import { Anchor, Grid, Image, Modal, Stack, Text, Title } from '@mantine/core'; +import { + Anchor, + Avatar, + Box, + Code, + Container, + Group, + Image, + Modal, + SimpleGrid, + Stack, + Text, + Title +} from '@mantine/core'; import { SemanticVersion } from 'openspace-api-js/types'; -import { useAppSelector } from '@/redux/hooks'; +import { Collapsable } from '@/components/Collapsable/Collapsable'; +import { ThirdPartyDependencies } from '@/data/ThirdPartyDependencies'; +import { getContributors } from '@/redux/contributors/contributorsMiddleware'; +import { useAppDispatch, useAppSelector } from '@/redux/hooks'; interface Props { opened: boolean; @@ -12,7 +29,16 @@ interface Props { export function About({ opened, close }: Props) { const { t } = useTranslation('components', { keyPrefix: 'about' }); + const dispatch = useAppDispatch(); const openSpaceVersion = useAppSelector((state) => state.version.openSpaceVersion); + const contributors = useAppSelector((state) => state.contributors.contributors); + const contributorsStatus = useAppSelector((state) => state.contributors.status); + + useEffect(() => { + if (opened && (contributorsStatus === 'idle' || contributorsStatus === 'failed')) { + dispatch(getContributors()); + } + }, [opened, contributorsStatus, dispatch]); function osVersionNumber(): string { if (!openSpaceVersion) { @@ -33,18 +59,20 @@ export function About({ opened, close }: Props) { opened={opened} onClose={close} title={t('modal-title')} - size={'40%'} + size={'xxl'} closeButtonProps={{ 'aria-label': 'Close about' }} + scrollAreaComponent={Modal.NativeScrollArea} > - - - {t('logo-alt-text')} - - + + + + {t('logo-alt-text')} + OpenSpace {t('about-openspace-description')} @@ -52,12 +80,92 @@ export function About({ opened, close }: Props) { © 2014 - {new Date().getFullYear()} OpenSpace Development Team - + openspaceproject.com + {t('openspace-institutions')} - - + + + {t('contributors-title')} +
+ {contributorsStatus === 'loading' && ( + {t('contributors-loading')} + )} + {contributorsStatus === 'failed' && ( + {t('contributors-error')} + )} + {contributorsStatus === 'succeeded' && ( + + {contributors.map((contributor) => ( + + + + + {contributor.login} + + + + ))} + + )} +
+ + + {t('third-party-title')} + + + {ThirdPartyDependencies.map((dep) => ( + + + + + {t('third-party-license-label')}:{' '} + + {dep.license} + + + + {t('third-party-url-label')}:{' '} + + + {dep.url} + + + + {dep.licenseText} + + + + ))} + + ); } diff --git a/src/data/ThirdPartyDependencies.ts b/src/data/ThirdPartyDependencies.ts new file mode 100644 index 00000000..7d3c4055 --- /dev/null +++ b/src/data/ThirdPartyDependencies.ts @@ -0,0 +1,181 @@ +// This file is auto-generated. Do not edit manually. +// To regenerate, run: +// npx tsx scripts/generateThirdParty.ts + +export interface ThirdPartyDependency { + name: string; + license: string; + url: string; + licenseText: string; +} + +export const ThirdPartyDependencies: ThirdPartyDependency[] = [ + { + name: "catch2", + license: "Boost Software License 1.0", + url: "https://github.com/catchorg/Catch2", + licenseText: "Boost Software License - Version 1.0 - August 17th, 2003\r\n\r\nPermission is hereby granted, free of charge, to any person or organization\r\nobtaining a copy of the software and accompanying documentation covered by\r\nthis license (the \"Software\") to use, reproduce, display, distribute,\r\nexecute, and transmit the Software, and to prepare derivative works of the\r\nSoftware, and to permit third-parties to whom the Software is furnished to\r\ndo so, all subject to the following:\r\n\r\nThe copyright notices in the Software and this entire statement, including\r\nthe above license grant, this restriction and the following disclaimer,\r\nmust be included in all copies of the Software, in whole or in part, and\r\nall derivative works of the Software, unless such copies or derivative\r\nworks are solely in the form of machine-executable object code generated by\r\na source language processor.\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, TITLE AND NON-INFRINGEMENT. IN NO EVENT\r\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\r\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\r\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\r\nDEALINGS IN THE SOFTWARE." + }, + { + name: "curl", + license: "curl License", + url: "https://curl.se", + licenseText: "Copyright (c) 1996 - 2024, Daniel Stenberg, daniel@haxx.se, and many contributors, see the THANKS file.\r\n\r\nAll rights reserved.\r\n\r\nPermission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\r\n\r\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 OF THIRD PARTY RIGHTS. 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.\r\n\r\nExcept as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder." + }, + { + name: "date", + license: "MIT", + url: "https://howardhinnant.github.io/date/date.html", + licenseText: "The MIT License (MIT)\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 all\r\ncopies 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 THE\r\nSOFTWARE." + }, + { + name: "Freetype2", + license: "FreeType License", + url: "https://www.freetype.org", + licenseText: "Portions of this software are copyright © 2024 The FreeType\r\nProject (www.freetype.org). All rights reserved." + }, + { + name: "Ghoul - General Helpful Open Utility Library", + license: "MIT", + url: "https://github.com/OpenSpace/Ghoul", + licenseText: "Copyright (c) 2012-2024\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of this\r\nsoftware and associated documentation files (the \"Software\"), to deal in the Software\r\nwithout restriction, including without limitation the rights to use, copy, modify,\r\nmerge, publish, distribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to the following\r\nconditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all copies\r\nor substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\r\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\r\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\r\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\r\nOR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + }, + { + name: "GLAD", + license: "MIT", + url: "https://github.com/Dav1dde/glad", + licenseText: "The MIT License (MIT)\r\n\r\nCopyright (c) 2013-2022 David Herberth\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of\r\nthis software and associated documentation files (the \"Software\"), to deal in\r\nthe Software without restriction, including without limitation the rights to\r\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r\nthe Software, and to permit persons to whom the Software is furnished to do so,\r\nsubject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies 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, FITNESS\r\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + }, + { + name: "glbinding", + license: "MIT", + url: "https://glbinding.org/", + licenseText: "Copyright (c) 2014-2023 Computer Graphics Systems Group at the Hasso-Plattner-Institute, Digital Engineering Company, University of Potsdam and CG Internals, Germany.\r\n\r\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:\r\n\r\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\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." + }, + { + name: "GLFW", + license: "zlib/libpng License", + url: "https://www.glfw.org/", + licenseText: "Copyright (c) 2002-2006 Marcus Geelnard\r\n\r\nCopyright (c) 2006-2019 Camilla Löwy\r\n\r\nThis software is provided 'as-is', without any express or implied\r\nwarranty. In no event will the authors be held liable for any damages\r\narising from the use of this software.\r\n\r\nPermission is granted to anyone to use this software for any purpose,\r\nincluding commercial applications, and to alter it and redistribute it\r\nfreely, subject to the following restrictions:\r\n\r\n1. The origin of this software must not be misrepresented; you must not\r\n claim that you wrote the original software. If you use this software\r\n in a product, an acknowledgment in the product documentation would\r\n be appreciated but is not required.\r\n\r\n2. Altered source versions must be plainly marked as such, and must not\r\n be misrepresented as being the original software.\r\n\r\n3. This notice may not be removed or altered from any source\r\n distribution." + }, + { + name: "GLM", + license: "MIT", + url: "https://github.com/g-truc/glm", + licenseText: "Copyright (c) 2005 - G-Truc Creation\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." + }, + { + name: "JSON for Modern C++", + license: "MIT", + url: "https://github.com/nlohmann/json", + licenseText: "__ _____ _____ _____\r\n __| | __| | | | JSON for Modern C++\r\n| | |__ | | | | | | version 3.9.1\r\n|_____|_____|_____|_|___| https://github.com/nlohmann/json\r\n\r\nLicensed under the MIT License .\r\nSPDX-License-Identifier: MIT\r\nCopyright (c) 2013-2019 Niels Lohmann .\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 all\r\ncopies 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 THE\r\nSOFTWARE." + }, + { + name: "LIBPNG", + license: "libpng License", + url: "http://www.libpng.org/pub/png/libpng.html", + licenseText: "There is no warranty against interference with your enjoyment of the\r\n library or against infringement. There is no warranty that our\r\n efforts or the library will fulfill any of your particular purposes\r\n or needs. This library is provided with all faults, and the entire\r\n risk of satisfactory quality, performance, accuracy, and effort is with\r\n the user.\r\n\r\nlibpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are\r\nCopyright (c) 1998, 1999 Glenn Randers-Pehrson, and are\r\ndistributed according to the same disclaimer and license as libpng-0.96,\r\nwith the following individuals added to the list of Contributing Authors:\r\n\r\n Tom Lane\r\n Glenn Randers-Pehrson\r\n Willem van Schaik\r\n\r\nlibpng versions 0.89, June 1996, through 0.96, May 1997, are\r\nCopyright (c) 1996, 1997 Andreas Dilger\r\nDistributed according to the same disclaimer and license as libpng-0.88,\r\nwith the following individuals added to the list of Contributing Authors:\r\n\r\n John Bowler\r\n Kevin Bracey\r\n Sam Bushell\r\n Magnus Holmgren\r\n Greg Roelofs\r\n Tom Tanner\r\n\r\nlibpng versions 0.5, May 1995, through 0.88, January 1996, are\r\nCopyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\r\n\r\nFor the purposes of this copyright and license, \"Contributing Authors\"\r\nis defined as the following set of individuals:\r\n\r\n Andreas Dilger\r\n Dave Martindale\r\n Guy Eric Schalnat\r\n Paul Schmidt\r\n Tim Wegner\r\n\r\nThe PNG Reference Library is supplied \"AS IS\". The Contributing Authors\r\nand Group 42, Inc. disclaim all warranties, expressed or implied,\r\nincluding, without limitation, the warranties of merchantability and of\r\nfitness for any purpose. The Contributing Authors and Group 42, Inc.\r\nassume no liability for direct, indirect, incidental, special, exemplary,\r\nor consequential damages, which may result from the use of the PNG\r\nReference Library, even if advised of the possibility of such damage.\r\n\r\nPermission is hereby granted to use, copy, modify, and distribute this\r\nsource code, or portions hereof, for any purpose, without fee, subject\r\nto the following restrictions:\r\n\r\n1. The origin of this source code must not be misrepresented.\r\n\r\n2. Altered versions must be plainly marked as such and must not\r\n be misrepresented as being the original source.\r\n\r\n3. This Copyright notice may not be removed or altered from any\r\n source or altered source distribution.\r\n\r\nThe Contributing Authors and Group 42, Inc. specifically permit, without\r\nfee, and encourage the use of this source code as a component to\r\nsupporting the PNG file format in commercial products. If you use this\r\nsource code in a product, acknowledgment is not required but would be\r\nappreciated." + }, + { + name: "Lua", + license: "MIT", + url: "https://lua.org/", + licenseText: "Copyright (C) 1994-2017 Lua.org, PUC-Rio.\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n\"Software\"), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + }, + { + name: "LZ4", + license: "BSD 2-Clause", + url: "https://lz4.org/", + licenseText: "LZ4 Library\r\nCopyright (c) 2011-2014, Yann Collet\r\nAll rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without modification,\r\nare permitted provided that the following conditions are met:\r\n\r\n* Redistributions of source code must retain the above copyright notice, this\r\n list of conditions and the following disclaimer.\r\n\r\n* Redistributions in binary form must reproduce the above copyright notice, this\r\n list of conditions and the following disclaimer in the documentation and/or\r\n other materials provided with the distribution.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\r\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\r\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\r\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + }, + { + name: "Modern C++ JSON schema validator", + license: "MIT", + url: "https://github.com/pboettch/json-schema-validator", + licenseText: "Modern C++ JSON schema validator is licensed under the MIT License\r\n:\r\n\r\nCopyright (c) 2016 Patrick Boettcher\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of\r\nthis software and associated documentation files (the \"Software\"), to deal in\r\nthe Software without restriction, including without limitation the rights to\r\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\r\nof the Software, and to permit persons to whom the Software is furnished to do\r\nso, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies 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 THE\r\nSOFTWARE." + }, + { + name: "Open Asset Import Library (assimp)", + license: "BSD 3-Clause", + url: "https://www.assimp.org/", + licenseText: "Copyright (c) 2006-2021, assimp team\r\nAll rights reserved.\r\n\r\nRedistribution and use of this software in source and binary forms,\r\nwith or without modification, are permitted provided that the\r\nfollowing conditions are met:\r\n\r\n* Redistributions of source code must retain the above\r\n copyright notice, this list of conditions and the\r\n following disclaimer.\r\n\r\n* Redistributions in binary form must reproduce the above\r\n copyright notice, this list of conditions and the\r\n following disclaimer in the documentation and/or other\r\n materials provided with the distribution.\r\n\r\n* Neither the name of the assimp team, nor the names of its\r\n contributors may be used to endorse or promote products\r\n derived from this software without specific prior\r\n written permission of the assimp team.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + }, + { + name: "OpenVR", + license: "BSD 3-Clause", + url: "https://github.com/ValveSoftware/openvr", + licenseText: "Copyright (c) 2015, Valve Corporation\r\nAll rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without modification,\r\nare permitted provided that the following conditions are met:\r\n\r\n1. Redistributions of source code must retain the above copyright notice, this\r\nlist of conditions and the following disclaimer.\r\n\r\n2. Redistributions in binary form must reproduce the above copyright notice,\r\nthis list of conditions and the following disclaimer in the documentation and/or\r\nother materials provided with the distribution.\r\n\r\n3. Neither the name of the copyright holder nor the names of its contributors\r\nmay be used to endorse or promote products derived from this software without\r\nspecific prior written permission.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\r\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\r\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\r\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + }, + { + name: "RenderDoc", + license: "MIT", + url: "https://renderdoc.org/", + licenseText: "Copyright (c) 2019-2023 Baldur Karlsson\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." + }, + { + name: "scnlib", + license: "Apache 2.0", + url: "https://github.com/eliaskosunen/scnlib", + licenseText: "Copyright 2017 Elias Kosunen\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n https://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License." + }, + { + name: "Simple Graphics Cluster Toolkit", + license: "BSD 3-Clause", + url: "https://github.com/sgct/sgct", + licenseText: "Simple Graphics Cluster Toolkit\r\n\r\nCopyright (c) 2012-2023\r\nMiroslav Andel, Linköping University\r\nAlexander Bock, Linköping University\r\n\r\nContributors: Alexander Fridlund, Joel Kronander, Daniel Jönsson, Erik Sundén, Gene Payne,\r\n Peter Steneteg\r\n\r\nFor any questions or information about the project contact: alexander.bock@liu.se\r\n\r\nRedistribution and use in source and binary forms, with or without modification, are\r\npermitted provided that the following conditions are met:\r\n\r\n1. Redistributions of source code must retain the above copyright notice, this list of\r\n conditions and the following disclaimer.\r\n2. Redistributions in binary form must reproduce the above copyright notice, this list of\r\n conditions and the following disclaimer in the documentation and/or other materials\r\n provided with the distribution.\r\n3. Neither the name of the copyright holder nor the names of its contributors may be used\r\n to endorse or promote products derived from this software without specific prior\r\n written permission.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY\r\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\r\nCOPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL,\r\nEXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r\nHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\r\nTORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + }, + { + name: "SPICE", + license: "NASA/JPL", + url: "https://naif.jpl.nasa.gov", + licenseText: "The SPICE system is implemented and maintained by Caltech/Jet Propulsion Laboratory under contract to the National Aeronautics and Space Administration. It is sponsored by the Planetary Science Division of NASA's Science Mission Directorate.\r\n\r\nTHIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED \"AS-IS\" TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC§2312-§2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE SOFTWARE AND RELATED MATERIALS, HOWEVER USED.\r\n\r\nIN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.\r\n\r\nRECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE" + }, + { + name: "SPOUT", + license: "BSD 2-Clause", + url: "https://github.com/leadedge/Spout2", + licenseText: "Copyright (c) 2020-2024, Lynn Jarvis\r\nAll rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without\r\nmodification, are permitted provided that the following conditions are met:\r\n\r\n1. Redistributions of source code must retain the above copyright notice, this\r\n list of conditions and the following disclaimer.\r\n\r\n2. Redistributions in binary form must reproduce the above copyright notice,\r\n this list of conditions and the following disclaimer in the documentation\r\n and/or other materials provided with the distribution.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\r\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\r\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\r\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\r\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + }, + { + name: "stb_image", + license: "Public Domain", + url: "https://github.com/nothings/stb", + licenseText: "This is free and unencumbered software released into the public domain.\r\nAnyone is free to copy, modify, publish, use, compile, sell, or distribute this\r\nsoftware, either in source code form or as a compiled binary, for any purpose,\r\ncommercial or non-commercial, and by any means.\r\nIn jurisdictions that recognize copyright laws, the author or authors of this\r\nsoftware dedicate any and all copyright interest in the software to the public\r\ndomain. We make this dedication for the benefit of the public at large and to\r\nthe detriment of our heirs and successors. We intend this dedication to be an\r\novert act of relinquishment in perpetuity of all present and future rights to\r\nthis software under copyright law.\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 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r\nACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + }, + { + name: "Tiny Process Library", + license: "MIT", + url: "https://github.com/eidheim/tiny-process-library", + licenseText: "Copyright (c) 2015-2020 Ole Christian Eidheim\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 all\r\ncopies 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 THE\r\nSOFTWARE." + }, + { + name: "TinyXML", + license: "zlib License", + url: "https://github.com/leethomason/tinyxml2", + licenseText: "This software is provided 'as-is', without any express or implied\r\nwarranty. In no event will the authors be held liable for any\r\ndamages arising from the use of this software.\r\n\r\nPermission is granted to anyone to use this software for any\r\npurpose, including commercial applications, and to alter it and\r\nredistribute it freely, subject to the following restrictions:\r\n\r\n1. The origin of this software must not be misrepresented; you must\r\nnot claim that you wrote the original software. If you use this\r\nsoftware in a product, an acknowledgment in the product documentation\r\nwould be appreciated but is not required.\r\n\r\n2. Altered source versions must be plainly marked as such, and\r\nmust not be misrepresented as being the original software.\r\n\r\n3. This notice may not be removed or altered from any source\r\ndistribution." + }, + { + name: "Tracy", + license: "BSD 3-Clause", + url: "https://github.com/wolfpld/tracy", + licenseText: "Copyright (c) 2017-2023, Bartosz Taudul \r\nAll rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without\r\nmodification, are permitted provided that the following conditions are met:\r\n * Redistributions of source code must retain the above copyright\r\n notice, this list of conditions and the following disclaimer.\r\n * Redistributions in binary form must reproduce the above copyright\r\n notice, this list of conditions and the following disclaimer in the\r\n documentation and/or other materials provided with the distribution.\r\n * Neither the name of the nor the\r\n names of its contributors may be used to endorse or promote products\r\n derived from this software without specific prior written permission.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\r\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r\nDISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY\r\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + }, + { + name: "VRPN", + license: "Boost Software License 1.0", + url: "https://vrpn.github.io/", + licenseText: "Boost Software License 1.0 (BSL1.0)\r\n\r\nPermission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the \"Software\") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:\r\n\r\nThe copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.\r\n\r\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, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n\r\nAdditional requests follow:\r\n\r\n1. Please acknowledge this library in any publication, written, videotaped,\r\n\tor otherwise produced, that results from making programs using it.\r\n\tThe acknowledgement will credit\r\n\r\n\tCISMM Project\r\n\tUniversity of North Carolina at Chapel Hill,\r\n\tSupported by the NIH/NCRR and the NIH/NIBIB.\r\n\r\n2. Please furnish us a copy of any publication, including videotape,\r\n\tthat you produce and disseminate outside your group using our\r\n\tprogram. These should be addressed to Professor R.M. Taylor\r\n\tat taylorr@cs.unc.edu.\r\n\r\n3. Please send us derived classes and drivers for new devices that you\r\n\tcreate for the library. We will attempt to include them in\r\n\tfuture releases of the library for you and others to use. This\r\n\tis the fastest way to get a working system for everyone." + }, + { + name: "WebsocketPP", + license: "BSD 3-Clause", + url: "https://www.zaphoyd.com/projects/websocketpp/", + licenseText: "Copyright (c) 2014, Peter Thorson. All rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without\r\nmodification, are permitted provided that the following conditions are met:\r\n * Redistributions of source code must retain the above copyright\r\n notice, this list of conditions and the following disclaimer.\r\n * Redistributions in binary form must reproduce the above copyright\r\n notice, this list of conditions and the following disclaimer in the\r\n documentation and/or other materials provided with the distribution.\r\n * Neither the name of the WebSocket++ Project nor the\r\n names of its contributors may be used to endorse or promote products\r\n derived from this software without specific prior written permission.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\nARE DISCLAIMED. IN NO EVENT SHALL PETER THORSON BE LIABLE FOR ANY\r\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\r\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + }, + { + name: "zlib", + license: "zlib License", + url: "http://zlib.net/", + licenseText: "Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler\r\n\r\nThis software is provided 'as-is', without any express or implied\r\nwarranty. In no event will the authors be held liable for any damages\r\narising from the use of this software.\r\n\r\nPermission is granted to anyone to use this software for any purpose,\r\nincluding commercial applications, and to alter it and redistribute it\r\nfreely, subject to the following restrictions:\r\n\r\n1. The origin of this software must not be misrepresented; you must not\r\n claim that you wrote the original software. If you use this software\r\n in a product, an acknowledgment in the product documentation would be\r\n appreciated but is not required.\r\n2. Altered source versions must be plainly marked as such, and must not be\r\n misrepresented as being the original software.\r\n3. This notice may not be removed or altered from any source distribution.\r\n\r\nJean-loup Gailly Mark Adler\r\njloup@gzip.org madler@alumni.caltech.edu\r\n\r\n\r\nThe data format used by the zlib library is described by RFCs (Request for\r\nComments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950\r\n(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format)." + } +]; diff --git a/src/redux/contributors/contributorsMiddleware.ts b/src/redux/contributors/contributorsMiddleware.ts new file mode 100644 index 00000000..d984be0b --- /dev/null +++ b/src/redux/contributors/contributorsMiddleware.ts @@ -0,0 +1,73 @@ +import { createAsyncThunk } from '@reduxjs/toolkit'; + +import { GitHubContributor } from './contributorsSlice'; + +const repos = ['OpenSpace/OpenSpace', 'OpenSpace/OpenSpace-WebGui', 'OpenSpace/Ghoul']; + +interface GitHubApiContributor { + login: string; + avatar_url: string; + html_url: string; + contributions: number; + type: string; +} + +async function fetchAllContributorsForRepo(repo: string): Promise { + const all: GitHubContributor[] = []; + let page = 1; + + while (true) { + const response = await fetch( + `https://api.github.com/repos/${repo}/contributors?per_page=100&page=${page}` + ); + if (!response.ok) { + return []; + } + const data: GitHubApiContributor[] = await response.json(); + if (data.length === 0) { + break; + } + + const humans = data + .filter((c) => c.type === 'User') + .map((c) => ({ + login: c.login, + avatarUrl: c.avatar_url, + htmlUrl: c.html_url, + contributions: c.contributions + })); + + all.push(...humans); + + if (data.length < 100) { + break; + } + page++; + } + + return all; +} + +export const getContributors = createAsyncThunk( + 'contributors/getContributors', + async () => { + const results = await Promise.all(repos.map(fetchAllContributorsForRepo)); + + const contributionMap = new Map(); + + for (const repoContributors of results) { + for (const contributor of repoContributors) { + const existing = contributionMap.get(contributor.login); + if (existing) { + existing.contributions += contributor.contributions; + } else { + contributionMap.set(contributor.login, { ...contributor }); + } + } + } + + return Array.from(contributionMap.values()).sort( + (a, b) => b.contributions - a.contributions + ); + } +); diff --git a/src/redux/contributors/contributorsSlice.ts b/src/redux/contributors/contributorsSlice.ts new file mode 100644 index 00000000..89691767 --- /dev/null +++ b/src/redux/contributors/contributorsSlice.ts @@ -0,0 +1,41 @@ +import { createSlice } from '@reduxjs/toolkit'; + +import { getContributors } from './contributorsMiddleware'; + +export interface GitHubContributor { + login: string; + avatarUrl: string; + htmlUrl: string; + contributions: number; +} + +export interface ContributorsState { + contributors: GitHubContributor[]; + status: 'idle' | 'loading' | 'succeeded' | 'failed'; +} + +const initialState: ContributorsState = { + contributors: [], + status: 'idle' +}; + +export const contributorsSlice = createSlice({ + name: 'contributors', + initialState, + reducers: {}, + extraReducers: (builder) => { + builder + .addCase(getContributors.pending, (state) => { + state.status = 'loading'; + }) + .addCase(getContributors.fulfilled, (state, action) => { + state.contributors = action.payload; + state.status = 'succeeded'; + }) + .addCase(getContributors.rejected, (state) => { + state.status = 'failed'; + }); + } +}); + +export const contributorsReducer = contributorsSlice.reducer; diff --git a/src/redux/store.ts b/src/redux/store.ts index 63b82240..ee8eeb61 100644 --- a/src/redux/store.ts +++ b/src/redux/store.ts @@ -4,6 +4,7 @@ import { actionsReducer } from './actions/actionsSlice'; import { cameraReducer } from './camera/cameraSlice'; import { cameraPathReducer } from './camerapath/cameraPathSlice'; import { connectionReducer } from './connection/connectionSlice'; +import { contributorsReducer } from './contributors/contributorsSlice'; import { documentationReducer } from './documentation/documentationSlice'; import { engineModeReducer } from './enginemode/engineModeSlice'; import { exoplanetsReducer } from './exoplanets/exoplanetsSlice'; @@ -28,6 +29,7 @@ export const store = configureStore({ camera: cameraReducer, cameraPath: cameraPathReducer, connection: connectionReducer, + contributors: contributorsReducer, documentation: documentationReducer, engineMode: engineModeReducer, exoplanets: exoplanetsReducer,