2020-07-21 13:20:51 +00:00
|
|
|
import { HomeDBManager } from 'app/gen-server/lib/HomeDBManager';
|
|
|
|
import { ActiveDoc } from 'app/server/lib/ActiveDoc';
|
|
|
|
import { DocManager } from 'app/server/lib/DocManager';
|
|
|
|
import { ICreate } from 'app/server/lib/ICreate';
|
|
|
|
import { LoginSession } from 'app/server/lib/LoginSession';
|
2020-07-23 20:04:40 +00:00
|
|
|
import { NSandboxCreator } from 'app/server/lib/NSandbox';
|
|
|
|
|
|
|
|
// Use raw python - update when pynbox or other solution is set up for core.
|
|
|
|
const sandboxCreator = new NSandboxCreator('unsandboxed');
|
2020-07-21 13:20:51 +00:00
|
|
|
|
|
|
|
export const create: ICreate = {
|
|
|
|
LoginSession() {
|
|
|
|
return new LoginSession();
|
|
|
|
},
|
|
|
|
Billing(dbManager: HomeDBManager) {
|
|
|
|
return {
|
|
|
|
addEndpoints(app: any) { /* do nothing */ },
|
|
|
|
addEventHandlers() { /* do nothing */ },
|
|
|
|
addWebhooks(app: any) { /* do nothing */ }
|
|
|
|
};
|
|
|
|
},
|
2020-10-06 21:32:56 +00:00
|
|
|
Notifier() {
|
2020-07-21 13:20:51 +00:00
|
|
|
return {
|
|
|
|
get testPending() { return false; }
|
|
|
|
};
|
|
|
|
},
|
|
|
|
Shell() {
|
|
|
|
return {
|
|
|
|
moveItemToTrash() { throw new Error('moveToTrash unavailable'); },
|
|
|
|
showItemInFolder() { throw new Error('showItemInFolder unavailable'); }
|
|
|
|
};
|
|
|
|
},
|
|
|
|
ExternalStorage() { return undefined; },
|
|
|
|
ActiveDoc(docManager, docName) { return new ActiveDoc(docManager, docName); },
|
|
|
|
DocManager(storageManager, pluginManager, homeDBManager, gristServer) {
|
|
|
|
return new DocManager(storageManager, pluginManager, homeDBManager, gristServer);
|
|
|
|
},
|
|
|
|
NSandbox(options) {
|
2020-07-23 20:04:40 +00:00
|
|
|
return sandboxCreator.create(options);
|
2020-07-21 13:20:51 +00:00
|
|
|
},
|
|
|
|
sessionSecret() {
|
|
|
|
return process.env.GRIST_SESSION_SECRET ||
|
|
|
|
'Phoo2ag1jaiz6Moo2Iese2xoaphahbai3oNg7diemohlah0ohtae9iengafieS2Hae7quungoCi9iaPh';
|
2020-10-30 16:53:23 +00:00
|
|
|
},
|
|
|
|
configurationOptions() {
|
|
|
|
return {};
|
2020-07-21 13:20:51 +00:00
|
|
|
}
|
|
|
|
};
|