mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
not working atm
This commit is contained in:
parent
1702c7c34e
commit
4fbf0e8e2a
68 changed files with 238 additions and 9606 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -19,5 +19,4 @@ bin/etherpad-1.deb
|
||||||
credentials.json
|
credentials.json
|
||||||
out/
|
out/
|
||||||
.nyc_output
|
.nyc_output
|
||||||
./package-lock.json
|
|
||||||
.idea
|
.idea
|
||||||
|
|
|
@ -8,7 +8,7 @@ if (process.argv.length != 2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// load and initialize NPM
|
// load and initialize NPM
|
||||||
const npm = require('../src/node_modules/npm');
|
const npm = require('npm');
|
||||||
npm.load({}, async () => {
|
npm.load({}, async () => {
|
||||||
try {
|
try {
|
||||||
// initialize the database
|
// initialize the database
|
||||||
|
|
|
@ -11,7 +11,7 @@ if (process.argv.length != 3) {
|
||||||
const padId = process.argv[2];
|
const padId = process.argv[2];
|
||||||
|
|
||||||
// load and initialize NPM;
|
// load and initialize NPM;
|
||||||
const npm = require('../src/node_modules/npm');
|
const npm = require('npm');
|
||||||
npm.load({}, async () => {
|
npm.load({}, async () => {
|
||||||
try {
|
try {
|
||||||
// initialize database
|
// initialize database
|
||||||
|
@ -20,7 +20,7 @@ npm.load({}, async () => {
|
||||||
await db.init();
|
await db.init();
|
||||||
|
|
||||||
// load modules
|
// load modules
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../src/static/js/Changeset');
|
||||||
const padManager = require('../src/node/db/PadManager');
|
const padManager = require('../src/node/db/PadManager');
|
||||||
|
|
||||||
const exists = await padManager.doesPadExists(padId);
|
const exists = await padManager.doesPadExists(padId);
|
||||||
|
|
|
@ -15,9 +15,9 @@ const expect = require('expect.js');
|
||||||
const diff = require('diff');
|
const diff = require('diff');
|
||||||
var async = require('async');
|
var async = require('async');
|
||||||
|
|
||||||
const npm = require('../src/node_modules/npm');
|
const npm = require('npm');
|
||||||
var async = require('ep_etherpad-lite/node_modules/async');
|
var async = require('async');
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../src/static/js/Changeset');
|
||||||
|
|
||||||
npm.load({}, async () => {
|
npm.load({}, async () => {
|
||||||
try {
|
try {
|
||||||
|
@ -27,7 +27,7 @@ npm.load({}, async () => {
|
||||||
await db.init();
|
await db.init();
|
||||||
|
|
||||||
// load modules
|
// load modules
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../src/static/js/Changeset');
|
||||||
const padManager = require('../src/node/db/PadManager');
|
const padManager = require('../src/node/db/PadManager');
|
||||||
|
|
||||||
const exists = await padManager.doesPadExists(padId);
|
const exists = await padManager.doesPadExists(padId);
|
||||||
|
|
|
@ -32,7 +32,7 @@ if [ "$(id -u)" -eq 0 ] && [ $ignoreRoot -eq 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Clean the current environment
|
#Clean the current environment
|
||||||
rm -rf src/node_modules
|
rm -rf node_modules
|
||||||
|
|
||||||
#Prepare the environment
|
#Prepare the environment
|
||||||
bin/installDeps.sh "$@" || exit 1
|
bin/installDeps.sh "$@" || exit 1
|
||||||
|
@ -41,4 +41,4 @@ bin/installDeps.sh "$@" || exit 1
|
||||||
echo "Started Etherpad..."
|
echo "Started Etherpad..."
|
||||||
|
|
||||||
SCRIPTPATH=$(pwd -P)
|
SCRIPTPATH=$(pwd -P)
|
||||||
node $(compute_node_args) "${SCRIPTPATH}/node_modules/ep_etherpad-lite/node/server.js" "$@"
|
node $(compute_node_args) "${SCRIPTPATH}/src/node/server.js" "$@"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const ueberDB = require('../src/node_modules/ueberdb2');
|
const ueberDB = require('ueberdb2');
|
||||||
const mysql = require('../src/node_modules/ueberdb2/node_modules/mysql');
|
const mysql = require('ueberdb2/node_modules/mysql');
|
||||||
const async = require('../src/node_modules/async');
|
const async = require('async');
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../src/static/js/Changeset');
|
||||||
const randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
const randomString = require('../src/static/js/pad_utils').randomString;
|
||||||
const AttributePool = require('ep_etherpad-lite/static/js/AttributePool');
|
const AttributePool = require('../src/static/js/AttributePool');
|
||||||
|
|
||||||
const settingsFile = process.argv[2];
|
const settingsFile = process.argv[2];
|
||||||
const sqlOutputFile = process.argv[3];
|
const sqlOutputFile = process.argv[3];
|
||||||
|
|
|
@ -7,9 +7,9 @@ const m = (f) => `${__dirname}/../${f}`;
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const querystring = require('querystring');
|
const querystring = require('querystring');
|
||||||
const request = require(m('src/node_modules/request'));
|
const request = require('request');
|
||||||
const settings = require(m('src/node/utils/Settings'));
|
const settings = require(m('src/node/utils/Settings'));
|
||||||
const supertest = require(m('src/node_modules/supertest'));
|
const supertest = require('supertest');
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const api = supertest(`http://${settings.ip}:${settings.port}`);
|
const api = supertest(`http://${settings.ip}:${settings.port}`);
|
||||||
|
|
|
@ -20,7 +20,7 @@ end script
|
||||||
|
|
||||||
script
|
script
|
||||||
cd $EPHOME/
|
cd $EPHOME/
|
||||||
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node node_modules/ep_etherpad-lite/node/server.js \
|
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node src/node/server.js \
|
||||||
>> $EPLOGS/access.log \
|
>> $EPLOGS/access.log \
|
||||||
2>> $EPLOGS/error.log
|
2>> $EPLOGS/error.log
|
||||||
echo "Etherpad is running on http://localhost:9001 - To change settings edit /opt/etherpad/settings.json"
|
echo "Etherpad is running on http://localhost:9001 - To change settings edit /opt/etherpad/settings.json"
|
||||||
|
|
|
@ -15,4 +15,4 @@ echo "Open 'chrome://inspect' on Chrome to start debugging."
|
||||||
|
|
||||||
# Use 0.0.0.0 to allow external connections to the debugger
|
# Use 0.0.0.0 to allow external connections to the debugger
|
||||||
# (ex: running Etherpad on a docker container). Use default port # (9229)
|
# (ex: running Etherpad on a docker container). Use default port # (9229)
|
||||||
node $(compute_node_args) --inspect=0.0.0.0:9229 node_modules/ep_etherpad-lite/node/server.js "$@"
|
node $(compute_node_args) --inspect=0.0.0.0:9229 src/node/server.js "$@"
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
* because sometimes a brick is required to fix a face.
|
* because sometimes a brick is required to fix a face.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const request = require('../src/node_modules/request');
|
const request = require('request');
|
||||||
const settings = require(`${__dirname}/../tests/container/loadSettings`).loadSettings();
|
const settings = require(`${__dirname}/../tests/container/loadSettings`).loadSettings();
|
||||||
const supertest = require(`${__dirname}/../src/node_modules/supertest`);
|
const supertest = require('supertest');
|
||||||
const api = supertest(`http://${settings.ip}:${settings.port}`);
|
const api = supertest(`http://${settings.ip}:${settings.port}`);
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
* to fix a window.
|
* to fix a window.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const request = require('../src/node_modules/request');
|
const request = require('request');
|
||||||
const settings = require(`${__dirname}/../tests/container/loadSettings`).loadSettings();
|
const settings = require(`${__dirname}/../tests/container/loadSettings`).loadSettings();
|
||||||
const supertest = require(`${__dirname}/../src/node_modules/supertest`);
|
const supertest = require('supertest');
|
||||||
const api = supertest(`http://${settings.ip}:${settings.port}`);
|
const api = supertest(`http://${settings.ip}:${settings.port}`);
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
|
@ -12,7 +12,7 @@ if (process.argv.length != 3) {
|
||||||
// get the padID
|
// get the padID
|
||||||
const padId = process.argv[2];
|
const padId = process.argv[2];
|
||||||
|
|
||||||
const npm = require('../src/node_modules/npm');
|
const npm = require('npm');
|
||||||
|
|
||||||
npm.load({}, async (er) => {
|
npm.load({}, async (er) => {
|
||||||
if (er) {
|
if (er) {
|
||||||
|
@ -27,7 +27,7 @@ npm.load({}, async (er) => {
|
||||||
await db.init();
|
await db.init();
|
||||||
|
|
||||||
// load extra modules
|
// load extra modules
|
||||||
const dirtyDB = require('../src/node_modules/dirty');
|
const dirtyDB = require('dirty');
|
||||||
const padManager = require('../src/node/db/PadManager');
|
const padManager = require('../src/node/db/PadManager');
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
|
|
||||||
|
|
|
@ -22,4 +22,4 @@ echo "Running directly, without checking/installing dependencies"
|
||||||
cd "${DIR}/.."
|
cd "${DIR}/.."
|
||||||
|
|
||||||
# run Etherpad main class
|
# run Etherpad main class
|
||||||
node $(compute_node_args) "${DIR}/../node_modules/ep_etherpad-lite/node/server.js" "$@"
|
node $(compute_node_args) "${DIR}/../src/node/server.js" "$@"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
|
||||||
require('ep_etherpad-lite/node_modules/npm').load({}, (er, npm) => {
|
require('npm').load({}, (er, npm) => {
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
const ueberDB = require('ep_etherpad-lite/node_modules/ueberdb2');
|
const ueberDB = require('ueberdb2');
|
||||||
const settings = require('ep_etherpad-lite/node/utils/Settings');
|
const settings = require('../src/node/utils/Settings');
|
||||||
const log4js = require('ep_etherpad-lite/node_modules/log4js');
|
const log4js = require('log4js');
|
||||||
|
|
||||||
const dbWrapperSettings = {
|
const dbWrapperSettings = {
|
||||||
cache: 0,
|
cache: 0,
|
||||||
|
|
|
@ -37,9 +37,7 @@ log "Ensure that all dependencies are up to date... If this is the first time y
|
||||||
(
|
(
|
||||||
npm ci
|
npm ci
|
||||||
) || {
|
) || {
|
||||||
rm -rf src/node_modules
|
|
||||||
rm -rf node_modules
|
rm -rf node_modules
|
||||||
git restore node_modules/ep_etherpad-lite
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require('ep_etherpad-lite/node_modules/npm').load({}, (er, npm) => {
|
require('npm').load({}, (er, npm) => {
|
||||||
process.chdir(`${npm.root}/..`);
|
process.chdir(`${npm.root}/..`);
|
||||||
|
|
||||||
// This script requires that you have modified your settings.json file
|
// This script requires that you have modified your settings.json file
|
||||||
|
@ -9,10 +9,10 @@ require('ep_etherpad-lite/node_modules/npm').load({}, (er, npm) => {
|
||||||
// `node --max-old-space-size=4096 bin/migrateDirtyDBtoRealDB.js`
|
// `node --max-old-space-size=4096 bin/migrateDirtyDBtoRealDB.js`
|
||||||
|
|
||||||
|
|
||||||
const settings = require('ep_etherpad-lite/node/utils/Settings');
|
const settings = require('../src/node/utils/Settings');
|
||||||
let dirty = require('../src/node_modules/dirty');
|
let dirty = require('dirty');
|
||||||
const ueberDB = require('../src/node_modules/ueberdb2');
|
const ueberDB = require('ueberdb2');
|
||||||
const log4js = require('../src/node_modules/log4js');
|
const log4js = require('log4js');
|
||||||
const dbWrapperSettings = {
|
const dbWrapperSettings = {
|
||||||
cache: '0', // The cache slows things down when you're mostly writing.
|
cache: '0', // The cache slows things down when you're mostly writing.
|
||||||
writeInterval: 0, // Write directly to the database, don't buffer
|
writeInterval: 0, // Write directly to the database, don't buffer
|
||||||
|
|
|
@ -115,7 +115,7 @@ You can build the docs e.g. produce html, using `make docs`. At some point in th
|
||||||
## Testing
|
## Testing
|
||||||
Front-end tests are found in the `tests/frontend/` folder in the repository. Run them by pointing your browser to `<yourdomainhere>/tests/frontend`.
|
Front-end tests are found in the `tests/frontend/` folder in the repository. Run them by pointing your browser to `<yourdomainhere>/tests/frontend`.
|
||||||
|
|
||||||
Back-end tests can be run from the `src` directory, via `npm test`.
|
Back-end tests can be run via `npm run test`.
|
||||||
|
|
||||||
## Things you can help with
|
## Things you can help with
|
||||||
Etherpad is much more than software. So if you aren't a developer then worry not, there is still a LOT you can do! A big part of what we do is community engagement. You can help in the following ways
|
Etherpad is much more than software. So if you aren't a developer then worry not, there is still a LOT you can do! A big part of what we do is community engagement. You can help in the following ways
|
||||||
|
|
|
@ -23,7 +23,7 @@ Visit http://whatever/tests/frontend/ to run the frontend tests.
|
||||||
|
|
||||||
### backend
|
### backend
|
||||||
|
|
||||||
Type ``cd src && npm run test`` to run the backend tests.
|
Type ``npm run test`` to run the backend tests.
|
||||||
|
|
||||||
## LICENSE
|
## LICENSE
|
||||||
Apache 2.0
|
Apache 2.0
|
||||||
|
|
|
@ -29,7 +29,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: ether/etherpad-lite
|
repository: ether/etherpad-lite
|
||||||
|
|
||||||
- name: Install all dependencies and symlink for ep_etherpad-lite
|
- name: Install all dependencies
|
||||||
run: bin/installDeps.sh
|
run: bin/installDeps.sh
|
||||||
|
|
||||||
# clone this repository into node_modules/ep_plugin-name
|
# clone this repository into node_modules/ep_plugin-name
|
||||||
|
|
|
@ -8,9 +8,9 @@ if (process.argv.length != 4 && process.argv.length != 5) {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const npm = require('../src/node_modules/npm');
|
const npm = require('npm');
|
||||||
const async = require('../src/node_modules/async');
|
const async = require('async');
|
||||||
const ueberDB = require('../src/node_modules/ueberdb2');
|
const ueberDB = require('ueberdb2');
|
||||||
|
|
||||||
const padId = process.argv[2];
|
const padId = process.argv[2];
|
||||||
const newRevHead = process.argv[3];
|
const newRevHead = process.argv[3];
|
||||||
|
@ -75,7 +75,7 @@ async.series([
|
||||||
function (callback) {
|
function (callback) {
|
||||||
// Rebuild Pad from revisions up to and including the new revision head
|
// Rebuild Pad from revisions up to and including the new revision head
|
||||||
AuthorManager = require('../src/node/db/AuthorManager');
|
AuthorManager = require('../src/node/db/AuthorManager');
|
||||||
Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
Changeset = require('../src/static/js/Changeset');
|
||||||
// Author attributes are derived from changesets, but there can also be
|
// Author attributes are derived from changesets, but there can also be
|
||||||
// non-author attributes with specific mappings that changesets depend on
|
// non-author attributes with specific mappings that changesets depend on
|
||||||
// and, AFAICT, cannot be recreated any other way
|
// and, AFAICT, cannot be recreated any other way
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const child_process = require('child_process');
|
const child_process = require('child_process');
|
||||||
const semver = require('../src/node_modules/semver');
|
const semver = require('semver');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ if (process.argv.length != 3) {
|
||||||
// get the padID
|
// get the padID
|
||||||
const padId = process.argv[2];
|
const padId = process.argv[2];
|
||||||
|
|
||||||
const npm = require('../src/node_modules/npm');
|
const npm = require('npm');
|
||||||
npm.load({}, async (er) => {
|
npm.load({}, async (er) => {
|
||||||
if (er) {
|
if (er) {
|
||||||
console.error(`Could not load NPM: ${er}`);
|
console.error(`Could not load NPM: ${er}`);
|
||||||
|
|
|
@ -32,4 +32,4 @@ bin/installDeps.sh "$@" || exit 1
|
||||||
log "Starting Etherpad..."
|
log "Starting Etherpad..."
|
||||||
|
|
||||||
SCRIPTPATH=$(pwd -P)
|
SCRIPTPATH=$(pwd -P)
|
||||||
exec node $(compute_node_args) "$SCRIPTPATH/node_modules/ep_etherpad-lite/node/server.js" "$@"
|
exec node $(compute_node_args) "$SCRIPTPATH/src/node/server.js" "$@"
|
||||||
|
|
106
package.json
106
package.json
|
@ -1,6 +1,81 @@
|
||||||
{
|
{
|
||||||
|
"name": "ep_etherpad-lite",
|
||||||
|
"description": "A free and open source realtime collaborative editor",
|
||||||
|
"homepage": "https://etherpad.org",
|
||||||
|
"keywords": [
|
||||||
|
"etherpad",
|
||||||
|
"realtime",
|
||||||
|
"collaborative",
|
||||||
|
"editor"
|
||||||
|
],
|
||||||
|
"author": "Etherpad Foundation",
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"name": "John McLear"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Antonio Muci"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Hans Pinckaers"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Robin Buse"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Marcel Klehr"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Peter Martischka"
|
||||||
|
}
|
||||||
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ep_etherpad-lite": "file:src"
|
"async": "^3.2.0",
|
||||||
|
"async-stacktrace": "0.0.2",
|
||||||
|
"channels": "0.0.4",
|
||||||
|
"cheerio": "0.22.0",
|
||||||
|
"clean-css": "4.2.3",
|
||||||
|
"cookie-parser": "1.4.5",
|
||||||
|
"ejs": "2.6.1",
|
||||||
|
"etherpad-require-kernel": "1.0.9",
|
||||||
|
"etherpad-yajsml": "0.0.2",
|
||||||
|
"express": "4.17.1",
|
||||||
|
"express-rate-limit": "5.1.1",
|
||||||
|
"express-session": "1.17.1",
|
||||||
|
"find-root": "1.1.0",
|
||||||
|
"formidable": "1.2.1",
|
||||||
|
"graceful-fs": "4.2.4",
|
||||||
|
"http-errors": "1.8.0",
|
||||||
|
"js-cookie": "^2.2.1",
|
||||||
|
"jsonminify": "0.4.1",
|
||||||
|
"languages4translatewiki": "0.1.3",
|
||||||
|
"lodash.clonedeep": "4.5.0",
|
||||||
|
"log4js": "0.6.35",
|
||||||
|
"measured-core": "1.11.2",
|
||||||
|
"mime-types": "^2.1.27",
|
||||||
|
"nodeify": "1.0.1",
|
||||||
|
"npm": "6.14.8",
|
||||||
|
"openapi-backend": "2.4.1",
|
||||||
|
"proxy-addr": "^2.0.6",
|
||||||
|
"rate-limiter-flexible": "^2.1.4",
|
||||||
|
"rehype": "^10.0.0",
|
||||||
|
"rehype-minify-whitespace": "^4.0.5",
|
||||||
|
"request": "2.88.2",
|
||||||
|
"resolve": "1.1.7",
|
||||||
|
"security": "1.0.0",
|
||||||
|
"semver": "5.6.0",
|
||||||
|
"slide": "1.1.6",
|
||||||
|
"socket.io": "^2.3.0",
|
||||||
|
"terser": "^4.7.0",
|
||||||
|
"threads": "^1.4.0",
|
||||||
|
"tiny-worker": "^2.3.0",
|
||||||
|
"tinycon": "0.0.1",
|
||||||
|
"ueberdb2": "^0.5.6",
|
||||||
|
"underscore": "1.8.3",
|
||||||
|
"unorm": "1.4.1"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"etherpad-lite": "node/server.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^7.15.0",
|
"eslint": "^7.15.0",
|
||||||
|
@ -10,7 +85,16 @@
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-prefer-arrow": "^1.2.2",
|
"eslint-plugin-prefer-arrow": "^1.2.2",
|
||||||
"eslint-plugin-promise": "^4.2.1",
|
"eslint-plugin-promise": "^4.2.1",
|
||||||
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0"
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.10.0",
|
||||||
|
"etherpad-cli-client": "0.0.9",
|
||||||
|
"mocha": "7.1.2",
|
||||||
|
"mocha-froth": "^0.2.10",
|
||||||
|
"nyc": "15.0.1",
|
||||||
|
"set-cookie-parser": "^2.4.6",
|
||||||
|
"sinon": "^9.2.0",
|
||||||
|
"superagent": "^3.8.3",
|
||||||
|
"supertest": "4.0.2",
|
||||||
|
"wd": "1.12.1"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"ignorePatterns": [
|
"ignorePatterns": [
|
||||||
|
@ -97,9 +181,21 @@
|
||||||
"root": true
|
"root": true
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint ."
|
"lint-tests": "eslint tests",
|
||||||
|
"lint-core": "eslint src",
|
||||||
|
"lint-bin": "eslint bin",
|
||||||
|
"lint": "npm run lint-tests && npm run lint-bin && npm run lint-core",
|
||||||
|
"test": "nyc mocha --timeout 30000 --recursive tests/backend/specs node_modules/ep_*/static/tests/backend/specs",
|
||||||
|
"test-container": "nyc mocha --timeout 5000 tests/container/specs/api"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.13.0"
|
"node": ">=10.13.0",
|
||||||
}
|
"npm": ">=5.5.1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/ether/etherpad-lite.git"
|
||||||
|
},
|
||||||
|
"version": "1.8.7",
|
||||||
|
"license": "Apache-2.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../../static/js/Changeset');
|
||||||
const customError = require('../utils/customError');
|
const customError = require('../utils/customError');
|
||||||
const padManager = require('./PadManager');
|
const padManager = require('./PadManager');
|
||||||
const padMessageHandler = require('../handler/PadMessageHandler');
|
const padMessageHandler = require('../handler/PadMessageHandler');
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
const db = require('./DB');
|
const db = require('./DB');
|
||||||
const customError = require('../utils/customError');
|
const customError = require('../utils/customError');
|
||||||
const randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
const randomString = require('../../static/js/pad_utils').randomString;
|
||||||
|
|
||||||
exports.getColorPalette = function () {
|
exports.getColorPalette = function () {
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const customError = require('../utils/customError');
|
const customError = require('../utils/customError');
|
||||||
const randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
const randomString = require('../../static/js/pad_utils').randomString;
|
||||||
const db = require('./DB');
|
const db = require('./DB');
|
||||||
const padManager = require('./PadManager');
|
const padManager = require('./PadManager');
|
||||||
const sessionManager = require('./SessionManager');
|
const sessionManager = require('./SessionManager');
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../../static/js/Changeset');
|
||||||
const AttributePool = require('ep_etherpad-lite/static/js/AttributePool');
|
const AttributePool = require('../../static/js/AttributePool');
|
||||||
const db = require('./DB');
|
const db = require('./DB');
|
||||||
const settings = require('../utils/Settings');
|
const settings = require('../utils/Settings');
|
||||||
const authorManager = require('./AuthorManager');
|
const authorManager = require('./AuthorManager');
|
||||||
|
@ -15,7 +15,7 @@ const customError = require('../utils/customError');
|
||||||
const readOnlyManager = require('./ReadOnlyManager');
|
const readOnlyManager = require('./ReadOnlyManager');
|
||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
const randomString = require('../utils/randomstring');
|
const randomString = require('../utils/randomstring');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
const hooks = require('../../static/js/pluginfw/hooks');
|
||||||
const promises = require('../utils/promises');
|
const promises = require('../utils/promises');
|
||||||
|
|
||||||
// serialization/deserialization attributes
|
// serialization/deserialization attributes
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const authorManager = require('./AuthorManager');
|
const authorManager = require('./AuthorManager');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks.js');
|
const hooks = require('../../static/js/pluginfw/hooks.js');
|
||||||
const padManager = require('./PadManager');
|
const padManager = require('./PadManager');
|
||||||
const sessionManager = require('./SessionManager');
|
const sessionManager = require('./SessionManager');
|
||||||
const settings = require('../utils/Settings');
|
const settings = require('../utils/Settings');
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
* express-session, which can't actually use promises anyway.
|
* express-session, which can't actually use promises anyway.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const DB = require('ep_etherpad-lite/node/db/DB');
|
const DB = require('./DB');
|
||||||
const Store = require('ep_etherpad-lite/node_modules/express-session').Store;
|
const Store = require('express-session').Store;
|
||||||
const log4js = require('ep_etherpad-lite/node_modules/log4js');
|
const log4js = require('log4js');
|
||||||
|
|
||||||
const logger = log4js.getLogger('SessionStore');
|
const logger = log4js.getLogger('SessionStore');
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../static/js/Changeset');
|
||||||
const AttributePool = require('ep_etherpad-lite/static/js/AttributePool');
|
const AttributePool = require('../static/js/AttributePool');
|
||||||
|
|
||||||
function random() {
|
function random() {
|
||||||
this.nextInt = function (maxValue) {
|
this.nextInt = function (maxValue) {
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
const ejs = require('ejs');
|
const ejs = require('ejs');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks.js');
|
const hooks = require('../../static/js/pluginfw/hooks.js');
|
||||||
const resolve = require('resolve');
|
const resolve = require('resolve');
|
||||||
const settings = require('../utils/Settings');
|
const settings = require('../utils/Settings');
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ const exportEtherpad = require('../utils/ExportEtherpad');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const settings = require('../utils/Settings');
|
const settings = require('../utils/Settings');
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
const hooks = require('../../static/js/pluginfw/hooks');
|
||||||
const TidyHtml = require('../utils/TidyHtml');
|
const TidyHtml = require('../utils/TidyHtml');
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ const os = require('os');
|
||||||
const importHtml = require('../utils/ImportHtml');
|
const importHtml = require('../utils/ImportHtml');
|
||||||
const importEtherpad = require('../utils/ImportEtherpad');
|
const importEtherpad = require('../utils/ImportEtherpad');
|
||||||
const log4js = require('log4js');
|
const log4js = require('log4js');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks.js');
|
const hooks = require('../../static/js/pluginfw/hooks.js');
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
|
|
||||||
const fsp_exists = util.promisify(fs.exists);
|
const fsp_exists = util.promisify(fs.exists);
|
||||||
|
|
|
@ -21,19 +21,19 @@
|
||||||
/* global exports, process, require */
|
/* global exports, process, require */
|
||||||
|
|
||||||
const padManager = require('../db/PadManager');
|
const padManager = require('../db/PadManager');
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../../static/js/Changeset');
|
||||||
const AttributePool = require('ep_etherpad-lite/static/js/AttributePool');
|
const AttributePool = require('../../static/js/AttributePool');
|
||||||
const AttributeManager = require('ep_etherpad-lite/static/js/AttributeManager');
|
const AttributeManager = require('../../static/js/AttributeManager');
|
||||||
const authorManager = require('../db/AuthorManager');
|
const authorManager = require('../db/AuthorManager');
|
||||||
const readOnlyManager = require('../db/ReadOnlyManager');
|
const readOnlyManager = require('../db/ReadOnlyManager');
|
||||||
const settings = require('../utils/Settings');
|
const settings = require('../utils/Settings');
|
||||||
const securityManager = require('../db/SecurityManager');
|
const securityManager = require('../db/SecurityManager');
|
||||||
const plugins = require('ep_etherpad-lite/static/js/pluginfw/plugin_defs.js');
|
const plugins = require('../../static/js/pluginfw/plugin_defs.js');
|
||||||
const log4js = require('log4js');
|
const log4js = require('log4js');
|
||||||
const messageLogger = log4js.getLogger('message');
|
const messageLogger = log4js.getLogger('message');
|
||||||
const accessLogger = log4js.getLogger('access');
|
const accessLogger = log4js.getLogger('access');
|
||||||
const _ = require('underscore');
|
const _ = require('underscore');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks.js');
|
const hooks = require('../../static/js/pluginfw/hooks.js');
|
||||||
const channels = require('channels');
|
const channels = require('channels');
|
||||||
const stats = require('../stats');
|
const stats = require('../stats');
|
||||||
const assert = require('assert').strict;
|
const assert = require('assert').strict;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
const eejs = require('ep_etherpad-lite/node/eejs');
|
const eejs = require('../../eejs');
|
||||||
|
|
||||||
exports.expressCreateServer = function (hook_name, args, cb) {
|
exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
args.app.get('/admin', (req, res) => {
|
args.app.get('/admin', (req, res) => {
|
||||||
if ('/' != req.path[req.path.length - 1]) return res.redirect('./admin/');
|
if ('/' != req.path[req.path.length - 1]) return res.redirect('./admin/');
|
||||||
res.send(eejs.require('ep_etherpad-lite/templates/admin/index.html', {req}));
|
res.send(eejs.require('../../../templates/admin/index.html', {req}));
|
||||||
});
|
});
|
||||||
return cb();
|
return cb();
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ const UpdateCheck = require('../../utils/UpdateCheck');
|
||||||
|
|
||||||
exports.expressCreateServer = (hookName, args, cb) => {
|
exports.expressCreateServer = (hookName, args, cb) => {
|
||||||
args.app.get('/admin/plugins', (req, res) => {
|
args.app.get('/admin/plugins', (req, res) => {
|
||||||
res.send(eejs.require('ep_etherpad-lite/templates/admin/plugins.html', {
|
res.send(eejs.require('../../../templates/admin/plugins.html', {
|
||||||
plugins: plugins.plugins,
|
plugins: plugins.plugins,
|
||||||
req,
|
req,
|
||||||
errors: [],
|
errors: [],
|
||||||
|
@ -21,7 +21,7 @@ exports.expressCreateServer = (hookName, args, cb) => {
|
||||||
const gitCommit = settings.getGitCommit();
|
const gitCommit = settings.getGitCommit();
|
||||||
const epVersion = settings.getEpVersion();
|
const epVersion = settings.getEpVersion();
|
||||||
|
|
||||||
res.send(eejs.require('ep_etherpad-lite/templates/admin/plugins-info.html', {
|
res.send(eejs.require('../../../templates/admin/plugins-info.html', {
|
||||||
gitCommit,
|
gitCommit,
|
||||||
epVersion,
|
epVersion,
|
||||||
latestVersion: UpdateCheck.getLatestVersion(),
|
latestVersion: UpdateCheck.getLatestVersion(),
|
||||||
|
|
|
@ -7,7 +7,7 @@ const settings = require('../../utils/Settings');
|
||||||
|
|
||||||
exports.expressCreateServer = (hookName, args, cb) => {
|
exports.expressCreateServer = (hookName, args, cb) => {
|
||||||
args.app.get('/admin/settings', (req, res) => {
|
args.app.get('/admin/settings', (req, res) => {
|
||||||
res.send(eejs.require('ep_etherpad-lite/templates/admin/settings.html', {
|
res.send(eejs.require('../../../templates/admin/settings.html', {
|
||||||
req,
|
req,
|
||||||
settings: '',
|
settings: '',
|
||||||
errors: [],
|
errors: [],
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const stats = require('ep_etherpad-lite/node/stats');
|
const stats = require('../../stats');
|
||||||
|
|
||||||
exports.expressCreateServer = function (hook_name, args, cb) {
|
exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
exports.app = args.app;
|
exports.app = args.app;
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const eejs = require('ep_etherpad-lite/node/eejs');
|
const eejs = require('../../eejs');
|
||||||
const toolbar = require('ep_etherpad-lite/node/utils/toolbar');
|
const toolbar = require('../../utils/toolbar');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
const hooks = require('../../../static/js/pluginfw/hooks');
|
||||||
const settings = require('../../utils/Settings');
|
const settings = require('../../utils/Settings');
|
||||||
const webaccess = require('./webaccess');
|
const webaccess = require('./webaccess');
|
||||||
|
|
||||||
exports.expressCreateServer = function (hook_name, args, cb) {
|
exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
// expose current stats
|
// expose current stats
|
||||||
args.app.get('/stats', (req, res) => {
|
args.app.get('/stats', (req, res) => {
|
||||||
res.json(require('ep_etherpad-lite/node/stats').toJSON());
|
res.json(require('../../stats').toJSON());
|
||||||
});
|
});
|
||||||
|
|
||||||
// serve index.html under /
|
// serve index.html under /
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const minify = require('../../utils/Minify');
|
const minify = require('../../utils/Minify');
|
||||||
const plugins = require('ep_etherpad-lite/static/js/pluginfw/plugin_defs');
|
const plugins = require('../../../static/js/pluginfw/plugin_defs');
|
||||||
const CachingMiddleware = require('../../utils/caching_middleware');
|
const CachingMiddleware = require('../../utils/caching_middleware');
|
||||||
const settings = require('../../utils/Settings');
|
const settings = require('../../utils/Settings');
|
||||||
const Yajsml = require('etherpad-yajsml');
|
const Yajsml = require('etherpad-yajsml');
|
||||||
|
|
|
@ -3,7 +3,7 @@ const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const _ = require('underscore');
|
const _ = require('underscore');
|
||||||
const npm = require('npm');
|
const npm = require('npm');
|
||||||
const plugins = require('ep_etherpad-lite/static/js/pluginfw/plugin_defs.js').plugins;
|
const plugins = require('../../static/js/pluginfw/plugin_defs.js').plugins;
|
||||||
const semver = require('semver');
|
const semver = require('semver');
|
||||||
const existsSync = require('../utils/path_exists');
|
const existsSync = require('../utils/path_exists');
|
||||||
const settings = require('../utils/Settings')
|
const settings = require('../utils/Settings')
|
||||||
|
@ -39,7 +39,7 @@ function getAllLocales() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add core supported languages first
|
// add core supported languages first
|
||||||
extractLangs(`${npm.root}/ep_etherpad-lite/locales`);
|
extractLangs(`${npm.root}/src/locales`);
|
||||||
|
|
||||||
// add plugins languages (if any)
|
// add plugins languages (if any)
|
||||||
for (const pluginName in plugins) extractLangs(path.join(npm.root, pluginName, 'locales'));
|
for (const pluginName in plugins) extractLangs(path.join(npm.root, pluginName, 'locales'));
|
||||||
|
|
|
@ -87,7 +87,7 @@ exports.findEtherpadRoot = function () {
|
||||||
*
|
*
|
||||||
* <BASE_DIR>\src
|
* <BASE_DIR>\src
|
||||||
*/
|
*/
|
||||||
let maybeEtherpadRoot = popIfEndsWith(splitFoundRoot, ['src']);
|
let maybeEtherpadRoot = popIfEndsWith(splitFoundRoot, []);
|
||||||
|
|
||||||
if ((maybeEtherpadRoot === false) && (process.platform === 'win32')) {
|
if ((maybeEtherpadRoot === false) && (process.platform === 'win32')) {
|
||||||
/*
|
/*
|
||||||
|
@ -97,14 +97,15 @@ exports.findEtherpadRoot = function () {
|
||||||
*
|
*
|
||||||
* <BASE_DIR>\node_modules\ep_etherpad-lite
|
* <BASE_DIR>\node_modules\ep_etherpad-lite
|
||||||
*/
|
*/
|
||||||
maybeEtherpadRoot = popIfEndsWith(splitFoundRoot, ['node_modules', 'ep_etherpad-lite']);
|
maybeEtherpadRoot = popIfEndsWith(splitFoundRoot, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maybeEtherpadRoot === false) {
|
if (maybeEtherpadRoot === false) {
|
||||||
absPathLogger.error(`Could not identity Etherpad base path in this ${process.platform} installation in "${foundRoot}"`);
|
absPathLogger.error(`Could not identify Etherpad base path in this ${process.platform} installation in "${foundRoot}"`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
maybeEtherpadRoot.pop();
|
||||||
// SIDE EFFECT on this module-level variable
|
// SIDE EFFECT on this module-level variable
|
||||||
etherpadRoot = maybeEtherpadRoot.join(path.sep);
|
etherpadRoot = maybeEtherpadRoot.join(path.sep);
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
|
|
||||||
const db = require('../db/DB');
|
const db = require('../db/DB');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
const hooks = require('../../static/js/pluginfw/hooks');
|
||||||
|
|
||||||
exports.getPadRaw = async function (padId) {
|
exports.getPadRaw = async function (padId) {
|
||||||
const padKey = `pad:${padId}`;
|
const padKey = `pad:${padId}`;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../../static/js/Changeset');
|
||||||
|
|
||||||
exports.getPadPlainText = function (pad, revNum) {
|
exports.getPadPlainText = function (pad, revNum) {
|
||||||
const _analyzeLine = exports._analyzeLine;
|
const _analyzeLine = exports._analyzeLine;
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../../static/js/Changeset');
|
||||||
const padManager = require('../db/PadManager');
|
const padManager = require('../db/PadManager');
|
||||||
const _ = require('underscore');
|
const _ = require('underscore');
|
||||||
const Security = require('ep_etherpad-lite/static/js/security');
|
const Security = require('../../static/js/security');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
const hooks = require('../../static/js/pluginfw/hooks');
|
||||||
const eejs = require('ep_etherpad-lite/node/eejs');
|
const eejs = require('../eejs');
|
||||||
const _analyzeLine = require('./ExportHelper')._analyzeLine;
|
const _analyzeLine = require('./ExportHelper')._analyzeLine;
|
||||||
const _encodeWhitespace = require('./ExportHelper')._encodeWhitespace;
|
const _encodeWhitespace = require('./ExportHelper')._encodeWhitespace;
|
||||||
const padutils = require('../../static/js/pad_utils').padutils;
|
const padutils = require('../../static/js/pad_utils').padutils;
|
||||||
|
@ -453,7 +453,7 @@ exports.getPadHTMLDocument = async function (padId, revNum) {
|
||||||
html += hookHtml;
|
html += hookHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
return eejs.require('ep_etherpad-lite/templates/export_html.html', {
|
return eejs.require('../../templates/export_html.html', {
|
||||||
body: html,
|
body: html,
|
||||||
padId: Security.escapeHTML(padId),
|
padId: Security.escapeHTML(padId),
|
||||||
extraCSS: stylesForExportCSS,
|
extraCSS: stylesForExportCSS,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../../static/js/Changeset');
|
||||||
const padManager = require('../db/PadManager');
|
const padManager = require('../db/PadManager');
|
||||||
const _analyzeLine = require('./ExportHelper')._analyzeLine;
|
const _analyzeLine = require('./ExportHelper')._analyzeLine;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
const log4js = require('log4js');
|
const log4js = require('log4js');
|
||||||
const db = require('../db/DB');
|
const db = require('../db/DB');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
const hooks = require('../../static/js/pluginfw/hooks');
|
||||||
|
|
||||||
exports.setPadRaw = function (padId, records) {
|
exports.setPadRaw = function (padId, records) {
|
||||||
records = JSON.parse(records);
|
records = JSON.parse(records);
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const log4js = require('log4js');
|
const log4js = require('log4js');
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../../static/js/Changeset');
|
||||||
const contentcollector = require('ep_etherpad-lite/static/js/contentcollector');
|
const contentcollector = require('../../static/js/contentcollector');
|
||||||
const cheerio = require('cheerio');
|
const cheerio = require('cheerio');
|
||||||
const rehype = require('rehype');
|
const rehype = require('rehype');
|
||||||
const minifyWhitespace = require('rehype-minify-whitespace');
|
const minifyWhitespace = require('rehype-minify-whitespace');
|
||||||
|
|
|
@ -437,7 +437,7 @@ exports.getGitCommit = function () {
|
||||||
|
|
||||||
// Return etherpad version from package.json
|
// Return etherpad version from package.json
|
||||||
exports.getEpVersion = function () {
|
exports.getEpVersion = function () {
|
||||||
return require('ep_etherpad-lite/package.json').version;
|
return require('../../../package.json').version;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
9462
src/package-lock.json
generated
9462
src/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -255,11 +255,11 @@ require.setRootURI("../javascripts/src");\n\
|
||||||
require.setLibraryURI("../javascripts/lib");\n\
|
require.setLibraryURI("../javascripts/lib");\n\
|
||||||
require.setGlobalKeyPath("require");\n\
|
require.setGlobalKeyPath("require");\n\
|
||||||
\n\
|
\n\
|
||||||
var plugins = require("ep_etherpad-lite/static/js/pluginfw/client_plugins");\n\
|
var plugins = require("./pluginfw/client_plugins");\n\
|
||||||
plugins.adoptPluginsFromAncestorsOf(window);\n\
|
plugins.adoptPluginsFromAncestorsOf(window);\n\
|
||||||
\n\
|
\n\
|
||||||
$ = jQuery = require("ep_etherpad-lite/static/js/rjquery").jQuery; // Expose jQuery #HACK\n\
|
$ = jQuery = require("./rjquery").jQuery; // Expose jQuery #HACK\n\
|
||||||
var Ace2Inner = require("ep_etherpad-lite/static/js/ace2_inner");\n\
|
var Ace2Inner = require("./ace2_inner");\n\
|
||||||
\n\
|
\n\
|
||||||
plugins.ensure(function () {\n\
|
plugins.ensure(function () {\n\
|
||||||
Ace2Inner.init();\n\
|
Ace2Inner.init();\n\
|
||||||
|
|
|
@ -27,7 +27,7 @@ const browser = require('./browser');
|
||||||
|
|
||||||
Ace2Common = require('./ace2_common');
|
Ace2Common = require('./ace2_common');
|
||||||
|
|
||||||
plugins = require('ep_etherpad-lite/static/js/pluginfw/client_plugins');
|
plugins = require('./pluginfw/client_plugins');
|
||||||
$ = jQuery = require('./rjquery').$;
|
$ = jQuery = require('./rjquery').$;
|
||||||
_ = require('./underscore');
|
_ = require('./underscore');
|
||||||
|
|
||||||
|
|
|
@ -43,12 +43,12 @@ const adoptPluginsFromAncestorsOf = (frame) => {
|
||||||
|
|
||||||
if (!parentRequire) throw new Error('Parent plugins could not be found.');
|
if (!parentRequire) throw new Error('Parent plugins could not be found.');
|
||||||
|
|
||||||
const ancestorPluginDefs = parentRequire('ep_etherpad-lite/static/js/pluginfw/plugin_defs');
|
const ancestorPluginDefs = parentRequire('./plugin_defs');
|
||||||
defs.hooks = ancestorPluginDefs.hooks;
|
defs.hooks = ancestorPluginDefs.hooks;
|
||||||
defs.loaded = ancestorPluginDefs.loaded;
|
defs.loaded = ancestorPluginDefs.loaded;
|
||||||
defs.parts = ancestorPluginDefs.parts;
|
defs.parts = ancestorPluginDefs.parts;
|
||||||
defs.plugins = ancestorPluginDefs.plugins;
|
defs.plugins = ancestorPluginDefs.plugins;
|
||||||
const ancestorPlugins = parentRequire('ep_etherpad-lite/static/js/pluginfw/client_plugins');
|
const ancestorPlugins = parentRequire('./client_plugins');
|
||||||
exports.baseURL = ancestorPlugins.baseURL;
|
exports.baseURL = ancestorPlugins.baseURL;
|
||||||
exports.ensure = ancestorPlugins.ensure;
|
exports.ensure = ancestorPlugins.ensure;
|
||||||
exports.update = ancestorPlugins.update;
|
exports.update = ancestorPlugins.update;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const log4js = require('log4js');
|
const log4js = require('log4js');
|
||||||
const plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
const plugins = require('./plugins');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
const hooks = require('./hooks');
|
||||||
const npm = require('npm');
|
const npm = require('npm');
|
||||||
const request = require('request');
|
const request = require('request');
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<%
|
<%
|
||||||
var plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins");
|
var plugins = require("../../static/js/pluginfw/plugins");
|
||||||
%>
|
%>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
|
|
|
@ -442,7 +442,7 @@
|
||||||
<script type="text/javascript" src="../static/js/require-kernel.js?v=<%=settings.randomVersionString%>"></script>
|
<script type="text/javascript" src="../static/js/require-kernel.js?v=<%=settings.randomVersionString%>"></script>
|
||||||
|
|
||||||
<!-- Include pad_utils manually -->
|
<!-- Include pad_utils manually -->
|
||||||
<script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/pad_utils.js?callback=require.define&v=<%=settings.randomVersionString%>"></script>
|
<script type="text/javascript" src="../javascripts/lib/static/js/pad_utils.js?callback=require.define&v=<%=settings.randomVersionString%>"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt
|
// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt
|
||||||
|
@ -465,8 +465,8 @@
|
||||||
<script type="text/javascript" src="../socket.io/socket.io.js?v=<%=settings.randomVersionString%>"></script>
|
<script type="text/javascript" src="../socket.io/socket.io.js?v=<%=settings.randomVersionString%>"></script>
|
||||||
|
|
||||||
<!-- Include base packages manually (this help with debugging) -->
|
<!-- Include base packages manually (this help with debugging) -->
|
||||||
<script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define&v=<%=settings.randomVersionString%>"></script>
|
<script type="text/javascript" src="../javascripts/lib/static/js/pad.js?callback=require.define&v=<%=settings.randomVersionString%>"></script>
|
||||||
<script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define&v=<%=settings.randomVersionString%>"></script>
|
<script type="text/javascript" src="../javascripts/lib/static/js/ace2_common.js?callback=require.define&v=<%=settings.randomVersionString%>"></script>
|
||||||
|
|
||||||
<% e.begin_block("customScripts"); %>
|
<% e.begin_block("customScripts"); %>
|
||||||
<script type="text/javascript" src="../static/skins/<%=encodeURI(settings.skinName)%>/pad.js?v=<%=settings.randomVersionString%>"></script>
|
<script type="text/javascript" src="../static/skins/<%=encodeURI(settings.skinName)%>/pad.js?v=<%=settings.randomVersionString%>"></script>
|
||||||
|
|
|
@ -252,8 +252,8 @@
|
||||||
<script type="text/javascript" src="../../socket.io/socket.io.js?v=<%=settings.randomVersionString%>"></script>
|
<script type="text/javascript" src="../../socket.io/socket.io.js?v=<%=settings.randomVersionString%>"></script>
|
||||||
|
|
||||||
<!-- Include base packages manually (this help with debugging) -->
|
<!-- Include base packages manually (this help with debugging) -->
|
||||||
<script type="text/javascript" src="../../javascripts/lib/ep_etherpad-lite/static/js/timeslider.js?callback=require.define&v=<%=settings.randomVersionString%>"></script>
|
<script type="text/javascript" src="../../javascripts/lib/static/js/timeslider.js?callback=require.define&v=<%=settings.randomVersionString%>"></script>
|
||||||
<script type="text/javascript" src="../../javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define&v=<%=settings.randomVersionString%>"></script>
|
<script type="text/javascript" src="../../javascripts/lib/static/js/ace2_common.js?callback=require.define&v=<%=settings.randomVersionString%>"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="../../static/skins/<%=encodeURI(settings.skinName)%>/timeslider.js?v=<%=settings.randomVersionString%>"></script>
|
<script type="text/javascript" src="../../static/skins/<%=encodeURI(settings.skinName)%>/timeslider.js?v=<%=settings.randomVersionString%>"></script>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<system.webServer>
|
<system.webServer>
|
||||||
|
|
||||||
<handlers>
|
<handlers>
|
||||||
<add name="iisnode" path="node_modules/ep_etherpad-lite/node/server.js" verb="*" modules="iisnode" />
|
<add name="iisnode" path="src/node/server.js" verb="*" modules="iisnode" />
|
||||||
</handlers>
|
</handlers>
|
||||||
|
|
||||||
<rewrite>
|
<rewrite>
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
<!-- uncomment this section to enable debugging
|
<!-- uncomment this section to enable debugging
|
||||||
<rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
|
<rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
|
||||||
<match url="iisnode"/>
|
<match url="iisnode"/>
|
||||||
<action type="Rewrite" url="node_modules/ep_etherpad-lite/node/iisnode" />
|
<action type="Rewrite" url="src/node/iisnode" />
|
||||||
</rule>
|
</rule>
|
||||||
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
|
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
|
||||||
<match url="^server.js\/debug[\/]?" />
|
<match url="^server.js\/debug[\/]?" />
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<conditions>
|
<conditions>
|
||||||
<add input="{{REQUEST_FILENAME}}" matchType="IsFile" negate="True"/>
|
<add input="{{REQUEST_FILENAME}}" matchType="IsFile" negate="True"/>
|
||||||
</conditions>
|
</conditions>
|
||||||
<action type="Rewrite" url="node_modules/ep_etherpad-lite/node/server.js" />
|
<action type="Rewrite" url="src/node/server.js" />
|
||||||
</rule>
|
</rule>
|
||||||
</rules>
|
</rules>
|
||||||
</rewrite>
|
</rewrite>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const apiHandler = require('ep_etherpad-lite/node/handler/APIHandler');
|
const apiHandler = require('../../src/node/handler/APIHandler');
|
||||||
const log4js = require('ep_etherpad-lite/node_modules/log4js');
|
const log4js = require('log4js');
|
||||||
const process = require('process');
|
const process = require('process');
|
||||||
const server = require('ep_etherpad-lite/node/server');
|
const server = require('../../src/node/server');
|
||||||
const settings = require('ep_etherpad-lite/node/utils/Settings');
|
const settings = require('../../src/node/utils/Settings');
|
||||||
const supertest = require('ep_etherpad-lite/node_modules/supertest');
|
const supertest = require('supertest');
|
||||||
const webaccess = require('ep_etherpad-lite/node/hooks/express/webaccess');
|
const webaccess = require('../../src/node/hooks/express/webaccess');
|
||||||
|
|
||||||
const backups = {};
|
const backups = {};
|
||||||
let inited = false;
|
let inited = false;
|
||||||
|
|
|
@ -58,7 +58,7 @@ describe(__filename, function () {
|
||||||
|
|
||||||
describe('setHTML', function () {
|
describe('setHTML', function () {
|
||||||
it('Sets the HTML of a Pad attempting to weird utf8 encoded content', function (done) {
|
it('Sets the HTML of a Pad attempting to weird utf8 encoded content', function (done) {
|
||||||
fs.readFile('../tests/backend/specs/api/emojis.html', 'utf8', (err, html) => {
|
fs.readFile('tests/backend/specs/api/emojis.html', 'utf8', (err, html) => {
|
||||||
api.post(endPoint('setHTML'))
|
api.post(endPoint('setHTML'))
|
||||||
.send({
|
.send({
|
||||||
padID: testPadId,
|
padID: testPadId,
|
||||||
|
|
|
@ -12,12 +12,12 @@ const settings = require(`${__dirname}/../../../../src/node/utils/Settings`);
|
||||||
const padManager = require(`${__dirname}/../../../../src/node/db/PadManager`);
|
const padManager = require(`${__dirname}/../../../../src/node/db/PadManager`);
|
||||||
const plugins = require(`${__dirname}/../../../../src/static/js/pluginfw/plugin_defs`);
|
const plugins = require(`${__dirname}/../../../../src/static/js/pluginfw/plugin_defs`);
|
||||||
|
|
||||||
const padText = fs.readFileSync('../tests/backend/specs/api/test.txt');
|
const padText = fs.readFileSync('tests/backend/specs/api/test.txt');
|
||||||
const etherpadDoc = fs.readFileSync('../tests/backend/specs/api/test.etherpad');
|
const etherpadDoc = fs.readFileSync('tests/backend/specs/api/test.etherpad');
|
||||||
const wordDoc = fs.readFileSync('../tests/backend/specs/api/test.doc');
|
const wordDoc = fs.readFileSync('tests/backend/specs/api/test.doc');
|
||||||
const wordXDoc = fs.readFileSync('../tests/backend/specs/api/test.docx');
|
const wordXDoc = fs.readFileSync('tests/backend/specs/api/test.docx');
|
||||||
const odtDoc = fs.readFileSync('../tests/backend/specs/api/test.odt');
|
const odtDoc = fs.readFileSync('tests/backend/specs/api/test.odt');
|
||||||
const pdfDoc = fs.readFileSync('../tests/backend/specs/api/test.pdf');
|
const pdfDoc = fs.readFileSync('tests/backend/specs/api/test.pdf');
|
||||||
|
|
||||||
let agent;
|
let agent;
|
||||||
const apiKey = common.apiKey;
|
const apiKey = common.apiKey;
|
||||||
|
|
|
@ -46,10 +46,10 @@ describe(__filename, function () {
|
||||||
const backups = {};
|
const backups = {};
|
||||||
const fantasyEncoding = 'brainwaves'; // non-working encoding until https://github.com/visionmedia/superagent/pull/1560 is resolved
|
const fantasyEncoding = 'brainwaves'; // non-working encoding until https://github.com/visionmedia/superagent/pull/1560 is resolved
|
||||||
const packages = [
|
const packages = [
|
||||||
'/javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define',
|
'/javascripts/lib/static/js/ace2_common.js?callback=require.define',
|
||||||
'/javascripts/lib/ep_etherpad-lite/static/js/ace2_inner.js?callback=require.define',
|
'/javascripts/lib/static/js/ace2_inner.js?callback=require.define',
|
||||||
'/javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define',
|
'/javascripts/lib/static/js/pad.js?callback=require.define',
|
||||||
'/javascripts/lib/ep_etherpad-lite/static/js/timeslider.js?callback=require.define',
|
'/javascripts/lib/static/js/timeslider.js?callback=require.define',
|
||||||
];
|
];
|
||||||
|
|
||||||
before(async function () {
|
before(async function () {
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
const assert = require('assert').strict;
|
const assert = require('assert').strict;
|
||||||
const common = require('../common');
|
const common = require('../common');
|
||||||
const io = require('ep_etherpad-lite/node_modules/socket.io-client');
|
const io = require('socket.io-client');
|
||||||
const padManager = require('ep_etherpad-lite/node/db/PadManager');
|
const padManager = require('../../../src/node/db/PadManager');
|
||||||
const plugins = require('ep_etherpad-lite/static/js/pluginfw/plugin_defs');
|
const plugins = require('../../../src/static/js/pluginfw/plugin_defs');
|
||||||
const setCookieParser = require('ep_etherpad-lite/node_modules/set-cookie-parser');
|
const setCookieParser = require('set-cookie-parser');
|
||||||
const settings = require('ep_etherpad-lite/node/utils/Settings');
|
const settings = require('../../../src/node/utils/Settings');
|
||||||
|
|
||||||
const logger = common.logger;
|
const logger = common.logger;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const common = require('../common');
|
const common = require('../common');
|
||||||
const settings = require('ep_etherpad-lite/node/utils/Settings');
|
const settings = require('../../../src/node/utils/Settings');
|
||||||
|
|
||||||
describe(__filename, function () {
|
describe(__filename, function () {
|
||||||
let agent;
|
let agent;
|
||||||
|
|
|
@ -15,7 +15,7 @@ MY_DIR=$(try cd "${0%/*}" && try pwd) || exit 1
|
||||||
try cd "${MY_DIR}/../../../"
|
try cd "${MY_DIR}/../../../"
|
||||||
|
|
||||||
log "Assuming bin/installDeps.sh has already been run"
|
log "Assuming bin/installDeps.sh has already been run"
|
||||||
node node_modules/ep_etherpad-lite/node/server.js --experimental-worker "${@}" &
|
node src/node/server.js --experimental-worker "${@}" &
|
||||||
ep_pid=$!
|
ep_pid=$!
|
||||||
|
|
||||||
log "Waiting for Etherpad to accept connections (http://localhost:9001)..."
|
log "Waiting for Etherpad to accept connections (http://localhost:9001)..."
|
||||||
|
|
|
@ -21,7 +21,7 @@ s!"loglevel":[^,]*!"loglevel": "WARN"!
|
||||||
' settings.json.template >settings.json
|
' settings.json.template >settings.json
|
||||||
|
|
||||||
log "Assuming bin/installDeps.sh has already been run"
|
log "Assuming bin/installDeps.sh has already been run"
|
||||||
node node_modules/ep_etherpad-lite/node/server.js "${@}" &
|
node src/node/server.js "${@}" &
|
||||||
ep_pid=$!
|
ep_pid=$!
|
||||||
|
|
||||||
log "Waiting for Etherpad to accept connections (http://localhost:9001)..."
|
log "Waiting for Etherpad to accept connections (http://localhost:9001)..."
|
||||||
|
|
|
@ -18,7 +18,7 @@ s!"points":[^,]*!"points": 1000!
|
||||||
' settings.json.template >settings.json
|
' settings.json.template >settings.json
|
||||||
|
|
||||||
log "Assuming bin/installDeps.sh has already been run"
|
log "Assuming bin/installDeps.sh has already been run"
|
||||||
node node_modules/ep_etherpad-lite/node/server.js "${@}" >/dev/null &
|
node src/node/server.js "${@}" >/dev/null &
|
||||||
ep_pid=$!
|
ep_pid=$!
|
||||||
|
|
||||||
log "Waiting for Etherpad to accept connections (http://localhost:9001)..."
|
log "Waiting for Etherpad to accept connections (http://localhost:9001)..."
|
||||||
|
|
Loading…
Reference in a new issue