drop replify integration

pull/1/head
ansuz 5 years ago
parent cffb0da833
commit 4c51d464fd

@ -359,14 +359,6 @@ module.exports = {
*/
logFeedback: false,
/* You can get a repl for debugging the server if you want it.
* to enable this, specify the debugReplName and then you can
* connect to it with `nc -U /tmp/repl/<your name>.sock`
* If you run multiple cryptpad servers, you need to use different
* repl names.
*/
//debugReplName: "cryptpad"
/* =====================
* DEPRECATED
* ===================== */

5
package-lock.json generated

@ -1069,11 +1069,6 @@
"string_decoder": "~0.10.x"
}
},
"replify": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/replify/-/replify-1.2.0.tgz",
"integrity": "sha1-lAFm0gfRDphhT+SSU60vCsAZ9+E="
},
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",

@ -20,7 +20,6 @@
"netflux-websocket": "^0.1.20",
"nthen": "0.1.8",
"pull-stream": "^3.6.1",
"replify": "^1.2.0",
"saferphore": "0.0.1",
"sortify": "^1.0.4",
"stream-to-pull-stream": "^1.7.2",

@ -1369,7 +1369,6 @@ type NetfluxWebsocketSrvContext_t = {
*/
RPC.create = function (
config /*:Config_t*/,
debuggable /*:<T>(string, T)=>T*/,
cb /*:(?Error, ?Function)=>void*/
) {
Log = config.log;
@ -1405,8 +1404,6 @@ RPC.create = function (
console.error("Can't parse admin keys. Please update or fix your config.js file!");
}
debuggable('rpc_env', Env);
var Sessions = Env.Sessions;
var paths = Env.paths;
var pinPath = paths.pin = keyOrDefaultString('pinPath', './pins');

@ -12,25 +12,10 @@ var nThen = require("nthen");
var config = require("./lib/load-config");
// This is stuff which will become available to replify
const debuggableStore = new WeakMap();
const debuggable = function (name, x) {
if (name in debuggableStore) {
try { throw new Error(); } catch (e) {
console.error('cannot add ' + name + ' more than once [' + e.stack + ']');
}
} else {
debuggableStore[name] = x;
}
return x;
};
debuggable('global', global);
debuggable('config', config);
// support multiple storage back ends
var Storage = require(config.storage||'./storage/file');
var app = debuggable('app', Express());
var app = Express();
// mode can be FRESH (default), DEV, or PACKAGE
@ -275,7 +260,7 @@ var nt = nThen(function (w) {
if (typeof(config.rpc) !== 'string') { return; }
// load pin store...
var Rpc = require(config.rpc);
Rpc.create(config, debuggable, w(function (e, _rpc) {
Rpc.create(config, w(function (e, _rpc) {
if (e) {
w.abort();
throw e;
@ -298,7 +283,3 @@ var nt = nThen(function (w) {
var wsSrv = new WebSocketServer(wsConfig);
NetfluxSrv.run(wsSrv, config, historyKeeper);
});
if (config.debugReplName) {
require('replify')({ name: config.debugReplName, app: debuggableStore });
}

Loading…
Cancel
Save