etherpad-lite/bin
John McLear 278acb10cb
Drop swagger-ui, document telemetry, add opt-outs (#7524) (#7757)
* docs: design spec for #7524 drop swagger-ui + privacy opt-outs

Three-deliverable plan: vendor RapiDoc to replace swagger-ui-express
(Scarf-injecting), add privacy.updateCheck and privacy.pluginCatalog
opt-outs for our two outbound calls, and ship PRIVACY.md as a public
stance doc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: implementation plan for #7524 swagger-ui + privacy opt-outs

Twelve TDD-flavoured tasks: privacy settings shape, UpdateCheck +
installer opt-outs (each with a failing-test-first cycle), admin
backend/UI plumbing, dependency drop, vendored RapiDoc, PRIVACY.md,
final verification matrix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(privacy): add privacy block to settings shape

Adds privacy.updateCheck and privacy.pluginCatalog, both defaulting to
true so behavior is unchanged until operators opt out.

Refs #7524

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(privacy): honour privacy.updateCheck=false in UpdateCheck

check() and getLatestVersion() now early-return when the setting is
off. Logs once on first skip. The admin "update available" panel
already tolerates an undefined latestVersion.

Refs #7524

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(privacy): honour privacy.pluginCatalog=false in installer

Extracts the gate into pluginCatalogGuard.ts so it can be unit-tested
under vitest without dragging in the CJS require() chain from
installer.ts. getAvailablePlugins() now throws the tagged disabled
error before any fetch.

Refs #7524

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(privacy): emit results:catalogDisabled when pluginCatalog off

Short-circuits the four catalog-driven socket events. The install/
uninstall events are untouched so operators can still install by
plugin name even when the catalog is disabled.

Refs #7524

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(bin): stalePlugins reads updateServer and honours privacy flag

Was hardcoding static.etherpad.org and ignoring opt-out. Now exits 0
cleanly when privacy.pluginCatalog=false.

Refs #7524

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(settings): document privacy block in settings template

Refs #7524

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(api-docs): replace swagger-ui-express with RapiDoc shell

Drops the swagger-ui-express dep (third-party Scarf telemetry pixel,
see swagger-api/swagger-ui#10573) and serves /api-docs with a static
HTML shell that mounts <rapi-doc>. /api-docs.json is unchanged.

The vendored RapiDoc asset is added in the next commit so the tree is
broken for one diff hunk — pair this with the rapidoc-min.js commit
during review.

Refs #7524

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(api-docs): vendor RapiDoc 9.3.4 (MIT) as static asset

Pinned bundle with checksum in VERSION. Replaces swagger-ui-dist which
shipped a Scarf telemetry pixel.

Disables RapiDoc's bundled Google Fonts request via load-fonts="false"
plus explicit regular-font/mono-font system stacks — RapiDoc's CSS
@font-face rules would otherwise fetch Open Sans from fonts.gstatic.com
at render time.

Also fixes the /api-docs route's res.sendFile to use an absolute path
resolved via settings.root (the previous {root: 'src/static'} was
resolved from CWD which is already src/, producing src/src/static).

Refs #7524

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(admin): banner when plugin catalog is disabled

Subscribes to results:catalogDisabled and renders a localized info
banner on the plugins page. install/uninstall still function via CLI.

Refs #7524

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: PRIVACY.md and README/CHANGELOG pointers

Publishes Etherpad's stance on telemetry: two documented, opt-out
outbound calls; no third-party analytics; no install-time phone-homes
in our deps.

Refs #7524

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(admin): await checkPluginForUpdates and emit array on error

Qodo flagged that checkUpdates emitted the unresolved Promise (missing
await) and emitted {} for updatable on the error path, both breaking
the admin UI's expected string[] shape. Pre-existing bug surfaced when
the surrounding block was edited for the privacy.pluginCatalog gate.

Refs #7524

* feat(api-docs): swap RapiDoc for Scalar (actively maintained)

Per @SamTV12345's review on #7757: RapiDoc has been effectively
unmaintained for a while. Scalar (https://github.com/scalar/scalar)
is MIT-licensed, actively developed, and ships a self-contained
standalone bundle that works the same way for our purposes.

Privacy posture is preserved by configuring the embed:
  - withDefaultFonts: false   (no fonts.scalar.com woff2 fetch)
  - telemetry: false          (defensive)
  - agent.disabled: true      (no api.scalar.com/vector/* calls)
  - mcp.disabled:   true      (no MCP integration)
  - showDeveloperTools: 'never'
  - hideClientButton: true

Verified with headless Chromium: page loads /api-docs, mounts Scalar,
renders the Etherpad OpenAPI document, and makes zero requests to
any host other than localhost.

Vendor:
  - src/static/vendor/scalar/standalone.js     (@scalar/api-reference 1.57.2)
  - src/static/vendor/scalar/VERSION           (sha256 pinned)
  - src/static/vendor/scalar/LICENSE           (MIT)
Removed:
  - src/static/vendor/rapidoc/*

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 18:34:22 +01:00
..
deb-src cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
nsis cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
plugins Drop swagger-ui, document telemetry, add opt-outs (#7524) (#7757) 2026-05-16 18:34:22 +01:00
buildDebian.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
buildForWindows.sh chore: updated node to supported 22,24,25 (#7628) 2026-04-28 22:45:28 +02:00
checkAllPads.ts Fixed bin scripts. 2024-08-08 21:23:10 +02:00
checkPad.ts Fixed checkPad script not returning 2024-07-12 08:34:53 +02:00
cleanRun.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
commonPlugins.ts fix(plugins): updatePlugins.sh actually updates installed plugins (closes #6670) (#7644) 2026-05-02 07:22:25 +01:00
compactAllPads.ts chore: removed axios (#7685) 2026-05-06 22:06:04 +02:00
compactPad.ts chore: removed axios (#7685) 2026-05-06 22:06:04 +02:00
compactStalePads.ts feat(7642): bin/compactStalePads — staleness-gated bulk compaction (#7708) 2026-05-10 22:41:52 +02:00
convertSettings.json.template cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
createRelease.sh chore: Rename some occurences of etherpad-lite to etherpad (#7552) 2026-04-19 16:53:57 +02:00
createUserSession.ts chore: removed axios (#7685) 2026-05-06 22:06:04 +02:00
debugRun.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
deleteAllGroupSessions.ts chore: removed axios (#7685) 2026-05-06 22:06:04 +02:00
deletePad.ts chore: removed axios (#7685) 2026-05-06 22:06:04 +02:00
extractPadData.ts Fixed bin scripts. 2024-08-08 21:23:10 +02:00
fastRun.sh chore: fixed fastRun.sh script (#7063) 2025-08-05 18:24:19 +02:00
functions.sh Roll Node.js floor back to >= 24 (Active LTS) — closes #7779 (#7781) 2026-05-16 13:07:59 +01:00
generateReleaseNotes.ts chore: fixed generatereleasenotes to respect filename 2025-11-05 22:14:58 +01:00
importSqlFile.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
installDeps.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
installer.ps1 Roll Node.js floor back to >= 24 (Active LTS) — closes #7779 (#7781) 2026-05-16 13:07:59 +01:00
installer.sh Roll Node.js floor back to >= 24 (Active LTS) — closes #7779 (#7781) 2026-05-16 13:07:59 +01:00
installLocalPlugins.sh Fix installation of local plugins 2025-04-05 15:31:36 +02:00
make_docs.ts Enforce 2-space indentation across codebase (#7426) 2026-04-01 19:48:45 +01:00
migrateDB.ts chore: adapted documentation for migrateDB.ts (#7088) 2025-08-24 20:50:16 +02:00
migrateDirtyDBtoRealDB.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
package.json build(deps): bump tsx from 4.21.0 to 4.22.0 (#7745) 2026-05-15 12:32:27 +01:00
plugins.ts fix(plugins): updatePlugins.sh actually updates installed plugins (closes #6670) (#7644) 2026-05-02 07:22:25 +01:00
push-after-release.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
rebuildPad.ts chore: migrated settings to esm6 (#7062) 2025-08-04 22:42:50 +02:00
release.ts chore: use jq for version replacement [skip ci] 2026-05-06 23:40:23 +02:00
repairPad.ts Fixed bin scripts. 2024-08-08 21:23:10 +02:00
run-frontend-tests-with-disables.sh fix(test): disables helper auto-detect must follow symlinks (#7654) 2026-05-02 19:25:16 +08:00
run.sh Feat/bundle js (#6511) 2024-07-18 08:51:30 +02:00
safeRun.sh cleanup after workspace refactoring (#6174) 2024-02-21 21:50:11 +01:00
setup-trusted-publishers.sh fix: setup-trusted-publishers.sh works with real npm trust CLI (#7491) 2026-04-08 10:56:13 +01:00
tsconfig.json Removed deprecated js files. 2024-08-18 19:22:08 +02:00
updatePlugins.sh fix(plugins): updatePlugins.sh actually updates installed plugins (closes #6670) (#7644) 2026-05-02 07:22:25 +01:00