Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.builder = rebuildSolidsInWorker(script, fullurl, parameters, (err, objects) => {
if (err && that.opts.useSync) {
this.builder = rebuildSolids(script, fullurl, parameters, callback, options)
} else (callback(undefined, objects))
}, options)
} else if (this.opts.useSync) {
//only add this wrapper if not already present & we are not in command-line mode
if(typeof wrappedMain === 'undefined' && typeof getParameterValuesFromParameters !== 'undefined'){
const wrappedMain = main
main = function(){
var paramsDefinition = (typeof getParameterDefinitions !== 'undefined') ? getParameterDefinitions : undefined
return wrappedMain(getParameterValuesFromParameters(paramsDefinition, ${JSON.stringify(params)}))
}
}
`
source = (inputFormat === 'jscad' || inputFormat === 'js') ? `${source}
${mainFunction}` : source
if (outputFormat === 'jscad' || outputFormat === 'js') {
resolve(source)
} else {
rebuildSolids(source, inputPath, params, callback, {implicitGlobals, globals, includeResolver: resolveIncludesFs})
}
})
.then(function (objects) {