chore: migrated settings to esm6 (#7062)

* chore: migrated settings to esm6

* chore: fixed frontends

* chore: fixed missing usage of specialpages

* chore: fixed last errors for settings

* chore: fixed favicon test
This commit is contained in:
SamTV12345 2025-08-04 22:42:50 +02:00 committed by GitHub
parent 920308a627
commit 8588d99f12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 698 additions and 562 deletions

View file

@ -18,7 +18,7 @@ import process from "node:process";
process.on('unhandledRejection', (err) => { throw err; });
const settings = require('ep_etherpad-lite/node/utils/Settings');
import settings from 'ep_etherpad-lite/node/utils/Settings';
(async () => {
axios.defaults.baseURL = `http://${settings.ip}:${settings.port}`;
const api = axios;

View file

@ -3,13 +3,13 @@
// As of v14, Node.js does not exit when there is an unhandled Promise rejection. Convert an
// unhandled rejection into an uncaught exception, which does cause Node.js to exit.
import util from "node:util";
const fs = require('fs');
import fs from 'node:fs';
import log4js from 'log4js';
import readline from 'readline';
import {Database} from "ueberdb2";
import {Database, DatabaseType} from "ueberdb2";
import process from "node:process";
const settings = require('ep_etherpad-lite/node/utils/Settings');
import settings from 'ep_etherpad-lite/node/utils/Settings';
process.on('unhandledRejection', (err) => { throw err; });
const startTime = Date.now();
@ -58,7 +58,7 @@ const unescape = (val: string) => {
json: false, // data is already json encoded
};
const db = new Database( // eslint-disable-line new-cap
settings.dbType,
settings.dbType as DatabaseType,
settings.dbSettings,
dbWrapperSettings,
log4js.getLogger('ueberDB'));

View file

@ -2,7 +2,7 @@
import {readFileSync} from 'node:fs'
import {Database, DatabaseType} from "ueberdb2";
import path from "node:path";
const settings = require('ep_etherpad-lite/node/utils/Settings');
import settings from 'ep_etherpad-lite/node/utils/Settings';
// file1 = source, file2 = target

View file

@ -1,10 +1,9 @@
'use strict';
import process from 'node:process';
import {Database} from "ueberdb2";
import {Database, DatabaseType} from "ueberdb2";
import log4js from 'log4js';
import util from 'util';
const settings = require('ep_etherpad-lite/node/utils/Settings');
import settings from 'ep_etherpad-lite/node/utils/Settings';
// As of v14, Node.js does not exit when there is an unhandled Promise rejection. Convert an
// unhandled rejection into an uncaught exception, which does cause Node.js to exit.
@ -24,7 +23,7 @@ process.on('unhandledRejection', (err) => { throw err; });
writeInterval: 0, // Write directly to the database, don't buffer
};
const db = new Database( // eslint-disable-line new-cap
settings.dbType,
settings.dbType as DatabaseType,
settings.dbSettings,
dbWrapperSettings,
log4js.getLogger('ueberDB'));

View file

@ -1,5 +1,3 @@
'use strict';
/*
This is a repair tool. It rebuilds an old pad at a new pad location up to a
known "good" revision.