mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-07-03 11:22:14 -04:00
Merge branch 'develop'
Some checks are pending
Backend tests / Linux without plugins (push) Waiting to run
Backend tests / Linux with Plugins (push) Waiting to run
Backend tests / Windows without plugins (push) Waiting to run
Backend tests / Windows with Plugins (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Frontend admin tests powered by Sauce Labs / with plugins (push) Waiting to run
Frontend tests powered by Sauce Labs / Playwright Chrome (push) Waiting to run
Frontend tests powered by Sauce Labs / Playwright Firefox (push) Waiting to run
Frontend tests powered by Sauce Labs / Playwright Webkit (push) Waiting to run
Loadtest / without plugins (push) Waiting to run
Loadtest / with Plugins (push) Waiting to run
Loadtest / long running (push) Waiting to run
Perform type checks / perform type check (push) Waiting to run
rate limit / test (push) Waiting to run
Upgrade from latest release / Linux with Plugins (push) Waiting to run
Windows Build / Build .zip (push) Waiting to run
Some checks are pending
Backend tests / Linux without plugins (push) Waiting to run
Backend tests / Linux with Plugins (push) Waiting to run
Backend tests / Windows without plugins (push) Waiting to run
Backend tests / Windows with Plugins (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Frontend admin tests powered by Sauce Labs / with plugins (push) Waiting to run
Frontend tests powered by Sauce Labs / Playwright Chrome (push) Waiting to run
Frontend tests powered by Sauce Labs / Playwright Firefox (push) Waiting to run
Frontend tests powered by Sauce Labs / Playwright Webkit (push) Waiting to run
Loadtest / without plugins (push) Waiting to run
Loadtest / with Plugins (push) Waiting to run
Loadtest / long running (push) Waiting to run
Perform type checks / perform type check (push) Waiting to run
rate limit / test (push) Waiting to run
Upgrade from latest release / Linux with Plugins (push) Waiting to run
Windows Build / Build .zip (push) Waiting to run
This commit is contained in:
commit
89e8158616
24 changed files with 1634 additions and 1313 deletions
4
.github/workflows/backend-tests.yml
vendored
4
.github/workflows/backend-tests.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: [18, 20, 22]
|
||||
node: [20, 22, 23]
|
||||
steps:
|
||||
-
|
||||
name: Checkout repository
|
||||
|
@ -84,7 +84,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: [18, 20, 22]
|
||||
node: [20, 22, 23]
|
||||
steps:
|
||||
-
|
||||
name: Checkout repository
|
||||
|
|
31
.github/workflows/docker.yml
vendored
31
.github/workflows/docker.yml
vendored
|
@ -22,6 +22,9 @@ jobs:
|
|||
-
|
||||
name: Check out
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: etherpad
|
||||
|
||||
-
|
||||
name: Set up QEMU
|
||||
if: github.event_name == 'push'
|
||||
|
@ -33,7 +36,7 @@ jobs:
|
|||
name: Build and export to Docker
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
context: ./etherpad
|
||||
target: production
|
||||
load: true
|
||||
tags: ${{ env.TEST_TAG }}
|
||||
|
@ -62,6 +65,7 @@ jobs:
|
|||
${{ runner.os }}-pnpm-store-
|
||||
-
|
||||
name: Test
|
||||
working-directory: etherpad
|
||||
run: |
|
||||
docker run --rm -d -p 9001:9001 --name test ${{ env.TEST_TAG }}
|
||||
./bin/installDeps.sh
|
||||
|
@ -98,10 +102,11 @@ jobs:
|
|||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
id: build-docker
|
||||
if: github.event_name == 'push'
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
context: ./etherpad
|
||||
target: production
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
|
@ -111,7 +116,29 @@ jobs:
|
|||
uses: peter-evans/dockerhub-description@v4
|
||||
if: github.ref == 'refs/heads/master'
|
||||
with:
|
||||
readme-filepath: ./etherpad/README.md
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
repository: etherpad/etherpad
|
||||
enable-url-completion: true
|
||||
- name: Check out
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: ether-charts
|
||||
repository: ether/ether-charts
|
||||
token: ${{ secrets.ETHER_CHART_TOKEN }}
|
||||
- name: Update tag in values-dev.yaml
|
||||
if: success() && github.ref == 'refs/heads/develop'
|
||||
working-directory: ether-charts
|
||||
run: |
|
||||
sed -i 's/tag: ".*"/tag: "${{ steps.build-docker.outputs.digest }}"/' values-dev.yaml
|
||||
- name: Commit and push changes
|
||||
working-directory: ether-charts
|
||||
if: success() && github.ref == 'refs/heads/develop'
|
||||
run: |
|
||||
git config --global user.name 'github-actions[bot]'
|
||||
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
git add values-dev.yaml
|
||||
git commit -m 'Update develop image tag'
|
||||
git push
|
||||
|
|
2
.github/workflows/frontend-admin-tests.yml
vendored
2
.github/workflows/frontend-admin-tests.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: [20, 22]
|
||||
node: [20, 22, 23]
|
||||
|
||||
steps:
|
||||
-
|
||||
|
|
|
@ -24,7 +24,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node: [18, 20, 22]
|
||||
node: [20, 22, 23]
|
||||
steps:
|
||||
-
|
||||
name: Check out latest release
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# 2.3.1
|
||||
|
||||
### Notable enhancements and fixes
|
||||
|
||||
- Dependency updates
|
||||
|
||||
# 2.3.0
|
||||
|
||||
### Notable enhancements and fixes
|
||||
|
|
|
@ -90,7 +90,7 @@ services:
|
|||
# ports:
|
||||
# - "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data/pgdata
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
@ -189,7 +189,7 @@ git -P tag --list "v*" --merged
|
|||
```
|
||||
4. Select the version
|
||||
```sh
|
||||
git checkout v2.2.5
|
||||
git checkout v2.2.5
|
||||
git switch -c v2.2.5
|
||||
```
|
||||
5. Upgrade Etherpad
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "admin",
|
||||
"private": true,
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
@ -11,32 +11,32 @@
|
|||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-switch": "^1.1.3"
|
||||
"@radix-ui/react-switch": "^1.2.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@radix-ui/react-dialog": "^1.1.6",
|
||||
"@radix-ui/react-toast": "^1.2.6",
|
||||
"@types/react": "^19.0.12",
|
||||
"@types/react-dom": "^19.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
||||
"@typescript-eslint/parser": "^8.28.0",
|
||||
"@vitejs/plugin-react-swc": "^3.8.1",
|
||||
"eslint": "^9.23.0",
|
||||
"@radix-ui/react-dialog": "^1.1.14",
|
||||
"@radix-ui/react-toast": "^1.2.14",
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"@typescript-eslint/eslint-plugin": "^8.34.0",
|
||||
"@typescript-eslint/parser": "^8.34.0",
|
||||
"@vitejs/plugin-react-swc": "^3.10.2",
|
||||
"eslint": "^9.28.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.19",
|
||||
"i18next": "^24.2.3",
|
||||
"i18next-browser-languagedetector": "^8.0.4",
|
||||
"lucide-react": "^0.487.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.20",
|
||||
"i18next": "^25.2.1",
|
||||
"i18next-browser-languagedetector": "^8.2.0",
|
||||
"lucide-react": "^0.515.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-hook-form": "^7.55.0",
|
||||
"react-i18next": "^15.4.1",
|
||||
"react-router-dom": "^7.4.1",
|
||||
"react-hook-form": "^7.57.0",
|
||||
"react-i18next": "^15.5.3",
|
||||
"react-router-dom": "^7.6.2",
|
||||
"socket.io-client": "^4.8.1",
|
||||
"typescript": "^5.8.2",
|
||||
"vite": "^6.2.5",
|
||||
"vite-plugin-static-copy": "^2.3.0",
|
||||
"vite": "^6.3.5",
|
||||
"vite-plugin-static-copy": "^3.0.0",
|
||||
"vite-plugin-svgr": "^4.3.0",
|
||||
"zustand": "^5.0.3"
|
||||
"zustand": "^5.0.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bin",
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"description": "",
|
||||
"main": "checkAllPads.js",
|
||||
"directories": {
|
||||
|
@ -10,12 +10,12 @@
|
|||
"axios": "^1.8.4",
|
||||
"ep_etherpad-lite": "workspace:../src",
|
||||
"log4js": "^6.9.1",
|
||||
"semver": "^7.7.1",
|
||||
"tsx": "^4.19.3",
|
||||
"ueberdb2": "^5.0.6"
|
||||
"semver": "^7.7.2",
|
||||
"tsx": "^4.20.3",
|
||||
"ueberdb2": "^5.0.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.13.14",
|
||||
"@types/node": "^24.0.1",
|
||||
"@types/semver": "^7.7.0",
|
||||
"typescript": "^5.8.2"
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Changeset Library
|
||||
|
||||
The [changeset
|
||||
library](https://github.com/ether/etherpad-lite/blob/develop/src/static/js/Changeset.js)
|
||||
library](https://github.com/ether/etherpad-lite/blob/develop/src/static/js/Changeset.ts)
|
||||
provides tools to create, read, and apply changesets.
|
||||
|
||||
## Changeset
|
||||
|
|
|
@ -50,6 +50,6 @@
|
|||
"type": "git",
|
||||
"url": "https://github.com/ether/etherpad-lite.git"
|
||||
},
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"license": "Apache-2.0"
|
||||
}
|
||||
|
|
2674
pnpm-lock.yaml
generated
2674
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
@ -96,7 +96,7 @@
|
|||
* 3) if you want to use newlines in the default value of a string parameter,
|
||||
* use "\n" as usual.
|
||||
*
|
||||
* "defaultPadText" : "${DEFAULT_PAD_TEXT}Line 1\nLine 2"
|
||||
* "defaultPadText" : "${DEFAULT_PAD_TEXT:Line 1\nLine 2}"
|
||||
*/
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
* 3) if you want to use newlines in the default value of a string parameter,
|
||||
* use "\n" as usual.
|
||||
*
|
||||
* "defaultPadText" : "${DEFAULT_PAD_TEXT}Line 1\nLine 2"
|
||||
* "defaultPadText" : "${DEFAULT_PAD_TEXT:Line 1\nLine 2}"
|
||||
*/
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
"Mormegil",
|
||||
"Peldrjan",
|
||||
"Quinn",
|
||||
"Spotter"
|
||||
"Spotter",
|
||||
"The astrea"
|
||||
]
|
||||
},
|
||||
"admin.page-title": "Ovládací panel Správce - Etherpad",
|
||||
|
@ -82,6 +83,8 @@
|
|||
"pad.settings.fontType": "Typ písma:",
|
||||
"pad.settings.fontType.normal": "Normální",
|
||||
"pad.settings.language": "Jazyk:",
|
||||
"pad.settings.deletePad": "Smazat pad",
|
||||
"pad.delete.confirm": "Opravdu chcete tento pad smazat?",
|
||||
"pad.settings.about": "O projektu",
|
||||
"pad.settings.poweredBy": "Běží na",
|
||||
"pad.importExport.import_export": "Import/Export",
|
||||
|
|
61
src/locales/ln.json
Normal file
61
src/locales/ln.json
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"@metadata": {
|
||||
"authors": [
|
||||
"BOKOBA VEROLY"
|
||||
]
|
||||
},
|
||||
"admin.page-title": "Admin Dashboard - Etherpad",
|
||||
"admin_plugins": "Mokambi ya plug-in",
|
||||
"admin_plugins.available": "Ba plugins oyo ezali",
|
||||
"admin_plugins.available_not-found": "Ba plugins ezwamaki te.",
|
||||
"admin_plugins.available_fetching": "Kozwa...",
|
||||
"admin_plugins.available_install.value": "Kotya",
|
||||
"admin_plugins.available_search.placeholder": "Bolukiluki ya ba plugins mpo na kotya",
|
||||
"admin_plugins.description": "Ndimbola",
|
||||
"admin_plugins.installed": "Ba plugins oyo etyamaki",
|
||||
"admin_plugins.installed_fetching": "Kozwa ba plugins oyo etyamaki...",
|
||||
"admin_plugins.installed_nothing": "Otikaki naino ba plugins te.",
|
||||
"admin_plugins.installed_uninstall.value": "Kofungola esika",
|
||||
"admin_plugins.last-update": "Makambo ya sika ya suka",
|
||||
"admin_plugins.name": "Nkombo na yango",
|
||||
"admin_plugins.page-title": "Gestionnaire de greffons — Etherpad",
|
||||
"admin_plugins.version": "Libongoli",
|
||||
"admin_plugins_info": "Informations de résolution de problème",
|
||||
"admin_plugins_info.hooks": "Crochets installés",
|
||||
"admin_plugins_info.hooks_client": "Crochets côté client",
|
||||
"admin_plugins_info.hooks_server": "Crochets côté serveur",
|
||||
"admin_plugins_info.parts": "Biteni oyo batye",
|
||||
"admin_plugins_info.plugins": "Ba plugins oyo etyamaki",
|
||||
"admin_plugins_info.page-title": "Makambo etali ordinatɛrɛ - Etherpad",
|
||||
"admin_plugins_info.version": "Libongoli ya Etherpad",
|
||||
"admin_plugins_info.version_latest": "Libongoli ya sika",
|
||||
"admin_plugins_info.version_number": "Numero ya version",
|
||||
"admin_settings": "Ndenge ya kobongisa yango",
|
||||
"admin_settings.current": "Configuration ya lelo",
|
||||
"admin_settings.current_example-devel": "Ndakisa modèle ya paramètres ya développement",
|
||||
"admin_settings.current_example-prod": "Ndakisa modèle ya paramètres ya production",
|
||||
"admin_settings.current_restart.value": "Bobandi lisusu Etherpad",
|
||||
"admin_settings.current_save.value": "Bomba ba Paramètres",
|
||||
"admin_settings.page-title": "Paramètres - Etherpad ya kosala",
|
||||
"index.newPad": "Pad ya sika",
|
||||
"index.createOpenPad": "to kosala/kofungola Pad na nkombo:",
|
||||
"index.openPad": "kofungola Pad oyo ezali na nkombo:",
|
||||
"pad.toolbar.bold.title": "Makomi ya moindo makasi (Ctrl+B)",
|
||||
"pad.toolbar.underline.title": "Mokanda ya nse (Ctrl+U)",
|
||||
"pad.toolbar.strikethrough.title": "Strikethrough (Ctrl+5)",
|
||||
"pad.toolbar.ol.title": "Liste oyo esɛngami (Ctrl+Shift+N)",
|
||||
"pad.toolbar.ul.title": "Liste oyo etyami na molongo te (Ctrl+Shift+L)",
|
||||
"pad.toolbar.indent.title": "Indent (TAB)",
|
||||
"pad.toolbar.unindent.title": "Mikuwa ya libándá (Shift+TAB)",
|
||||
"pad.toolbar.undo.title": "Undo (Ctrl+Z)",
|
||||
"pad.toolbar.redo.title": "Redo (Ctrl+Y)",
|
||||
"pad.toolbar.clearAuthorship.title": "Langi ya polele ya mokomi (Ctrl+Shift+C)",
|
||||
"pad.toolbar.import_export.title": "Kokotisa/kobimisa na/na ba formats ya ba fichiers ndenge na ndenge",
|
||||
"pad.toolbar.timeslider.title": "Mokambi ya ntango",
|
||||
"pad.toolbar.savedRevision.title": "Kobomba lisusu",
|
||||
"pad.toolbar.settings.title": "Ndenge ya kobongisa yango",
|
||||
"pad.toolbar.embed.title": "Kopesa mpe kobakisa yango",
|
||||
"pad.toolbar.showusers.title": "Tyá bato oyo basalelaka yango",
|
||||
"pad.colorpicker.save": "Kobikisa",
|
||||
"pad.colorpicker.cancel": "Kolongola"
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"@metadata": {
|
||||
"authors": [
|
||||
"Aca",
|
||||
"Acamicamacaraca",
|
||||
"Aktron",
|
||||
"BadDog",
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"Grkn gll",
|
||||
"Hedda",
|
||||
"Joseph",
|
||||
"Leo",
|
||||
"McAang",
|
||||
"Meelo",
|
||||
"MuratTheTurkish",
|
||||
|
@ -82,6 +83,8 @@
|
|||
"pad.settings.fontType": "Yazı tipi:",
|
||||
"pad.settings.fontType.normal": "Olağan",
|
||||
"pad.settings.language": "Dil:",
|
||||
"pad.settings.deletePad": "Silme Defteri",
|
||||
"pad.delete.confirm": "Bu defteri gerçekten silmek istiyor musunuz?",
|
||||
"pad.settings.about": "Hakkında",
|
||||
"pad.settings.poweredBy": "Destekleyen:",
|
||||
"pad.importExport.import_export": "İçe/Dışa aktar",
|
||||
|
|
|
@ -27,6 +27,12 @@ exports.expressCreateServer = (hookName: string, args: ArgsExpressType, cb: Func
|
|||
const parsedUrl = url.parse(req.url);
|
||||
// extract URL path
|
||||
let pathname = ADMIN_PATH + `${parsedUrl.pathname}`;
|
||||
pathname = path.normalize(path.join(ADMIN_PATH), parsedUrl.pathname)
|
||||
|
||||
if (!pathname.startsWith(ADMIN_PATH)) {
|
||||
res.statusCode = 403;
|
||||
return res.end("Forbidden");
|
||||
}
|
||||
// based on the URL path, extract the file extension. e.g. .js, .doc, ...
|
||||
let ext = path.parse(pathname).ext;
|
||||
// maps file extension to MIME typere
|
||||
|
|
|
@ -5,9 +5,10 @@ import {ErrorCaused} from "../../types/ErrorCaused";
|
|||
import {QueryType} from "../../types/QueryType";
|
||||
|
||||
import {getAvailablePlugins, install, search, uninstall} from "../../../static/js/pluginfw/installer";
|
||||
import {PackageData} from "../../types/PackageInfo";
|
||||
import {PackageData, PackageInfo} from "../../types/PackageInfo";
|
||||
import semver from 'semver';
|
||||
import log4js from 'log4js';
|
||||
import {MapArrayType} from "../../types/MapType";
|
||||
|
||||
const pluginDefs = require('../../../static/js/pluginfw/plugin_defs');
|
||||
const logger = log4js.getLogger('adminPlugins');
|
||||
|
@ -21,7 +22,13 @@ exports.socketio = (hookName:string, args:ArgsExpressType, cb:Function) => {
|
|||
if (!isAdmin) return;
|
||||
|
||||
const checkPluginForUpdates = async () => {
|
||||
const results = await getAvailablePlugins(/* maxCacheAge:*/ 60 * 10);
|
||||
let results: MapArrayType<PackageInfo>
|
||||
try {
|
||||
results = await getAvailablePlugins(/* maxCacheAge:*/ 60 * 10);
|
||||
} catch (error) {
|
||||
console.error('Error checking for plugin updates:', error);
|
||||
return [];
|
||||
}
|
||||
return Object.keys(pluginDefs.plugins).filter((plugin) => {
|
||||
if (!results[plugin]) return false;
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ exports.authnFailureDelayMs = 1000;
|
|||
|
||||
const staticResources = [
|
||||
/^\/padbootstrap-[a-zA-Z0-9]+\.min\.js$/,
|
||||
/^\/timeSliderBootstrap-[a-zA-Z0-9]+\.min\.js$/,
|
||||
/^\/manifest.json$/
|
||||
]
|
||||
|
||||
|
|
|
@ -42,6 +42,10 @@ if (settings.dumpOnUncleanExit) {
|
|||
const addProxyToAxios = (url: URL) => {
|
||||
axios.defaults.proxy = {
|
||||
host: url.hostname,
|
||||
auth: {
|
||||
username: url.username,
|
||||
password: url.password,
|
||||
},
|
||||
port: Number(url.port),
|
||||
protocol: url.protocol,
|
||||
}
|
||||
|
|
|
@ -37,43 +37,43 @@
|
|||
"cross-env": "^7.0.3",
|
||||
"cross-spawn": "^7.0.6",
|
||||
"ejs": "^3.1.10",
|
||||
"esbuild": "^0.25.2",
|
||||
"esbuild": "^0.25.5",
|
||||
"express": "4.21.2",
|
||||
"express-rate-limit": "^7.5.0",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"find-root": "1.1.0",
|
||||
"formidable": "^3.5.2",
|
||||
"formidable": "^3.5.4",
|
||||
"http-errors": "^2.0.0",
|
||||
"jose": "^5.10.0",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jsdom": "^26.0.0",
|
||||
"jsonminify": "0.4.2",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"languages4translatewiki": "0.1.3",
|
||||
"live-plugin-manager": "^1.0.0",
|
||||
"live-plugin-manager": "^1.1.0",
|
||||
"lodash.clonedeep": "4.5.0",
|
||||
"log4js": "^6.9.1",
|
||||
"lru-cache": "^11.1.0",
|
||||
"measured-core": "^2.0.0",
|
||||
"mime-types": "^3.0.1",
|
||||
"oidc-provider": "^8.8.1",
|
||||
"openapi-backend": "^5.11.1",
|
||||
"oidc-provider": "^9.1.3",
|
||||
"openapi-backend": "^5.12.0",
|
||||
"proxy-addr": "^2.0.7",
|
||||
"rate-limiter-flexible": "^6.2.1",
|
||||
"rate-limiter-flexible": "^7.1.1",
|
||||
"rehype": "^13.0.2",
|
||||
"rehype-minify-whitespace": "^6.0.2",
|
||||
"resolve": "1.22.10",
|
||||
"rusty-store-kv": "^1.3.1",
|
||||
"security": "1.0.0",
|
||||
"semver": "^7.7.1",
|
||||
"semver": "^7.7.2",
|
||||
"socket.io": "^4.8.1",
|
||||
"socket.io-client": "^4.8.1",
|
||||
"superagent": "10.2.0",
|
||||
"superagent": "10.2.1",
|
||||
"swagger-ui-express": "^5.0.1",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"tinycon": "0.6.8",
|
||||
"tsx": "4.19.3",
|
||||
"ueberdb2": "^5.0.6",
|
||||
"tsx": "4.20.3",
|
||||
"ueberdb2": "^5.0.14",
|
||||
"underscore": "1.13.7",
|
||||
"unorm": "1.6.0",
|
||||
"wtfnode": "^0.10.0"
|
||||
|
@ -83,19 +83,19 @@
|
|||
"etherpad-lite": "node/server.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.51.1",
|
||||
"@playwright/test": "^1.53.0",
|
||||
"@types/async": "^3.2.24",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/formidable": "^3.4.5",
|
||||
"@types/http-errors": "^2.0.4",
|
||||
"@types/http-errors": "^2.0.5",
|
||||
"@types/jquery": "^3.5.32",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/jsonwebtoken": "^9.0.9",
|
||||
"@types/mime-types": "^2.1.4",
|
||||
"@types/mime-types": "^3.0.1",
|
||||
"@types/mocha": "^10.0.9",
|
||||
"@types/node": "^22.13.14",
|
||||
"@types/oidc-provider": "^8.8.1",
|
||||
"@types/node": "^24.0.1",
|
||||
"@types/oidc-provider": "^9.1.0",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@types/sinon": "^17.0.3",
|
||||
"@types/supertest": "^6.0.2",
|
||||
|
@ -103,19 +103,19 @@
|
|||
"@types/underscore": "^1.13.0",
|
||||
"@types/whatwg-mimetype": "^3.0.2",
|
||||
"chokidar": "^4.0.3",
|
||||
"eslint": "^9.23.0",
|
||||
"eslint": "^9.28.0",
|
||||
"eslint-config-etherpad": "^4.0.4",
|
||||
"etherpad-cli-client": "^3.0.2",
|
||||
"mocha": "^11.1.0",
|
||||
"mocha": "^11.6.0",
|
||||
"mocha-froth": "^0.2.10",
|
||||
"nodeify": "^1.0.1",
|
||||
"openapi-schema-validation": "^0.4.2",
|
||||
"set-cookie-parser": "^2.7.1",
|
||||
"sinon": "^20.0.0",
|
||||
"sinon": "^21.0.0",
|
||||
"split-grid": "^1.0.11",
|
||||
"supertest": "^7.1.0",
|
||||
"supertest": "^7.1.1",
|
||||
"typescript": "^5.8.2",
|
||||
"vitest": "^3.1.1"
|
||||
"vitest": "^3.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.18.2",
|
||||
|
@ -142,6 +142,6 @@
|
|||
"debug:socketio": "cross-env DEBUG=socket.io* node --require tsx/cjs node/server.ts",
|
||||
"test:vitest": "vitest"
|
||||
},
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"license": "Apache-2.0"
|
||||
}
|
||||
|
|
|
@ -162,23 +162,18 @@ export const install = async (pluginName: string, cb:Function|null = null) => {
|
|||
export let availablePlugins:MapArrayType<PackageInfo>|null = null;
|
||||
let cacheTimestamp = 0;
|
||||
|
||||
export const getAvailablePlugins = (maxCacheAge: number|false) => {
|
||||
export const getAvailablePlugins = async (maxCacheAge: number | false) => {
|
||||
const nowTimestamp = Math.round(Date.now() / 1000);
|
||||
|
||||
return new Promise<MapArrayType<PackageInfo>>(async (resolve, reject) => {
|
||||
// check cache age before making any request
|
||||
if (availablePlugins && maxCacheAge && (nowTimestamp - cacheTimestamp) <= maxCacheAge) {
|
||||
return resolve(availablePlugins);
|
||||
}
|
||||
// check cache age before making any request
|
||||
if (availablePlugins && maxCacheAge && (nowTimestamp - cacheTimestamp) <= maxCacheAge) {
|
||||
return availablePlugins;
|
||||
}
|
||||
|
||||
await axios.get(`${settings.updateServer}/plugins.json`, {headers})
|
||||
.then((pluginsLoaded:AxiosResponse<MapArrayType<PackageInfo>>) => {
|
||||
availablePlugins = pluginsLoaded.data;
|
||||
cacheTimestamp = nowTimestamp;
|
||||
resolve(availablePlugins);
|
||||
})
|
||||
.catch(async (err) => reject(err));
|
||||
});
|
||||
const pluginsLoaded: AxiosResponse<MapArrayType<PackageInfo>> = await axios.get(`${settings.updateServer}/plugins.json`, {headers})
|
||||
availablePlugins = pluginsLoaded.data;
|
||||
cacheTimestamp = nowTimestamp;
|
||||
return availablePlugins;
|
||||
};
|
||||
|
||||
|
||||
|
@ -211,4 +206,7 @@ export const search = (searchTerm: string, maxCacheAge: number) => getAvailableP
|
|||
|
||||
return res;
|
||||
}
|
||||
);
|
||||
).catch((err)=>{
|
||||
logger.error(`Error searching plugins: ${err}`);
|
||||
return {} as MapArrayType<PackageInfo>;
|
||||
});
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
"devDependencies": {
|
||||
"ep_etherpad-lite": "workspace:../src",
|
||||
"typescript": "^5.8.2",
|
||||
"vite": "^6.2.5"
|
||||
"vite": "^6.3.5"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue