Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
npm.commands.install(theme_progress_variables.answers.project_name, npm_dependencies, function (err, data) {
if (err) { console.log(err) }
// trick npm into believeing it's in the theme's folder
npm.localPrefix = path.join(process.cwd(), theme_progress_variables.answers.project_name)
// run postinstall script
npm.commands.run(['postinstall'], function (err) {
if (err) { console.log(err) }
// no need to silence npm, enable console.log
console.log = log_temp
logger.loaded()
resolve()
})
})
})
npm.load((err) => {
if (err) throw err;
npm.localPrefix = path.join(__dirname, '../..');
npm.commands.run([ 'extension:build' ], (err) => {
if (err) throw err;
const code = fs.readFileSync(`./dist/auth0-authz.extension.${EXTENSION_VERSION}.js`).toString();
async.eachSeries(containers, (container, callback) => {
const profile = Sandbox.init({
url: 'https://sandbox.it.auth0.com',
token: WEBTASK_TOKEN,
container: WEBTASK_CONTAINER
});
logger.debug(`Uploading code for ${container.name}`);
profile.create(code, {
secrets: container.env,
get: () => {
return npm.localPrefix
}
},