Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Read package manifest
let manifest = {
hasEmbeddedWebExtension: true,
permissions: {
multiprocess: false
},
...JSON.parse(Filesystem.readFileSync(Path.join(
destinationPath, 'package.json'
)))
};
// Create install manifest
return Gulp.src(sourcePath)
.pipe(GulpXmlTransformer([
{path: '//em:id', text: manifest.id},
{path: '//em:version', text: Extension.getVersion(environment)},
{path: '//em:name', text: Extension.manifest.title},
{path: '//em:description', text: Extension.manifest.description},
{path: '//em:creator', text: manifest.author},
{path: '//em:multiprocessCompatible', text: manifest.permissions.multiprocess},
{path: '//em:hasEmbeddedWebExtension', text: manifest.hasEmbeddedWebExtension},
// Firefox
{
path: (
'//em:targetApplication' +
'/rdf:Description[em:id = \'{ec8030f7-c20a-464f-9b0e-13a3a9e97384}\']' +
'/em:minVersion'