MCPcopy Create free account
hub / github.com/Sjj1024/PakePlus-Win7 / updateMainJs

Function updateMainJs

scripts/ppworker.cjs:86–99  ·  view source on GitHub ↗
(password)

Source from the content-addressed store, hash-verified

84
85// update main.js defaultExitPassword
86const updateMainJs = async (password) => {
87 const mainJs = await fs.readFile(
88 path.join(__dirname, '../', 'main.js'),
89 'utf8'
90 )
91 console.log('mainJs:', mainJs)
92 const newMainJs = mainJs.replace(
93 /const defaultExitPassword = '.*?'/,
94 `const defaultExitPassword = '${password}'`
95 )
96 console.log('newMainJs:', newMainJs)
97 await fs.writeFile(path.join(__dirname, '../', 'main.js'), newMainJs)
98 console.log('main.js updated')
99}
100
101// 给图片添加圆角并添加 padding
102const createIcon = async (inputPath, tempOutputPath, icnsOutputPath) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected