Skip to content

Commit 4d25fd2

Browse files
committed
a bit simplify wrappedCode
1 parent f7c1f35 commit 4d25fd2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/cubejs-schema-compiler/src/compiler/DataSchemaCompiler.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,11 +649,9 @@ export class DataSchemaCompiler {
649649
// avoid polluting and modifying the global scope,
650650
// and to provide a controlled environment for the code execution.
651651
const wrappedCode = `
652-
(function(globals) {
653-
"use strict";
654-
const { view, cube, context, addExport, setExport, asyncModule, require, COMPILE_CONTEXT } = globals;
652+
(function() {
655653
${file.content}
656-
})(sandboxLocals);
654+
})();
657655
`;
658656

659657
const script = new vm.Script(wrappedCode, { filename: file.fileName });

0 commit comments

Comments
 (0)