Merge branch 'staging' into plugins

This commit is contained in:
yflory 2024-06-21 17:02:41 +02:00
commit 2527d11649
28 changed files with 8 additions and 46 deletions

View File

@ -49,13 +49,10 @@ module.exports = {
// TODO remove these exceptions from the eslint defaults
'no-irregular-whitespace': ['off'],
'no-unused-vars': ['warn'],
'no-self-assign': ['off'],
'no-empty': ['off'],
'no-useless-escape': ['off'],
'no-redeclare': ['off'],
'no-extra-boolean-cast': ['off'],
'no-global-assign': ['off'],
'no-prototype-builtins': ['off'],
}
};

View File

@ -2,8 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals module */
/* DISCLAIMER:
There are two recommended methods of running a CryptPad instance:

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals Buffer */
const B32 = require("thirty-two");
const OTP = require("notp");
const nThen = require("nthen");

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals process */
const nThen = require("nthen");
const getFolderSize = require("get-folder-size");
const Util = require("../common-util");

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals Buffer*/
const Block = module.exports;
const Nacl = require("tweetnacl/nacl-fast");
const nThen = require("nthen");

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals process */
const Core = module.exports;
const Util = require("../common-util");
const escapeKeyCharacters = Util.escapeKeyCharacters;

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals Buffer*/
const Quota = module.exports;
//const Util = require("../common-util");

View File

@ -169,6 +169,7 @@ var isInteger = function (n) {
var args_isString = function (args) {
return !(!Array.isArray(args) || !isString(args[0]));
};
var args_isInteger = function (args) {
return !(!Array.isArray(args) || !isInteger(args[0]));
};
@ -211,10 +212,6 @@ commands.SET_ARCHIVE_RETENTION_TIME = makeIntegerSetter('archiveRetentionTime');
// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_ACCOUNT_RETENTION_TIME', [365]]], console.log)
commands.SET_ACCOUNT_RETENTION_TIME = makeIntegerSetter('accountRetentionTime');
var args_isString = function (args) {
return Array.isArray(args) && typeof(args[0]) === "string";
};
// CryptPad_AsyncStore.rpc.send('ADMIN', [ 'ADMIN_DECREE', ['SET_ADMIN_EMAIL', ['admin@website.tld']]], console.log)
commands.SET_ADMIN_EMAIL = makeGenericSetter('adminEmail', args_isString);

View File

@ -2,8 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals process */
const { existsSync, readdirSync } = require('node:fs');
const Crypto = require('crypto');

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* global Buffer */
var HK = module.exports;
const nThen = require('nthen');

View File

@ -39,8 +39,6 @@ var handlers = {};
handlers[level] = function (ctx, content) { console.error(content); };
});
var noop = function () {};
var createLogType = function (ctx, type) {
if (logLevels.indexOf(type) < logLevels.indexOf(ctx.logLevel)) {
return noop;

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals Buffer */
var Fs = require("fs");
var Fse = require("fs-extra");
var Path = require("path");

View File

@ -3,7 +3,6 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
/*@flow*/
/* globals Buffer */
var Fs = require("fs");
var Fse = require("fs-extra");
var Path = require("path");

View File

@ -2,8 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* global Buffer */
const ToPull = require('stream-to-pull-stream');
const Pull = require('pull-stream');

View File

@ -2,8 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals process, Buffer */
const HK = require("../hk-util");
const Store = require("../storage/file");
const BlobStore = require("../storage/blob");

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* global process */
const Util = require("../common-util");
const nThen = require('nthen');
const OS = require("os");

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* global process */
var WebDriver = require("selenium-webdriver");
var nThen = require('nthen');

View File

@ -2,8 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals process */
var Fs = require("fs");
var Fse = require("fs-extra");
var Path = require("path");

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals Buffer */
var Https = require('https');
var Config = require("../lib/load-config");
var Package = require("../package.json");

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals process */
const jwt = require("jsonwebtoken");
const Sessions = require("../lib/storage/sessions.js");

View File

@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals process */
var Client = require("../../lib/client");
var Nacl = require("tweetnacl/nacl-fast");
var nThen = require("nthen");

View File

@ -2,8 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals process */
var Client = require("../../lib/client/");
var Crypto = require("../../www/components/chainpad-crypto");
var Mailbox = Crypto.Mailbox;

View File

@ -2,8 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/* globals process */
var Client = require("../../lib/client/");
var Crypto = require("../../www/components/chainpad-crypto");
var Mailbox = Crypto.Mailbox;

View File

@ -2,9 +2,6 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
/*
globals process
*/
var Express = require('express');
var Http = require('http');
var Fs = require('fs');

View File

@ -6,8 +6,8 @@
importScripts('/components/requirejs/require.js');
window = self;
localStorage = {
window = self; // eslint-disable-line no-global-assign
localStorage = { // eslint-disable-line no-global-assign
setItem: function (k, v) { localStorage[k] = v; },
getItem: function (k) { return localStorage[k]; }
};

View File

@ -6,8 +6,8 @@
importScripts('/components/requirejs/require.js');
window = self;
localStorage = {
window = self; // eslint-disable-line no-global-assign
localStorage = { // eslint-disable-line no-global-assign
setItem: function (k, v) { localStorage[k] = v; },
getItem: function (k) { return localStorage[k]; }
};

View File

@ -6,8 +6,8 @@
importScripts('/components/requirejs/require.js');
window = self;
localStorage = {
window = self; // eslint-disable-line no-global-assign
localStorage = { // eslint-disable-line no-global-assign
setItem: function (k, v) { localStorage[k] = v; },
getItem: function (k) { return localStorage[k]; }
};