Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(name, options) {
super(name, options);
logger.setOptions(options)
this.type = 'js';
this.fileinfo = path.parse(this.name);
this.relativeDir = path.relative(this.options.rootDir, this.fileinfo.dir);
if (this.fileinfo.name == '__init__') {
this.pyModule = this.relativeDir.split(path.sep).join('.');
} else {
this.pyModule = path.join(this.relativeDir, this.fileinfo.name).split(path.sep).join('.');
}
this.importPath = './' + '__target__' + '/' + this.pyModule + '.js';
this.runInfoPath = this.options.rootDir + '/' + '__target__' + '/' + this.relativeDir + '/' + this.fileinfo.name + '.project';
}