From 261457ae38c0226f57e2ec83ab0f3cad7b38941b Mon Sep 17 00:00:00 2001 From: poli0981 <127664709+poli0981@users.noreply.github.com> Date: Mon, 12 Oct 2026 22:00:02 +0700 Subject: [PATCH] chore(legal): sync notices, REUSE and privacy with the code - THIRD_PARTY_NOTICES said the app uses the operating system's fonts; it bundles Inter and JetBrains Mono (OFL-1.1). The Rust table claimed to list the direct dependencies of src-tauri but only took names starting with "tauri", so serde was missing. The generator now reads Cargo.toml's dependency tables and fails on a crate whose license it doesn't know. - REUSE.toml credited the Gradle wrapper to the project; it is Gradle's ("the original author or authors", Apache-2.0). - The Privacy Policy lists the session-only ytdescgen-chunk-reload flag next to the localStorage keys. Not a material change, so the terms version stays 2; the Effective date moves. - DISCLAIMER (+ vi) pointed at a THIRD_PARTY_NOTICES section by an old heading. Co-Authored-By: Claude Opus 5.5 --- DISCLAIMER.md | 2 +- PRIVACY.md | 4 ++- REUSE.toml | 13 +++++++ THIRD_PARTY_NOTICES.md | 3 +- docs/i18n/vi/DISCLAIMER.md | 2 +- scripts/lib/third-party.ts | 59 +++++++++++++++++++++++++------ tests/scripts/third-party.test.ts | 40 +++++++++++++++++++++ 7 files changed, 109 insertions(+), 14 deletions(-) diff --git a/DISCLAIMER.md b/DISCLAIMER.md index 5784507..d45609f 100644 --- a/DISCLAIMER.md +++ b/DISCLAIMER.md @@ -14,7 +14,7 @@ This disclosure applies to: - CI/CD workflows in `.github/workflows/`. - The Cloudflare Worker in `worker/` and the build plugins in `build-plugins/`. -See also: [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md) § "AI-Assisted Development Disclosure". +See also: [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md) § "AI-assisted development". ## Translation quality diff --git a/PRIVACY.md b/PRIVACY.md index d716b59..2d8ac16 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -1,6 +1,6 @@ # Privacy Policy -**Effective:** 2026-09-30 +**Effective:** 2026-10-12 This policy covers YTDescGen — the web app at **https://ytgenerator.stream** and the desktop (Windows, macOS, Linux) and Android apps built from the same source. It is maintained by **poli0981 (SkullMute)**, who is responsible for it. Questions and requests: **privacy@poli0981.dev**. @@ -29,6 +29,8 @@ Your work is saved in your browser's **`localStorage`** for `ytgenerator.stream` This data never leaves your browser unless **you** export it. Clearing site data, using a private window, or a "clear cookies and site data on exit" setting erases it. +One more value can appear in **`sessionStorage`**, for the open tab only: `ytdescgen-chunk-reload`, a flag written only when an update has replaced the files the app was about to load, so that it reloads itself once instead of over and over. It holds no data and disappears when the tab closes. + ### Desktop and Android apps The apps keep the same data in the app's own WebView storage and application-data folder (the event log and automatic backups live there too): diff --git a/REUSE.toml b/REUSE.toml index d288297..e09bc31 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -12,3 +12,16 @@ path = "**" precedence = "aggregate" SPDX-FileCopyrightText = "2026 poli0981 (SkullMute) and YTDescGen contributors" SPDX-License-Identifier = "Apache-2.0" + +# The Gradle wrapper that Tauri's Android template commits is Gradle's own +# code, not the project's: its headers read "Copyright 2015 the original +# author or authors" under Apache-2.0. +[[annotations]] +path = [ + "src-tauri/gen/android/gradlew", + "src-tauri/gen/android/gradlew.bat", + "src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar", +] +precedence = "override" +SPDX-FileCopyrightText = "2015 the original author or authors" +SPDX-License-Identifier = "Apache-2.0" diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index f1867f6..68a0037 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -70,6 +70,7 @@ Direct dependencies of `src-tauri/`. Transitive crates are checked in CI by `car | Crate | Version | License | Project | | --- | --- | --- | --- | +| `serde` | 1.0.228 | MIT OR Apache-2.0 | | | `tauri` | 2.12.0 | Apache-2.0 OR MIT | | | `tauri-build` | 2.7.0 | Apache-2.0 OR MIT | | | `tauri-plugin-dialog` | 2.8.0 | Apache-2.0 OR MIT | | @@ -79,7 +80,7 @@ Direct dependencies of `src-tauri/`. Transitive crates are checked in CI by `car ## Fonts and icons - **Icons:** [Lucide](https://lucide.dev/) (`lucide-react`, ISC). Brand marks, where shown, come from [Simple Icons](https://simpleicons.org/) (CC0-1.0); the trademarks belong to their owners. -- **Fonts:** the app uses the operating system's fonts. +- **Fonts:** [Inter](https://rsms.me/inter/) and [JetBrains Mono](https://www.jetbrains.com/lp/mono/), bundled with the app from the `@fontsource-variable` packages above (SIL Open Font License 1.1, `OFL-1.1`). ## Services (web app only) diff --git a/docs/i18n/vi/DISCLAIMER.md b/docs/i18n/vi/DISCLAIMER.md index 4c76856..116da0b 100644 --- a/docs/i18n/vi/DISCLAIMER.md +++ b/docs/i18n/vi/DISCLAIMER.md @@ -16,7 +16,7 @@ Tuyên bố này áp dụng cho: - Workflow CI/CD trong `.github/workflows/`. - Cloudflare Worker trong `worker/` và các build plugin trong `build-plugins/`. -Xem thêm: [`THIRD_PARTY_NOTICES.md`](../../../THIRD_PARTY_NOTICES.md) § "AI-Assisted Development Disclosure". +Xem thêm: [`THIRD_PARTY_NOTICES.md`](../../../THIRD_PARTY_NOTICES.md) § "AI-assisted development". ## Chất lượng bản dịch diff --git a/scripts/lib/third-party.ts b/scripts/lib/third-party.ts index 6dbb601..268fa2e 100644 --- a/scripts/lib/third-party.ts +++ b/scripts/lib/third-party.ts @@ -86,20 +86,59 @@ function npmRows(names: string[]): Row[] { }); } +/** + * Crates `src-tauri/Cargo.toml` depends on directly — the `[dependencies]`, + * `[build-dependencies]` and `[target.….dependencies]` tables. Dev-only + * dependencies don't ship and are left out. + */ +export function directCrates(toml: string): string[] { + const names = new Set(); + let inDependencies = false; + for (const raw of toml.replace(/\r\n/g, "\n").split("\n")) { + const line = raw.trim(); + if (line.startsWith("[")) { + inDependencies = /^\[(?:target\..+\.)?(?:build-)?dependencies\]$/.test(line); + continue; + } + const name = inDependencies ? /^([A-Za-z0-9_-]+)\s*=/.exec(line)?.[1] : undefined; + if (name) names.add(name); + } + return [...names].sort(); +} + +/** + * License and project page of the direct crates that aren't Tauri's own. + * Cargo.lock carries no license, so a new dependency fails the generator + * until it is added here; `cargo deny` vets the transitive tree. + */ +const OTHER_CRATES: Record = { + serde: { license: "MIT OR Apache-2.0", url: "https://github.com/serde-rs/serde" }, +}; + +function crateInfo(name: string): { license: string; url: string } { + if (name.startsWith("tauri-plugin")) { + return { license: "Apache-2.0 OR MIT", url: "https://github.com/tauri-apps/plugins-workspace" }; + } + if (name.startsWith("tauri")) { + return { license: "Apache-2.0 OR MIT", url: "https://github.com/tauri-apps/tauri" }; + } + const info = OTHER_CRATES[name]; + if (!info) { + throw new Error( + `src-tauri depends on "${name}": add its license and project page to OTHER_CRATES in scripts/lib/third-party.ts`, + ); + } + return info; +} + function crateRows(): Row[] { - const toml = readFileSync(resolve(ROOT, "src-tauri/Cargo.toml"), "utf8").replace(/\r\n/g, "\n"); + const toml = readFileSync(resolve(ROOT, "src-tauri/Cargo.toml"), "utf8"); const lock = readFileSync(resolve(ROOT, "src-tauri/Cargo.lock"), "utf8").replace(/\r\n/g, "\n"); - const names = [...toml.matchAll(/^([a-z][a-z0-9_-]*)\s*=\s*(?:"|\{)/gm)] - .map((m) => m[1] ?? "") - .filter((n) => n.startsWith("tauri")); - return [...new Set(names)].sort().map((name) => { + return directCrates(toml).map((name) => { const version = new RegExp(`\\[\\[package\\]\\]\\nname = "${name}"\\nversion = "([^"]+)"`).exec(lock)?.[1] ?? "?"; - const url = name.startsWith("tauri-plugin") - ? "https://github.com/tauri-apps/plugins-workspace" - : "https://github.com/tauri-apps/tauri"; - return { name, version, license: "Apache-2.0 OR MIT", url }; + return { name, version, ...crateInfo(name) }; }); } @@ -147,7 +186,7 @@ ${table(crateRows(), "Crate")} ## Fonts and icons - **Icons:** [Lucide](https://lucide.dev/) (\`lucide-react\`, ISC). Brand marks, where shown, come from [Simple Icons](https://simpleicons.org/) (CC0-1.0); the trademarks belong to their owners. -- **Fonts:** the app uses the operating system's fonts. +- **Fonts:** [Inter](https://rsms.me/inter/) and [JetBrains Mono](https://www.jetbrains.com/lp/mono/), bundled with the app from the \`@fontsource-variable\` packages above (SIL Open Font License 1.1, \`OFL-1.1\`). ## Services (web app only) diff --git a/tests/scripts/third-party.test.ts b/tests/scripts/third-party.test.ts index fe5b76b..b4a12d3 100644 --- a/tests/scripts/third-party.test.ts +++ b/tests/scripts/third-party.test.ts @@ -1,5 +1,6 @@ import { describe, it, expect } from "vitest"; import { + directCrates, disallowedProductionLicenses, licenseAllowed, renderNotices, @@ -35,4 +36,43 @@ describe("the installed tree", () => { expect(md).toContain("Cloudflare Turnstile"); expect(md).toContain("/licenses/third-party.md"); }); + + it("lists every direct Rust crate, not only Tauri's, and the bundled fonts", () => { + const md = renderNotices(); + for (const name of ["tauri", "tauri-build", "tauri-plugin-single-instance", "serde"]) { + expect(md).toContain(`| \`${name}\` |`); + } + expect(md).toContain("Inter"); + expect(md).toContain("JetBrains Mono"); + expect(md).not.toContain("operating system's fonts"); + }); +}); + +describe("directCrates", () => { + it("reads the dependency tables only — normal, build and per-target", () => { + const toml = [ + "[package]", + 'name = "app"', + 'version = "1.0.0"', + "", + "[build-dependencies]", + 'tauri-build = { version = "2" }', + "", + "[dependencies]", + 'serde = { version = "1", features = ["derive"] }', + 'tauri = "2"', + "", + `[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]`, + 'tauri-plugin-single-instance = "2"', + "", + "[dev-dependencies]", + 'tempfile = "3"', + ].join("\r\n"); + expect(directCrates(toml)).toEqual([ + "serde", + "tauri", + "tauri-build", + "tauri-plugin-single-instance", + ]); + }); });