Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function getFiles() {
// Lookup for PHP bins, modules and shared libs
const files = {
...await glob('php/**', __dirname),
...await glob('lib/**', __dirname),
};
// Replace paths in php.ini file
const phpini = await FileBlob.fromStream({
stream: files['php/php.ini'].toStream(),
});
phpini.data = phpini.data
.toString()
.replace(/\/opt\/now\/modules/g, '/var/task/php/modules');
files['php/php.ini'] = phpini;
return files;
}
async function getFiles() {
// Lookup for PHP bins, modules and shared libs
const files = {
...await glob('php/**', __dirname),
...await glob('lib/**', __dirname),
};
// Replace paths in php.ini file
const phpini = await FileBlob.fromStream({
stream: files['php/php.ini'].toStream(),
});
phpini.data = phpini.data
.toString()
.replace(/\/opt\/now\/modules/g, '/var/task/php/modules');
files['php/php.ini'] = phpini;
return files;
}