Skip to content

Commit a5f4d3e

Browse files
committed
Merge branch 'develop'
2 parents 4631e14 + 43d57e3 commit a5f4d3e

File tree

114 files changed

+8007
-1498
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+8007
-1498
lines changed

.github/dependabot.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ updates:
1010
schedule:
1111
interval: "daily"
1212
- package-ecosystem: "npm"
13-
directory: "/src"
13+
directory: "/"
1414
schedule:
1515
interval: "daily"
1616
versioning-strategy: "increase"
17+
open-pull-requests-limit: 30
18+
groups:
19+
dev-dependencies:
20+
dependency-type: "development"

.github/workflows/backend-tests.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: "Backend tests"
22

33
# any branch is useful for testing before a PR is submitted
4-
on: [push, pull_request]
4+
on:
5+
push:
6+
paths-ignore:
7+
- "doc/**"
8+
pull_request:
9+
paths-ignore:
10+
- "doc/**"
511

612
permissions:
713
contents: read
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Workflow for deploying static content to GitHub Pages
2+
name: Deploy Docs to GitHub Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["develop"]
8+
paths:
9+
- doc/** # Only run workflow when changes are made to the doc directory
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
packages: read
19+
20+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
22+
concurrency:
23+
group: "pages"
24+
cancel-in-progress: false
25+
26+
jobs:
27+
# Single deploy job since we're just deploying
28+
deploy:
29+
environment:
30+
name: github-pages
31+
url: ${{ steps.deployment.outputs.page_url }}
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v5
38+
- uses: pnpm/action-setup@v3
39+
name: Install pnpm
40+
with:
41+
version: 8
42+
run_install: false
43+
- name: Get pnpm store directory
44+
shell: bash
45+
run: |
46+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
47+
- uses: actions/cache@v4
48+
name: Setup pnpm cache
49+
with:
50+
path: ${{ env.STORE_PATH }}
51+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
52+
restore-keys: |
53+
${{ runner.os }}-pnpm-store-
54+
- name: Only install direct dependencies
55+
run: pnpm config set auto-install-peers false
56+
- name: Install dependencies
57+
run: pnpm install
58+
- name: Build app
59+
working-directory: doc
60+
run: pnpm run docs:build
61+
env:
62+
COMMIT_REF: ${{ github.sha }}
63+
- name: Upload artifact
64+
uses: actions/upload-pages-artifact@v3
65+
with:
66+
# Upload entire repository
67+
path: './doc/.vitepress/dist'
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v4

.github/workflows/codeql-analysis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
pull_request:
77
# The branches below must be a subset of the branches above
88
branches: [develop]
9+
paths-ignore:
10+
- 'doc/**'
911
schedule:
1012
- cron: '0 13 * * 1'
1113

.github/workflows/docker.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
name: Docker
22
on:
33
pull_request:
4+
paths-ignore:
5+
- 'doc/**'
46
push:
57
branches:
68
- 'develop'
9+
paths-ignore:
10+
- 'doc/**'
711
tags:
812
- 'v?[0-9]+.[0-9]+.[0-9]+'
913
env:

.github/workflows/frontend-admin-tests.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Leave the powered by Sauce Labs bit in as this means we get additional concurrency
22
name: "Frontend admin tests powered by Sauce Labs"
33

4-
on: [push]
4+
on:
5+
push:
6+
paths-ignore:
7+
- 'doc/**'
58

69
permissions:
710
contents: read # to fetch code (actions/checkout)

.github/workflows/frontend-tests.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Leave the powered by Sauce Labs bit in as this means we get additional concurrency
22
name: "Frontend tests powered by Sauce Labs"
33

4-
on: [push]
4+
on:
5+
push:
6+
paths-ignore:
7+
- 'doc/**'
58

69
permissions:
710
contents: read # to fetch code (actions/checkout)

.github/workflows/lint-package-lock.yml

-34
This file was deleted.

.github/workflows/load-test.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: "Loadtest"
22

33
# any branch is useful for testing before a PR is submitted
4-
on: [push, pull_request]
4+
on:
5+
push:
6+
paths-ignore:
7+
- "doc/**"
8+
pull_request:
9+
paths-ignore:
10+
- "doc/**"
511

612
permissions:
713
contents: read

.github/workflows/perform-type-check.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: "Perform type checks"
22

33
# any branch is useful for testing before a PR is submitted
4-
on: [push, pull_request]
4+
on:
5+
push:
6+
paths-ignore:
7+
- "doc/**"
8+
pull_request:
9+
paths-ignore:
10+
- "doc/**"
511

612
permissions:
713
contents: read

.github/workflows/rate-limit.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: "rate limit"
22

33
# any branch is useful for testing before a PR is submitted
4-
on: [push, pull_request]
4+
on:
5+
push:
6+
paths-ignore:
7+
- "doc/**"
8+
pull_request:
9+
paths-ignore:
10+
- "doc/**"
511

612
permissions:
713
contents: read

.github/workflows/upgrade-from-latest-release.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: "Upgrade from latest release"
22

33
# any branch is useful for testing before a PR is submitted
4-
on: [push, pull_request]
4+
on:
5+
push:
6+
paths-ignore:
7+
- "doc/**"
8+
pull_request:
9+
paths-ignore:
10+
- "doc/**"
511

612
permissions:
713
contents: read

.github/workflows/windows.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: "Windows Build"
22

33
# any branch is useful for testing before a PR is submitted
4-
on: [push, pull_request]
4+
on:
5+
push:
6+
paths-ignore:
7+
- "doc/**"
8+
pull_request:
9+
paths-ignore:
10+
- "doc/**"
511

612
permissions:
713
contents: read

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ plugin_packages
2727
/src/test-results
2828
playwright-report
2929
state.json
30+
/src/static/oidc

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 2.0.2
2+
3+
### Notable enhancements and fixes
4+
5+
- Fixed the locale loading in the admin panel
6+
- Added OAuth2.0 support for the Etherpad API. You can now log in into the Etherpad API with your admin user using OAuth2
7+
8+
### Compatibility changes
9+
10+
- The tests now require generating a token from the OAuth secret. You can find the `generateJWTToken` in the common.ts script for plugin endpoint updates.
11+
12+
113
# 2.0.1
214

315
### Notable enhancements and fixes

Dockerfile

+23-7
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
FROM node:alpine as adminBuild
88

99
WORKDIR /opt/etherpad-lite
10-
COPY ./admin ./admin
10+
COPY ./ ./
1111
RUN cd ./admin && npm install -g pnpm && pnpm install && pnpm run build --outDir ./dist
12+
RUN cd ./ui && pnpm install && pnpm run build --outDir ./dist
1213

1314

1415
FROM node:alpine as build
@@ -40,6 +41,14 @@ ARG SETTINGS=./settings.json.docker
4041
# ETHERPAD_PLUGINS="ep_codepad ep_author_neat"
4142
ARG ETHERPAD_PLUGINS=
4243

44+
# local plugins to install while building the container. By default no plugins are
45+
# installed.
46+
# If given a value, it has to be a space-separated, quoted list of plugin names.
47+
#
48+
# EXAMPLE:
49+
# ETHERPAD_LOCAL_PLUGINS="../ep_my_plugin ../ep_another_plugin"
50+
ARG ETHERPAD_LOCAL_PLUGINS=
51+
4352
# Control whether abiword will be installed, enabling exports to DOC/PDF/ODT formats.
4453
# By default, it is not installed.
4554
# If given any value, abiword will be installed.
@@ -57,7 +66,7 @@ ARG INSTALL_ABIWORD=
5766
ARG INSTALL_SOFFICE=
5867

5968
# Install dependencies required for modifying access.
60-
RUN apk add shadow bash
69+
RUN apk add --no-cache shadow bash
6170
# Follow the principle of least privilege: run as unprivileged user.
6271
#
6372
# Running as non-root enables running this image in platforms like OpenShift
@@ -84,7 +93,7 @@ RUN \
8493
mkdir -p /usr/share/man/man1 && \
8594
npm install pnpm -g && \
8695
apk update && apk upgrade && \
87-
apk add \
96+
apk add --no-cache \
8897
ca-certificates \
8998
curl \
9099
git \
@@ -105,11 +114,15 @@ COPY --chown=etherpad:etherpad ./pnpm-workspace.yaml ./package.json ./
105114

106115
FROM build as development
107116

108-
COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/pnpm-lock.yaml ./src/
117+
COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/
109118
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/admin/dist ./src/templates/admin
119+
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/ui/dist ./src/static/oidc
110120

111121
RUN bin/installDeps.sh && \
112-
{ [ -z "${ETHERPAD_PLUGINS}" ] || pnpm run install-plugins ${ETHERPAD_PLUGINS}; }
122+
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \
123+
pnpm run install-plugins ${ETHERPAD_PLUGINS} ${ETHERPAD_LOCAL_PLUGINS:+--path ${ETHERPAD_LOCAL_PLUGINS}}; \
124+
fi
125+
113126

114127
FROM build as production
115128

@@ -118,9 +131,12 @@ ENV ETHERPAD_PRODUCTION=true
118131

119132
COPY --chown=etherpad:etherpad ./src ./src
120133
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/admin/dist ./src/templates/admin
134+
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/ui/dist ./src/static/oidc
121135

122-
RUN bin/installDeps.sh && rm -rf ~/.npm && \
123-
{ [ -z "${ETHERPAD_PLUGINS}" ] || pnpm run install-plugins ${ETHERPAD_PLUGINS}; }
136+
RUN bin/installDeps.sh && rm -rf ~/.npm && rm -rf ~/.local && rm -rf ~/.cache && \
137+
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \
138+
pnpm run install-plugins ${ETHERPAD_PLUGINS} ${ETHERPAD_LOCAL_PLUGINS:+--path ${ETHERPAD_LOCAL_PLUGINS}}; \
139+
fi
124140

125141

126142
# Copy the configuration file.

README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Etherpad: A real-time collaborative editor for the web
22

3-
![Demo Etherpad Animated Jif](doc/images/etherpad_demo.gif "Etherpad in action")
3+
![Demo Etherpad Animated Jif](doc/public/etherpad_demo.gif "Etherpad in action")
44

55
## About
66

@@ -21,7 +21,6 @@ We're looking for maintainers and have some funding available. Please contact J
2121
### Code Quality
2222

2323
[![Code Quality](https://github.com/ether/etherpad-lite/actions/workflows/codeql-analysis.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/codeql-analysis.yml)
24-
[![package.lock](https://github.com/ether/etherpad-lite/actions/workflows/lint-package-lock.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/lint-package-lock.yml)
2524

2625
### Testing
2726

@@ -121,9 +120,9 @@ Find [here](doc/docker.adoc) information on running Etherpad in a container.
121120

122121
Etherpad is very customizable through plugins.
123122

124-
![Basic install](doc/images/etherpad_basic.png "Basic Installation")
123+
![Basic install](doc/public/etherpad_basic.png "Basic Installation")
125124

126-
![Full Features](doc/images/etherpad_full_features.png "You can add a lot of plugins !")
125+
![Full Features](doc/public/etherpad_full_features.png "You can add a lot of plugins !")
127126

128127
### Available Plugins
129128

@@ -211,7 +210,7 @@ edit `settings.json` and restart Etherpad each time.
211210
Open http://127.0.0.1:9001/p/test#skinvariantsbuilder in your browser and start
212211
playing!
213212

214-
![Skin Variant](doc/images/etherpad_skin_variants.gif "Skin variants")
213+
![Skin Variant](doc/public/etherpad_skin_variants.gif "Skin variants")
215214

216215
## Helpful resources
217216

0 commit comments

Comments
 (0)