@low-systems/javascript-renderer
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -6,3 +6,3 @@ import { Renderer, RenderConfig, Context, IMap } from 'low'; | ||
registerFunctions(): void; | ||
core(func: Function, context: Context): Promise<any>; | ||
core(func: Function, context: Context, metadata: any): Promise<any>; | ||
getTemplate(config: RenderConfig<JavascriptTemplate>, context: Context): Promise<any>; | ||
@@ -9,0 +9,0 @@ makeFunction(code: string): Function; |
@@ -31,6 +31,6 @@ "use strict"; | ||
} | ||
core(func, context) { | ||
core(func, context, metadata) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
try { | ||
const output = yield func.call(context); | ||
const output = yield func.call(context, metadata); | ||
return output; | ||
@@ -71,3 +71,3 @@ } | ||
});`; | ||
const func = new Function(promise); | ||
const func = new Function('metadata', promise); | ||
return func; | ||
@@ -74,0 +74,0 @@ } |
{ | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"main": "lib/javascript-renderer.js", | ||
@@ -15,3 +15,3 @@ "types": "lib/javascript-renderer.d.ts", | ||
"dependencies": { | ||
"low": "^1.1.6" | ||
"low": "^1.1.8" | ||
}, | ||
@@ -29,3 +29,3 @@ "name": "@low-systems/javascript-renderer", | ||
}, | ||
"gitHead": "9dcec61c589834fb53d7c0aad8a8b38831014df3", | ||
"gitHead": "a214409fa03eb1cf859b8bac2146a1c0915f568a", | ||
"devDependencies": { | ||
@@ -32,0 +32,0 @@ "@types/jest": "^24.9.0", |
@@ -19,5 +19,5 @@ import { Renderer, RenderConfig, Context, IMap } from 'low'; | ||
async core(func: Function, context: Context): Promise<any> { | ||
async core(func: Function, context: Context, metadata: any): Promise<any> { | ||
try { | ||
const output = await func.call(context); | ||
const output = await func.call(context, metadata); | ||
return output; | ||
@@ -57,3 +57,3 @@ } catch(err) { | ||
});`; | ||
const func = new Function(promise); | ||
const func = new Function('metadata', promise); | ||
return func; | ||
@@ -60,0 +60,0 @@ } |
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
17349
Updatedlow@^1.1.8