MCPcopy Index your code
hub / github.com/darkreader/darkreader / fixManifest

Function fixManifest

tasks/bundle-signature.js:116–129  ·  view source on GitHub ↗
(indent, settings)

Source from the content-addressed store, hash-verified

114}
115
116async function fixManifest(indent, settings) {
117 const destDir = getDestDir({debug: false, platform: 'firefox'});
118 const realPath = `${destDir}/manifest.json`;
119 const manifest = await readJSON(realPath);
120 let string = JSON.stringify(manifest, null, indent);
121 if (settings === 1) {
122 string = string.replace('applications', 'browser_specific_settings');
123 }
124 await writeFile(realPath, string);
125 return {
126 realPath,
127 archivePath: 'manifest.json',
128 };
129}
130
131async function createHashes(signatureVersion, version, order, manifest) {
132 const types = hashTypes(signatureVersion);

Callers 1

createHashesFunction · 0.85

Calls 3

getDestDirFunction · 0.90
readJSONFunction · 0.90
writeFileFunction · 0.90

Tested by

no test coverage detected