You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.5 KiB
46 lines
1.5 KiB
import {ActiveDoc} from 'app/server/lib/ActiveDoc';
|
|
import {ICreate} from 'app/server/lib/ICreate';
|
|
import {ScopedSession} from 'app/server/lib/BrowserSession';
|
|
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({defaultFlavor: 'unsandboxed'});
|
|
|
|
export const create: ICreate = {
|
|
adjustSession(scopedSession: ScopedSession): void {
|
|
const email = process.env.GRIST_DEFAULT_EMAIL || 'anon@getgrist.com';
|
|
const profile = {email, name: email};
|
|
scopedSession.getSessionProfile = async () => profile;
|
|
},
|
|
Billing() {
|
|
return {
|
|
addEndpoints() { /* do nothing */ },
|
|
addEventHandlers() { /* do nothing */ },
|
|
addWebhooks() { /* do nothing */ }
|
|
};
|
|
},
|
|
Notifier() {
|
|
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, options) { return new ActiveDoc(docManager, docName, options); },
|
|
NSandbox(options) {
|
|
return sandboxCreator.create(options);
|
|
},
|
|
sessionSecret() {
|
|
return process.env.GRIST_SESSION_SECRET ||
|
|
'Phoo2ag1jaiz6Moo2Iese2xoaphahbai3oNg7diemohlah0ohtae9iengafieS2Hae7quungoCi9iaPh';
|
|
},
|
|
configurationOptions() {
|
|
return {};
|
|
}
|
|
};
|