Compare commits

..

2 commits

Author SHA1 Message Date
SamTV12345
3a9e126866 Merge branch 'develop'
Some checks failed
Backend tests / Linux without plugins (push) Has been cancelled
Backend tests / Linux with Plugins (push) Has been cancelled
Backend tests / Windows without plugins (push) Has been cancelled
Backend tests / Windows with Plugins (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Frontend admin tests powered by Sauce Labs / with plugins (push) Has been cancelled
Frontend tests powered by Sauce Labs / Playwright Chrome (push) Has been cancelled
Frontend tests powered by Sauce Labs / Playwright Firefox (push) Has been cancelled
Frontend tests powered by Sauce Labs / Playwright Webkit (push) Has been cancelled
Loadtest / without plugins (push) Has been cancelled
Loadtest / with Plugins (push) Has been cancelled
Loadtest / long running (push) Has been cancelled
Perform type checks / perform type check (push) Has been cancelled
rate limit / test (push) Has been cancelled
Upgrade from latest release / Linux with Plugins (push) Has been cancelled
Windows Build / Build .zip (push) Has been cancelled
2025-04-06 15:27:01 +02:00
SamTV12345
6a37a5c52a bump version 2025-04-06 15:27:00 +02:00
17 changed files with 538 additions and 643 deletions

View file

@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20, 22, 23]
node: [18, 20, 22]
steps:
-
name: Checkout repository
@ -84,7 +84,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20, 22, 23]
node: [18, 20, 22]
steps:
-
name: Checkout repository

View file

@ -22,9 +22,6 @@ jobs:
-
name: Check out
uses: actions/checkout@v4
with:
path: etherpad
-
name: Set up QEMU
if: github.event_name == 'push'
@ -36,7 +33,7 @@ jobs:
name: Build and export to Docker
uses: docker/build-push-action@v6
with:
context: ./etherpad
context: .
target: production
load: true
tags: ${{ env.TEST_TAG }}
@ -65,7 +62,6 @@ 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
@ -102,11 +98,10 @@ 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: ./etherpad
context: .
target: production
platforms: linux/amd64,linux/arm64
push: true
@ -116,28 +111,7 @@ 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
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

View file

@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20, 22, 23]
node: [20, 22]
steps:
-

View file

@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [20, 22, 23]
node: [18, 20, 22]
steps:
-
name: Check out latest release

View file

@ -90,7 +90,7 @@ services:
# ports:
# - "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- postgres_data:/var/lib/postgresql/data/pgdata
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

View file

@ -11,31 +11,31 @@
"preview": "vite preview"
},
"dependencies": {
"@radix-ui/react-switch": "^1.1.4"
"@radix-ui/react-switch": "^1.1.3"
},
"devDependencies": {
"@radix-ui/react-dialog": "^1.1.7",
"@radix-ui/react-toast": "^1.2.7",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@typescript-eslint/eslint-plugin": "^8.30.1",
"@typescript-eslint/parser": "^8.30.1",
"@vitejs/plugin-react-swc": "^3.9.0",
"@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",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.19",
"i18next": "^25.0.0",
"i18next-browser-languagedetector": "^8.0.5",
"lucide-react": "^0.501.0",
"i18next": "^24.2.3",
"i18next-browser-languagedetector": "^8.0.4",
"lucide-react": "^0.487.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.5.1",
"react-router-dom": "^7.4.1",
"socket.io-client": "^4.8.1",
"typescript": "^5.8.2",
"vite": "^6.3.2",
"vite-plugin-static-copy": "^2.3.1",
"vite": "^6.2.5",
"vite-plugin-static-copy": "^2.3.0",
"vite-plugin-svgr": "^4.3.0",
"zustand": "^5.0.3"
}

View file

@ -15,7 +15,7 @@
"ueberdb2": "^5.0.6"
},
"devDependencies": {
"@types/node": "^22.14.1",
"@types/node": "^22.13.14",
"@types/semver": "^7.7.0",
"typescript": "^5.8.2"
},

990
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -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"
*/
{
/*

View file

@ -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"
*/
{
/*

View file

@ -1,61 +0,0 @@
{
"@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"
}

View file

@ -5,10 +5,9 @@ import {ErrorCaused} from "../../types/ErrorCaused";
import {QueryType} from "../../types/QueryType";
import {getAvailablePlugins, install, search, uninstall} from "../../../static/js/pluginfw/installer";
import {PackageData, PackageInfo} from "../../types/PackageInfo";
import {PackageData} 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');
@ -22,13 +21,7 @@ exports.socketio = (hookName:string, args:ArgsExpressType, cb:Function) => {
if (!isAdmin) return;
const checkPluginForUpdates = async () => {
let results: MapArrayType<PackageInfo>
try {
results = await getAvailablePlugins(/* maxCacheAge:*/ 60 * 10);
} catch (error) {
console.error('Error checking for plugin updates:', error);
return [];
}
const results = await getAvailablePlugins(/* maxCacheAge:*/ 60 * 10);
return Object.keys(pluginDefs.plugins).filter((plugin) => {
if (!results[plugin]) return false;

View file

@ -51,7 +51,6 @@ exports.authnFailureDelayMs = 1000;
const staticResources = [
/^\/padbootstrap-[a-zA-Z0-9]+\.min\.js$/,
/^\/timeSliderBootstrap-[a-zA-Z0-9]+\.min\.js$/,
/^\/manifest.json$/
]

View file

@ -42,10 +42,6 @@ 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,
}

View file

@ -49,7 +49,6 @@
"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",
"lodash.clonedeep": "4.5.0",
@ -60,7 +59,7 @@
"oidc-provider": "^8.8.1",
"openapi-backend": "^5.11.1",
"proxy-addr": "^2.0.7",
"rate-limiter-flexible": "^7.0.0",
"rate-limiter-flexible": "^6.2.1",
"rehype": "^13.0.2",
"rehype-minify-whitespace": "^6.0.2",
"resolve": "1.22.10",
@ -71,6 +70,7 @@
"socket.io-client": "^4.8.1",
"superagent": "10.2.0",
"swagger-ui-express": "^5.0.1",
"jwt-decode": "^4.0.0",
"tinycon": "0.6.8",
"tsx": "4.19.3",
"ueberdb2": "^5.0.6",
@ -83,7 +83,7 @@
"etherpad-lite": "node/server.ts"
},
"devDependencies": {
"@playwright/test": "^1.52.0",
"@playwright/test": "^1.51.1",
"@types/async": "^3.2.24",
"@types/express": "^4.17.21",
"@types/formidable": "^3.4.5",
@ -94,7 +94,7 @@
"@types/jsonwebtoken": "^9.0.9",
"@types/mime-types": "^2.1.4",
"@types/mocha": "^10.0.9",
"@types/node": "^22.14.1",
"@types/node": "^22.13.14",
"@types/oidc-provider": "^8.8.1",
"@types/semver": "^7.7.0",
"@types/sinon": "^17.0.3",

View file

@ -162,18 +162,23 @@ export const install = async (pluginName: string, cb:Function|null = null) => {
export let availablePlugins:MapArrayType<PackageInfo>|null = null;
let cacheTimestamp = 0;
export const getAvailablePlugins = async (maxCacheAge: number | false) => {
export const getAvailablePlugins = (maxCacheAge: number|false) => {
const nowTimestamp = Math.round(Date.now() / 1000);
// check cache age before making any request
if (availablePlugins && maxCacheAge && (nowTimestamp - cacheTimestamp) <= maxCacheAge) {
return availablePlugins;
}
return new Promise<MapArrayType<PackageInfo>>(async (resolve, reject) => {
// check cache age before making any request
if (availablePlugins && maxCacheAge && (nowTimestamp - cacheTimestamp) <= maxCacheAge) {
return resolve(availablePlugins);
}
const pluginsLoaded: AxiosResponse<MapArrayType<PackageInfo>> = await axios.get(`${settings.updateServer}/plugins.json`, {headers})
availablePlugins = pluginsLoaded.data;
cacheTimestamp = nowTimestamp;
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));
});
};
@ -206,7 +211,4 @@ export const search = (searchTerm: string, maxCacheAge: number) => getAvailableP
return res;
}
).catch((err)=>{
logger.error(`Error searching plugins: ${err}`);
return {} as MapArrayType<PackageInfo>;
});
);

View file

@ -12,6 +12,6 @@
"devDependencies": {
"ep_etherpad-lite": "workspace:../src",
"typescript": "^5.8.2",
"vite": "^6.3.2"
"vite": "^6.2.5"
}
}