Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async compile(ksyCode: string) {
this.ksyCode = ksyCode;
this.ksy = YAML.parse(ksyCode);
var releaseCode = await this.compiler.compile("javascript", this.ksy, null, false);
var debugCode = await this.compiler.compile("javascript", this.ksy, null, true);
var debugCodeAll = this.jsCode = Object.values(debugCode).join("\n");
this.classes = {};
var self = this;
function define(name: string, deps: string[], callback: () => any) {
self.classes[name] = callback();
self.mainClassName = name;
}
define["amd"] = true;
eval(debugCodeAll);
console.log("compileKsy", this.mainClassName, this.classes);