decoupled protected session holder from presentation stuff and similar things

This commit is contained in:
azivner
2018-03-25 21:16:57 -04:00
parent 47eb1e3e02
commit ac1b06967f
12 changed files with 130 additions and 99 deletions

View File

@@ -0,0 +1,13 @@
import ScriptContext from "./script_context";
async function executeBundle(bundle) {
const apiContext = ScriptContext(bundle.note, bundle.allNotes);
return await (function () {
return eval(`const apiContext = this; (async function() { ${bundle.script}\r\n})()`);
}.call(apiContext));
}
export default {
executeBundle
}