chore: improve third-party license compliance

This commit is contained in:
pa
2026-03-19 19:37:28 +09:00
parent 6618966ebc
commit f9d3f7089b
6 changed files with 814 additions and 506 deletions

View File

@@ -0,0 +1,456 @@
/* global __dirname, require */
// generate-third-party-licenses.js
// use by frontend open source software notice dialog
const fs = require('fs');
const os = require('os');
const path = require('path');
const rootDir = path.join(__dirname, '..');
const frontendLicensePath = path.join(
rootDir,
'build',
'html',
'.vite',
'license.md'
);
const outputDir = path.join(rootDir, 'build', 'html', 'licenses');
const outputManifestPath = path.join(outputDir, 'third-party-licenses.json');
const outputNoticePath = path.join(outputDir, 'THIRD_PARTY_NOTICES.txt');
const dotnetDir = path.join(rootDir, 'Dotnet');
const nugetCacheDir =
process.env.NUGET_PACKAGES || path.join(os.homedir(), '.nuget', 'packages');
const overridesPath = path.join(__dirname, 'licenses', 'nuget-overrides.json');
const nugetOverrides = JSON.parse(fs.readFileSync(overridesPath, 'utf8'));
function ensureDirectory(directoryPath) {
fs.mkdirSync(directoryPath, { recursive: true });
}
function readFileIfExists(filePath) {
if (!fs.existsSync(filePath)) {
return null;
}
return fs.readFileSync(filePath, 'utf8');
}
function normalizeWhitespace(value) {
return value?.replace(/\r\n/g, '\n').trim() || '';
}
function sanitizeId(value) {
return value
.toLowerCase()
.replace(/[^a-z0-9]+/g, '-')
.replace(/^-|-$/g, '');
}
function extractXmlTagValue(xml, tagName) {
const match = xml.match(
new RegExp(`<${tagName}>([\\s\\S]*?)<\\/${tagName}>`, 'i')
);
return match?.[1]?.trim() || '';
}
function extractXmlSelfClosingTagAttribute(xml, tagName, attributeName) {
const match = xml.match(
new RegExp(
`<${tagName}[^>]*${attributeName}="([^"]+)"[^>]*>(?:[\\s\\S]*?)<\\/${tagName}>`,
'i'
)
);
return match?.[1]?.trim() || '';
}
function extractRepositoryUrl(xml) {
const match = xml.match(/<repository[^>]*url="([^"]+)"/i);
return match?.[1]?.trim() || '';
}
function findFirstExistingFile(filePaths) {
return filePaths.find((filePath) => fs.existsSync(filePath)) || null;
}
function findPackageLicenseFile(packageDir) {
if (!fs.existsSync(packageDir)) {
return null;
}
const stack = [packageDir];
while (stack.length > 0) {
const currentDir = stack.pop();
const dirEntries = fs.readdirSync(currentDir, { withFileTypes: true });
for (const dirEntry of dirEntries) {
const fullPath = path.join(currentDir, dirEntry.name);
if (dirEntry.isDirectory()) {
if (!fullPath.includes(`${path.sep}tools${path.sep}`)) {
stack.push(fullPath);
}
continue;
}
if (
/^(license|licence|notice|copying)(\.[^.]+)?$/i.test(
dirEntry.name
)
) {
return fullPath;
}
}
}
return null;
}
function parseFrontendLicenses(markdown) {
const normalized = normalizeWhitespace(markdown);
if (!normalized) {
return [];
}
const sections = normalized.split(/\n(?=## )/g).slice(1);
return sections
.map((section) => {
const [headerLine, ...bodyLines] = section.split('\n');
const headerMatch = headerLine.match(
/^##\s+(.+?)\s+-\s+(.+?)\s+\((.+?)\)$/
);
if (!headerMatch) {
return null;
}
const [, name, version, license] = headerMatch;
const noticeText = normalizeWhitespace(bodyLines.join('\n'));
return {
id: `frontend-${sanitizeId(`${name}-${version}`)}`,
name,
version,
license,
sourceType: 'frontend',
sourceLabel: 'Frontend bundle',
noticeText,
needsReview: !license && !noticeText
};
})
.filter(Boolean)
.sort((left, right) => left.name.localeCompare(right.name));
}
function parseCsprojPackageReferences(csprojText) {
return [
...csprojText.matchAll(
/<PackageReference\s+Include="([^"]+)"\s+Version="([^"]+)"/g
)
].map(([, name, version]) => ({
name,
version,
sourceType: 'dotnet'
}));
}
function parseCsprojBinaryReferences(csprojText) {
const binaryEntries = [];
for (const [, name, hintPath] of csprojText.matchAll(
/<Reference\s+Include="([^"]+)">[\s\S]*?<HintPath>([^<]+)<\/HintPath>[\s\S]*?<\/Reference>/g
)) {
binaryEntries.push({
name,
version: '',
sourceType: 'native',
filePath: hintPath.replaceAll('\\', '/')
});
}
for (const [, includePath] of csprojText.matchAll(
/<None\s+Include="([^"]*libs[^"]+\.(?:dll|so|dylib))">/g
)) {
const normalizedPath = includePath.replaceAll('\\', '/');
const fileName = path.basename(normalizedPath);
const overrideName =
fileName === 'openvr_api.dll' ? 'OpenVR SDK' : fileName;
binaryEntries.push({
name: overrideName,
version: '',
sourceType: 'native',
filePath: normalizedPath
});
}
return binaryEntries;
}
function parseAssetsLibraries(projectAssetsPath) {
const assetsRaw = readFileIfExists(projectAssetsPath);
if (!assetsRaw) {
return [];
}
const assets = JSON.parse(assetsRaw);
const libraries = assets.libraries || {};
return Object.keys(libraries)
.filter(
(libraryKey) =>
!libraries[libraryKey]?.type ||
libraries[libraryKey].type === 'package'
)
.map((libraryKey) => {
const lastSlashIndex = libraryKey.lastIndexOf('/');
return {
name: libraryKey.slice(0, lastSlashIndex),
version: libraryKey.slice(lastSlashIndex + 1),
sourceType: 'dotnet'
};
});
}
function mergeDotnetEntries(csprojFiles) {
const collectedEntries = new Map();
for (const csprojFile of csprojFiles) {
const projectName = path.basename(csprojFile, '.csproj');
const csprojText = fs.readFileSync(csprojFile, 'utf8');
const assetEntries = parseAssetsLibraries(
path.join(path.dirname(csprojFile), 'obj', 'project.assets.json')
);
const packageEntries =
assetEntries.length > 0
? assetEntries
: parseCsprojPackageReferences(csprojText);
const binaryEntries = parseCsprojBinaryReferences(csprojText);
for (const entry of [...packageEntries, ...binaryEntries]) {
const key = `${entry.sourceType}:${entry.name}:${entry.version}`;
const existingEntry = collectedEntries.get(key) || {
...entry,
projects: []
};
existingEntry.projects = [
...new Set([...existingEntry.projects, projectName])
].sort();
collectedEntries.set(key, existingEntry);
}
}
return [...collectedEntries.values()].sort((left, right) =>
left.name.localeCompare(right.name)
);
}
function resolveNugetMetadata(name, version) {
const packageDir = path.join(nugetCacheDir, name.toLowerCase(), version);
const nuspecPath =
findFirstExistingFile([
path.join(packageDir, `${name.toLowerCase()}.nuspec`),
...(fs.existsSync(packageDir)
? fs
.readdirSync(packageDir)
.filter((fileName) => fileName.endsWith('.nuspec'))
.map((fileName) => path.join(packageDir, fileName))
: [])
]) || null;
const override = nugetOverrides[name] || {};
const metadata = {
license: override.license || '',
licenseUrl: override.licenseUrl || '',
projectUrl: override.projectUrl || '',
noticeText: normalizeWhitespace(override.noticeText),
needsReview: false
};
if (!nuspecPath) {
metadata.needsReview = !metadata.license && !metadata.noticeText;
return metadata;
}
const nuspecText = fs.readFileSync(nuspecPath, 'utf8');
const licenseExpression =
extractXmlSelfClosingTagAttribute(nuspecText, 'license', 'type') ===
'expression'
? extractXmlTagValue(nuspecText, 'license')
: '';
const licenseFilePath =
extractXmlSelfClosingTagAttribute(nuspecText, 'license', 'type') ===
'file'
? extractXmlTagValue(nuspecText, 'license')
: '';
metadata.license ||= licenseExpression;
metadata.licenseUrl ||= extractXmlTagValue(nuspecText, 'licenseUrl');
metadata.projectUrl ||=
extractXmlTagValue(nuspecText, 'projectUrl') ||
extractRepositoryUrl(nuspecText);
if (!metadata.noticeText) {
const embeddedLicensePath = licenseFilePath
? path.join(packageDir, licenseFilePath.replaceAll('\\', path.sep))
: null;
const discoveredLicensePath = findPackageLicenseFile(packageDir);
const resolvedLicensePath = findFirstExistingFile(
[embeddedLicensePath, discoveredLicensePath].filter(Boolean)
);
metadata.noticeText = normalizeWhitespace(
readFileIfExists(resolvedLicensePath)
);
}
metadata.needsReview = !metadata.license && !metadata.noticeText;
return metadata;
}
function enrichDotnetEntries(entries) {
return entries.map((entry) => {
const override = nugetOverrides[entry.name] || {};
if (entry.sourceType === 'native') {
return {
id: `native-${sanitizeId(entry.name)}`,
...entry,
license: override.license || 'Unknown',
licenseUrl: override.licenseUrl || '',
projectUrl: override.projectUrl || '',
noticeText: normalizeWhitespace(override.noticeText),
sourceLabel: 'Bundled native/.NET component',
needsReview: !override.license && !override.noticeText
};
}
const metadata = entry.version
? resolveNugetMetadata(entry.name, entry.version)
: {
license: override.license || '',
licenseUrl: override.licenseUrl || '',
projectUrl: override.projectUrl || '',
noticeText: normalizeWhitespace(override.noticeText),
needsReview: !override.license && !override.noticeText
};
return {
id: `${entry.sourceType}-${sanitizeId(`${entry.name}-${entry.version}`)}`,
...entry,
license: metadata.license || 'Unknown',
licenseUrl: metadata.licenseUrl || '',
projectUrl: metadata.projectUrl || '',
noticeText: metadata.noticeText,
sourceLabel: 'Bundled .NET/native backend component',
needsReview: metadata.needsReview
};
});
}
function createThirdPartyNoticeText(frontendLicenseMarkdown, entries) {
const lines = [
'VRCX Third-Party Notices',
'',
`Generated: ${new Date().toISOString()}`,
'',
'========================================',
'Frontend bundled dependencies',
'========================================',
'',
normalizeWhitespace(frontendLicenseMarkdown) ||
'No frontend license manifest was available.',
'',
'',
'========================================',
'.NET and native bundled components',
'========================================',
''
];
for (const entry of entries.filter(
(item) => item.sourceType !== 'frontend'
)) {
lines.push(
`${entry.name}${entry.version ? ` - ${entry.version}` : ''} (${entry.license})`
);
lines.push(`Source: ${entry.sourceLabel}`);
if (entry.projects?.length) {
lines.push(`Used by: ${entry.projects.join(', ')}`);
}
if (entry.projectUrl) {
lines.push(`Project URL: ${entry.projectUrl}`);
}
if (entry.licenseUrl) {
lines.push(`License URL: ${entry.licenseUrl}`);
}
if (entry.filePath) {
lines.push(`Bundled file: ${entry.filePath}`);
}
lines.push('');
if (entry.noticeText) {
lines.push(entry.noticeText);
} else {
lines.push(
'No local license text was available during generation. Review this component before release.'
);
}
lines.push('');
lines.push('----------------------------------------');
lines.push('');
}
return `${lines.join('\n').trimEnd()}\n`;
}
function main() {
ensureDirectory(outputDir);
const frontendLicenseMarkdown = readFileIfExists(frontendLicensePath) || '';
const frontendEntries = parseFrontendLicenses(frontendLicenseMarkdown);
const csprojFiles = fs
.readdirSync(dotnetDir)
.filter((fileName) => fileName.endsWith('.csproj'))
.map((fileName) => path.join(dotnetDir, fileName))
.concat(path.join(dotnetDir, 'DBMerger', 'DBMerger.csproj'))
.filter(
(filePath, index, filePaths) =>
filePaths.indexOf(filePath) === index && fs.existsSync(filePath)
);
const dotnetEntries = enrichDotnetEntries(mergeDotnetEntries(csprojFiles));
const manifest = {
generatedAt: new Date().toISOString(),
noticePath: 'licenses/THIRD_PARTY_NOTICES.txt',
entries: [...frontendEntries, ...dotnetEntries]
};
fs.writeFileSync(outputManifestPath, JSON.stringify(manifest, null, 4));
fs.writeFileSync(
outputNoticePath,
createThirdPartyNoticeText(frontendLicenseMarkdown, manifest.entries)
);
const reviewCount = manifest.entries.filter(
(entry) => entry.needsReview
).length;
console.log(
`Generated third-party license manifest with ${manifest.entries.length} entries (${reviewCount} requiring review).`
);
}
main();

View File

@@ -0,0 +1,101 @@
{
"CefSharp.OffScreen.NETCore": {
"license": "BSD-3-Clause",
"projectUrl": "https://github.com/cefsharp/CefSharp",
"noticeText": "// Copyright © The CefSharp Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//\n// * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the name CefSharp nor the names of its contributors\n// may be used to endorse or promote products derived from this software\n// without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
},
"CefSharp.WinForms.NETCore": {
"license": "BSD-3-Clause",
"projectUrl": "https://github.com/cefsharp/CefSharp",
"noticeText": "// Copyright © The CefSharp Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n//\n// * Neither the name of Google Inc. nor the name Chromium Embedded\n// Framework nor the name CefSharp nor the names of its contributors\n// may be used to endorse or promote products derived from this software\n// without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
},
"DiscordRichPresence": {
"license": "MIT",
"projectUrl": "https://github.com/Lachee/discord-rpc-csharp",
"noticeText": "MIT License\n\nCopyright (c) 2018 Lachee\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 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."
},
"Newtonsoft.Json": {
"license": "MIT",
"projectUrl": "https://github.com/JamesNK/Newtonsoft.Json",
"noticeText": "The MIT License (MIT)\n\nCopyright (c) 2007 James Newton-King\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."
},
"NLog": {
"license": "BSD-3-Clause",
"projectUrl": "https://github.com/NLog/NLog",
"noticeText": "BSD 3-Clause License\n\nCopyright (c) 2004-2024 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
},
"SixLabors.ImageSharp": {
"license": "Apache-2.0 OR Six Labors Split License",
"projectUrl": "https://github.com/SixLabors/ImageSharp",
"noticeText": "Apache License 2.0\n\nSix Labors Split License\nVersion 1.0, June 2022\nCopyright (c) Six Labors\n\nWorks in Source or Object form are split licensed and may be licensed under the Apache License, Version 2.0 or a Six Labors Commercial Use License.\n\nWorks in Source or Object form are licensed to You under the Apache License, Version 2.0 if:\n- You are consuming the Work in software licensed under an Open Source or Source Available license.\n- You are consuming the Work as a Transitive Package Dependency.\n- You are consuming the Work as a Direct Package Dependency as a for-profit company or individual with less than 1M USD annual gross revenue.\n- You are consuming the Work as a Direct Package Dependency as a non-profit organization or registered charity.\n\nFor all other scenarios, Works in Source or Object form are licensed to You under the Six Labors Commercial License."
},
"SixLabors.ImageSharp.Drawing": {
"license": "Apache-2.0 OR Six Labors Split License",
"projectUrl": "https://github.com/SixLabors/ImageSharp.Drawing",
"noticeText": "Apache License 2.0\n\nSix Labors Split License\nVersion 1.0, June 2022\nCopyright (c) Six Labors\n\nWorks in Source or Object form are split licensed and may be licensed under the Apache License, Version 2.0 or a Six Labors Commercial Use License.\n\nWorks in Source or Object form are licensed to You under the Apache License, Version 2.0 if:\n- You are consuming the Work in software licensed under an Open Source or Source Available license.\n- You are consuming the Work as a Transitive Package Dependency.\n- You are consuming the Work as a Direct Package Dependency as a for-profit company or individual with less than 1M USD annual gross revenue.\n- You are consuming the Work as a Direct Package Dependency as a non-profit organization or registered charity.\n\nFor all other scenarios, Works in Source or Object form are licensed to You under the Six Labors Commercial License."
},
"OpenVR SDK": {
"license": "BSD-3-Clause",
"projectUrl": "https://github.com/ValveSoftware/openvr",
"noticeText": "Copyright (c) 2015, Valve Corporation\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation and/or\nother materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors\nmay be used to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
},
"Blake2Sharp": {
"license": "CC0-1.0 OR OpenSSL OR Apache-2.0",
"projectUrl": "https://github.com/BLAKE2/BLAKE2"
},
"librsync.net": {
"license": "MIT"
},
"Microsoft.JavaScript.NodeApi": {
"license": "MIT",
"projectUrl": "https://github.com/microsoft/node-api-dotnet"
},
"Microsoft.JavaScript.NodeApi.Generator": {
"license": "MIT",
"projectUrl": "https://github.com/microsoft/node-api-dotnet"
},
"Microsoft.Toolkit.Uwp.Notifications": {
"license": "MIT",
"projectUrl": "https://github.com/CommunityToolkit/WindowsCommunityToolkit"
},
"Silk.NET.Direct3D.Compilers": {
"license": "MIT/X11",
"projectUrl": "https://github.com/dotnet/Silk.NET"
},
"Silk.NET.Direct3D11": {
"license": "MIT/X11",
"projectUrl": "https://github.com/dotnet/Silk.NET"
},
"Silk.NET.DXGI": {
"license": "MIT/X11",
"projectUrl": "https://github.com/dotnet/Silk.NET"
},
"Silk.NET.Windowing": {
"license": "MIT/X11",
"projectUrl": "https://github.com/dotnet/Silk.NET"
},
"SourceGear.sqlite3": {
"license": "Apache-2.0",
"projectUrl": "https://github.com/ericsink/SQLitePCL.raw"
},
"sqlite-net-pcl": {
"license": "MIT",
"projectUrl": "https://github.com/praeclarum/sqlite-net"
},
"System.CommandLine": {
"license": "MIT",
"projectUrl": "https://github.com/dotnet/command-line-api"
},
"System.Data.SQLite": {
"license": "Public Domain (with MS-PL components in LINQ/EF-related code)",
"projectUrl": "https://system.data.sqlite.org/"
},
"System.Management": {
"license": "MIT",
"projectUrl": "https://www.nuget.org/packages/System.Management"
},
"Websocket.Client": {
"license": "MIT",
"projectUrl": "https://github.com/Marfusios/websocket-client"
}
}

View File

@@ -1,7 +1,20 @@
{
"name": "VRCX",
"description": "Friendship management tool for VRChat",
"private": true,
"description": "Friendship management tool for VRChat",
"keywords": [
"vrchat"
],
"homepage": "https://github.com/vrcx-team/VRCX#readme",
"bugs": {
"url": "https://github.com/vrcx-team/VRCX/issues"
},
"license": "MIT",
"author": "VRCX Team",
"repository": {
"type": "git",
"url": "git+https://github.com/vrcx-team/VRCX.git"
},
"main": "src-electron/main.js",
"scripts": {
"dev": "cross-env PLATFORM=windows vite serve src",
@@ -13,27 +26,19 @@
"typecheck:js": "tsc -p tsconfig.checkjs.json --pretty false",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"prod": "cross-env PLATFORM=windows vite build src",
"prod-linux": "cross-env PLATFORM=linux vite build src",
"build:licenses": "node ./build-scripts/generate-third-party-licenses.js",
"prod": "cross-env PLATFORM=windows vite build src && npm run build:licenses",
"prod-linux": "cross-env PLATFORM=linux vite build src && npm run build:licenses",
"build-electron": "node ./src-electron/download-dotnet-runtime.js --arch=x64 && node ./src-electron/patch-package-version.js && electron-builder --x64 --publish never",
"build-electron-arm64": "node ./src-electron/download-dotnet-runtime.js --arch=arm64 && node ./src-electron/patch-package-version.js && electron-builder --arm64 --publish never",
"postbuild-electron": "node ./src-electron/patch-node-api-dotnet.js --arch=x64 && node ./src-electron/rename-builds.js --arch=x64",
"postbuild-electron-arm64": "node ./src-electron/patch-node-api-dotnet.js --arch=arm64 && node ./src-electron/rename-builds.js --arch=arm64",
"start-electron": "electron . --hot-reload"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vrcx-team/VRCX.git"
"dependencies": {
"hazardous": "^0.3.0",
"node-api-dotnet": "^0.9.19"
},
"keywords": [
"vrchat"
],
"author": "VRCX Team",
"license": "MIT",
"bugs": {
"url": "https://github.com/vrcx-team/VRCX/issues"
},
"homepage": "https://github.com/vrcx-team/VRCX#readme",
"devDependencies": {
"@dnd-kit/vue": "^0.3.2",
"@electron/rebuild": "^4.0.3",
@@ -106,6 +111,10 @@
"yargs": "^18.0.0",
"zod": "^3.25.76"
},
"engines": {
"node": ">=24.10.0",
"npm": ">=11.5.0"
},
"build": {
"appId": "app.vrcx",
"productName": "VRCX",
@@ -188,13 +197,5 @@
"category": "public.app-category.utilities",
"executableName": "VRCX"
}
},
"dependencies": {
"hazardous": "^0.3.0",
"node-api-dotnet": "^0.9.19"
},
"engines": {
"node": ">=24.10.0",
"npm": ">=11.5.0"
}
}

View File

@@ -2312,7 +2312,18 @@
},
"open_source": {
"header": "Open Source Software Notice",
"description": "VRCX is based on open source software. It was possible because of their contribution."
"description": "VRCX is based on open source software. It was possible because of their contribution.",
"loading": "Loading generated third-party notices...",
"unavailable": "No generated third-party notice manifest is available in this build. Run a production build to regenerate it.",
"search_placeholder": "Search packages, versions, or licenses",
"notice_location_prefix": "Full notices file location in the app directory:",
"open_project": "Open Project",
"open_license_url": "Open License URL",
"notice_unavailable": "No local license text was generated for this entry. Open the full notice file and review this component before release.",
"select_package": "Select a package to view details.",
"review_required": "Review required",
"no_results": "No matching packages found.",
"no_version": "No version metadata"
},
"primary_password": {
"header": "Primary Password Required",

View File

@@ -1,471 +0,0 @@
const openSourceSoftwareLicenses = [
{
name: 'animate.css',
licenseText: `The MIT License (MIT)
Copyright (c) 2019 Daniel Eden
Permission 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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE 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: 'CefSharp',
licenseText: `// Copyright © The CefSharp Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the name CefSharp nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.`
},
{
name: 'DiscordRichPresence',
licenseText: `MIT License
Copyright (c) 2018 Lachee
Permission 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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE 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: 'element',
licenseText: `The MIT License (MIT)
Copyright (c) 2016-present ElemeFE
Permission 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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE 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: 'Newtonsoft.Json',
licenseText: `The MIT License (MIT)
Copyright (c) 2007 James Newton-King
Permission 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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE 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: 'normalize',
licenseText: `The MIT License (MIT)
Copyright © Nicolas Gallagher and Jonathan Neal
Permission 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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE 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: 'noty',
licenseText: `Copyright (c) 2012 Nedim Arabacı
Permission 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:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE 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: 'OpenVR SDK',
licenseText: `Copyright (c) 2015, Valve Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.`
},
{
name: 'Twemoji',
licenseText: `MIT License
Copyright (c) 2021 Twitter
Permission 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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE 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: 'SharpDX',
licenseText: `Copyright (c) 2010-2014 SharpDX - Alexandre Mutel
Permission 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:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE 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: 'vue',
licenseText: `The MIT License (MIT)
Copyright (c) 2013-present, Yuxi (Evan) You
Permission 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:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE 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: 'NLog',
licenseText: `BSD 3-Clause License
Copyright (c) 2004-2024 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Jaroslaw Kowalski nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.`
},
{
name: 'Encode Sans Font (from Dark Vanilla)',
licenseText: `SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
Copyright (c) 2020 June 20, Impallari Type, Andres Torresi, Jacques Le Bailly
(https://fonts.google.com/specimen/Encode+Sans),
with Reserved Font Name: Encode Sans.
PREAMBLE:
The goals of the Open Font License (OFL) are to stimulate worldwide development
of collaborative font projects, to support the font creation efforts of academic
and linguistic communities, and to provide a free and open framework in which
fonts may be shared and improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and redistributed
freely as long as they are not sold by themselves. The fonts, including any
derivative works, can be bundled, embedded, redistributed and/or sold with any
software provided that any reserved names are not used by derivative works.
The fonts and derivatives, however, cannot be released under any other type of
license. The requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining a copy of
the Font Software, to use, study, copy, merge, embed, modify, redistribute, and
sell modified and unmodified copies of the Font Software, subject to the
following conditions:
1. Neither the Font Software nor any of its individual components, in Original or
Modified Versions, may be sold by itself.
2. Original or Modified Versions of the Font Software may be bundled, redistributed
and/or sold with any software, provided that each copy contains the above copyright
notice and this license. These can be included either as stand-alone text files,
human-readable headers or in the appropriate machine-readable metadata fields within
text or binary files as long as those fields can be easily viewed by the user.
3. No Modified Version of the Font Software may use the Reserved Font Name(s) unless
explicit written permission is granted by the corresponding Copyright Holder. This
restriction only applies to the primary font name as presented to the users.
4. The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall
not be used to promote, endorse or advertise any Modified Version, except to
acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with
their explicit written permission.
5. The Font Software, modified or unmodified, in part or in whole, must be distributed
entirely under this license, and must not be distributed under any other license.
The requirement for fonts to remain under this license does not apply to any document
created using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR
OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
DEALINGS IN THE FONT SOFTWARE.`
},
{
name: 'SixLabors ImageSharp',
licenseText: `Apache License 2.0
Six Labors Split License
Version 1.0, June 2022
Copyright (c) Six Labors
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source
code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including
but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" (or "Works") shall mean any Six Labors software made available under the License, as indicated by a
copyright notice that is included in or attached to the work.
"Direct Package Dependency" shall mean any Work in Source or Object form that is installed directly by You.
"Transitive Package Dependency" shall mean any Work in Object form that is installed indirectly by a third party
dependency unrelated to Six Labors.
2. License
Works in Source or Object form are split licensed and may be licensed under the Apache License, Version 2.0 or a
Six Labors Commercial Use License.
Licenses are granted based upon You meeting the qualified criteria as stated. Once granted,
You must reference the granted license only in all documentation.
Works in Source or Object form are licensed to You under the Apache License, Version 2.0 if.
- You are consuming the Work in for use in software licensed under an Open Source or Source Available license.
- You are consuming the Work as a Transitive Package Dependency.
- You are consuming the Work as a Direct Package Dependency in the capacity of a For-profit company/individual with
less than 1M USD annual gross revenue.
- You are consuming the Work as a Direct Package Dependency in the capacity of a Non-profit organization
or Registered Charity.
For all other scenarios, Works in Source or Object form are licensed to You under the Six Labors Commercial License
which may be purchased by visiting https://sixlabors.com/pricing/.`
},
{
name: 'Apache ECharts',
licenseText: `Apache License 2.0
Copyright 2017-2025 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).`
},
{
name: 'dayjs',
licenseText: `MIT License
Copyright (c) 2018-present, iamkun
Permission 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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE 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: 'Electron',
licenseText: `MIT License
Copyright (c) Electron contributors
Copyright (c) 2013-2020 GitHub Inc.
Permission 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:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE 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: 'Remix Icon',
licenseText: `Apache License 2.0
Copyright 2017-2025 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).`
}
];
export { openSourceSoftwareLicenses };

View File

@@ -1,17 +1,130 @@
<template>
<Dialog :open="ossDialog" @update:open="(open) => !open && closeDialog()">
<DialogContent>
<DialogContent class="sm:max-w-5xl">
<DialogHeader>
<DialogTitle>{{ t('dialog.open_source.header') }}</DialogTitle>
</DialogHeader>
<div v-once style="height: 350px; overflow: hidden scroll; word-break: break-all">
<div>
<span>{{ t('dialog.open_source.description') }}</span>
<div class="space-y-4">
<Card>
<CardHeader>
<CardTitle class="text-base">
{{ t('dialog.open_source.description') }}
</CardTitle>
<CardDescription>
{{ t('dialog.open_source.notice_location_prefix') }}
<code class="rounded bg-muted px-1.5 py-0.5 text-xs">
{{ noticeRelativePath }}
</code>
</CardDescription>
</CardHeader>
<CardContent>
<Input v-model="searchQuery" :placeholder="t('dialog.open_source.search_placeholder')" />
</CardContent>
</Card>
<div v-if="isLoading" class="rounded-md border border-dashed p-6 text-sm text-muted-foreground">
{{ t('dialog.open_source.loading') }}
</div>
<div class="mt-4" v-for="lib in openSourceSoftwareLicenses" :key="lib.name">
<p style="font-weight: bold">{{ lib.name }}</p>
<pre class="text-xs whitespace-pre-line">{{ lib.licenseText }}</pre>
<div v-else-if="loadError" class="rounded-md border border-dashed p-6 text-sm text-muted-foreground">
{{ t('dialog.open_source.unavailable') }}
</div>
<div v-else class="grid gap-4 md:grid-cols-[minmax(0,18rem)_minmax(0,1fr)]">
<div class="h-[28rem] space-y-3 overflow-y-auto pr-1">
<Card
v-for="entry in filteredEntries"
:key="entry.id"
:class="[
'cursor-pointer transition-colors',
entry.id === selectedEntry?.id ? 'border-primary bg-accent' : 'hover:bg-accent/40'
]"
@click="selectedEntryId = entry.id">
<CardHeader class="gap-2">
<CardTitle class="truncate text-sm" :title="entry.name">
{{ entry.name }}
</CardTitle>
<CardDescription>
{{ entry.version || t('dialog.open_source.no_version') }}
</CardDescription>
</CardHeader>
<CardContent class="flex min-w-0 flex-wrap items-center gap-2">
<Badge
variant="secondary"
class="max-w-full min-w-0 shrink truncate"
:title="entry.license">
{{ getLicenseLabel(entry.license) }}
</Badge>
<span class="min-w-0 text-xs text-muted-foreground">
{{ entry.sourceLabel }}
</span>
</CardContent>
</Card>
<div
v-if="filteredEntries.length === 0"
class="rounded-md border border-dashed p-6 text-sm text-muted-foreground">
{{ t('dialog.open_source.no_results') }}
</div>
</div>
<Card class="min-h-[28rem]">
<template v-if="selectedEntry">
<CardHeader>
<div class="flex flex-wrap items-center gap-2">
<CardTitle>{{ selectedEntry.name }}</CardTitle>
<Badge variant="secondary" class="max-w-full whitespace-normal break-words">
{{ selectedEntry.license }}
</Badge>
<Badge v-if="selectedEntry.needsReview" variant="outline">
{{ t('dialog.open_source.review_required') }}
</Badge>
</div>
<CardDescription>
{{ selectedEntry.sourceLabel }}
<span v-if="selectedEntry.projects?.length">
· {{ selectedEntry.projects.join(', ') }}
</span>
</CardDescription>
</CardHeader>
<CardContent>
<div class="flex flex-wrap gap-2">
<Button
v-if="selectedEntry.projectUrl"
size="sm"
variant="outline"
@click="openExternalLink(selectedEntry.projectUrl)">
{{ t('dialog.open_source.open_project') }}
</Button>
<Button
v-if="selectedEntry.licenseUrl"
size="sm"
variant="outline"
@click="openExternalLink(selectedEntry.licenseUrl)">
{{ t('dialog.open_source.open_license_url') }}
</Button>
</div>
<pre
v-if="selectedEntry.noticeText"
class="mt-4 max-h-[20rem] overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted p-3 text-xs"
>{{ selectedEntry.noticeText }}</pre
>
<div
v-else
class="mt-4 rounded-md border border-dashed p-4 text-sm text-muted-foreground">
{{ t('dialog.open_source.notice_unavailable') }}
</div>
</CardContent>
</template>
<CardContent
v-else
class="flex h-full min-h-[28rem] items-center justify-center text-sm text-muted-foreground">
{{ t('dialog.open_source.select_package') }}
</CardContent>
</Card>
</div>
</div>
</DialogContent>
@@ -19,14 +132,19 @@
</template>
<script setup>
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
import { useI18n } from 'vue-i18n';
import { computed, ref, watch } from 'vue';
import { openSourceSoftwareLicenses } from '../../../shared/constants/ossLicenses';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
import { Input } from '@/components/ui/input';
import { openExternalLink } from '@/shared/utils';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
defineProps({
const props = defineProps({
ossDialog: {
type: Boolean,
default: false
@@ -34,6 +152,48 @@
});
const emit = defineEmits(['update:ossDialog']);
const isLoading = ref(false);
const loadError = ref(false);
const licenses = ref([]);
const noticeRelativePath = ref('licenses/THIRD_PARTY_NOTICES.txt');
const searchQuery = ref('');
const selectedEntryId = ref('');
let hasLoadedLicenses = false;
const filteredEntries = computed(() => {
const normalizedQuery = searchQuery.value.trim().toLowerCase();
if (!normalizedQuery) {
return licenses.value;
}
return licenses.value.filter((entry) => {
const haystack = [entry.name, entry.version, entry.license, entry.sourceLabel, ...(entry.projects || [])]
.filter(Boolean)
.join(' ')
.toLowerCase();
return haystack.includes(normalizedQuery);
});
});
const selectedEntry = computed(
() => filteredEntries.value.find((entry) => entry.id === selectedEntryId.value) || filteredEntries.value[0] || null
);
watch(
() => props.ossDialog,
async (open) => {
if (open && !hasLoadedLicenses) {
await loadLicenses();
}
},
{ immediate: true }
);
watch(filteredEntries, (entries) => {
if (!entries.some((entry) => entry.id === selectedEntryId.value)) {
selectedEntryId.value = entries[0]?.id || '';
}
});
/**
*
@@ -41,4 +201,54 @@
function closeDialog() {
emit('update:ossDialog', false);
}
/**
*
* @param relativePath
*/
function buildAssetUrl(relativePath) {
return new URL(relativePath, window.location.href).toString();
}
/**
*
* @param license
*/
function getLicenseLabel(license) {
if (license.startsWith('Public Domain')) {
return 'Public Domain';
}
return license;
}
/**
*
*/
async function loadLicenses() {
isLoading.value = true;
loadError.value = false;
try {
const response = await fetch(buildAssetUrl('licenses/third-party-licenses.json'), { cache: 'no-store' });
if (!response.ok) {
throw new Error(`Failed to load third-party license manifest: ${response.status}`);
}
const manifest = await response.json();
licenses.value = Array.isArray(manifest.entries) ? manifest.entries : [];
noticeRelativePath.value =
typeof manifest.noticePath === 'string' && manifest.noticePath
? manifest.noticePath
: 'licenses/THIRD_PARTY_NOTICES.txt';
selectedEntryId.value = licenses.value[0]?.id || '';
hasLoadedLicenses = true;
} catch (error) {
console.error(error);
loadError.value = true;
} finally {
isLoading.value = false;
}
}
</script>