Added typescript to etherpad

* Fixed determining file extension.

* Added ts-node

* Fixed backend tests.

* Fixed frontend test runs.

* Fixed tests.

* Use script approach for starting etherpad.

* Change directory to src.

* Fixed env.

* Change directory

* Fixed build arg.

* Fixed docker build.

* Fixed.

* Fixed cypress file path.

* Fixed.

* Use latest node container.

* Fixed windows workflow.

* Use tsx and optimized docker image.

* Added workflow for type checks.

* Fixed.

* Added tsconfig.

* Converted more files to typescript.

* Removed commented keys.

* Typed caching middleware.

* Added script for checking the types.

* Moved SecretRotator to typescript.

* Fixed npm installation and moved to types folder.

* Use better scripts for watching typescript changes.

* Update windows.yml

* Fixed order of npm installation.

* Converted i18n.

* Added more types.

* Added more types.

* Fixed import.

* Fixed tests.

* Fixed tests.

* Fixed type checking test.

* Fixed stats

* Added express types.

* fixed.
This commit is contained in:
SamTV12345 2024-02-05 21:13:02 +01:00 committed by GitHub
parent c3202284bc
commit ead3c0ea38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
74 changed files with 1259 additions and 612 deletions

View file

@ -1,10 +1,10 @@
'use strict';
const SecretRotator = require('../../../node/security/SecretRotator');
const assert = require('assert').strict;
const common = require('../common');
const crypto = require('../../../node/security/crypto');
const db = require('../../../node/db/DB');
const SecretRotator = require("../../../node/security/SecretRotator").SecretRotator;
const logger = common.logger;

View file

@ -4,6 +4,6 @@ module.exports = defineConfig({
e2e: {
baseUrl: "http://127.0.0.1:9001",
supportFile: false,
specPattern: 'src/tests/frontend/cypress/integration/**/*.js'
specPattern: 'tests/frontend/cypress/integration/**/*.js'
}
})

View file

@ -11,8 +11,8 @@ MY_DIR=$(try cd "${0%/*}" && try pwd -P) || exit 1
try cd "${MY_DIR}/../../../.."
log "Assuming src/bin/installDeps.sh has already been run"
node src/node/server.js --experimental-worker "${@}" &
ep_pid=$!
( cd src && npm run dev --experimental-worker "${@}" &
ep_pid=$!)
log "Waiting for Etherpad to accept connections (http://localhost:9001)..."
connected=false

View file

@ -11,8 +11,8 @@ MY_DIR=$(try cd "${0%/*}" && try pwd -P) || exit 1
try cd "${MY_DIR}/../../../.."
log "Assuming src/bin/installDeps.sh has already been run"
node src/node/server.js --experimental-worker "${@}" &
ep_pid=$!
(cd src && npm run dev --experimental-worker "${@}" &
ep_pid=$!)
log "Waiting for Etherpad to accept connections (http://localhost:9001)..."
connected=false

View file

@ -19,8 +19,8 @@ s!"points":[^,]*!"points": 1000!
log "Deprecation notice: runnerBackend.sh - Please use: cd src && npm test"
log "Assuming src/bin/installDeps.sh has already been run"
node src/node/server.js "${@}" &
ep_pid=$!
(cd src && npm run dev "${@}" &
ep_pid=$!)
log "Waiting for Etherpad to accept connections (http://localhost:9001)..."
connected=false

View file

@ -24,8 +24,8 @@ s!"points":[^,]*!"points": 1000!
' settings.json.template >settings.json
log "Assuming src/bin/installDeps.sh has already been run"
node src/node/server.js &
ep_pid=$!
(cd src && npm run dev &
ep_pid=$!)
log "Waiting for Etherpad to accept connections (http://localhost:9001)..."
connected=false

View file

@ -1,4 +1,4 @@
FROM node:alpine3.12
FROM node:latest
WORKDIR /tmp
RUN npm i etherpad-cli-client
COPY ./src/tests/ratelimit/send_changesets.js /tmp/send_changesets.js