diff --git a/package.json b/package.json index 286f643..8e9c14a 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "start:server": "node server/index.js", "lint": "eslint .", "clean": "next clean", - "postinstall": "node -e \"const cp=require('node:child_process');for(const n of ['got','glob','minimatch','file-type']){const p='patches/cloudcmd-'+n+'-security.patch';const run=a=>cp.execFileSync('git',['apply',...a,p],{stdio:'ignore'});try{run(['--check']);run([]);console.log('SECURITY_BACKPORT_APPLIED',n)}catch(e){try{run(['--reverse','--check']);console.log('SECURITY_BACKPORT_VERIFIED',n)}catch(x){console.error('SECURITY_BACKPORT_MISMATCH',n);process.exit(1)}}}\"" + "postinstall": "node -e \"const fs=require('node:fs');const cp=require('node:child_process');for(const n of ['got','glob','minimatch','file-type']){const p='patches/cloudcmd-'+n+'-security.patch';const input=fs.readFileSync(p,'utf8').replace(/\\r\\n/g,'\\n');const run=a=>cp.execFileSync('git',['apply',...a,'-'],{input,stdio:['pipe','ignore','pipe']});try{run(['--check']);run([]);console.log('SECURITY_BACKPORT_APPLIED',n)}catch(e){try{run(['--reverse','--check']);console.log('SECURITY_BACKPORT_VERIFIED',n)}catch(x){console.error('SECURITY_BACKPORT_MISMATCH',n);process.exit(1)}}}\"" }, "dependencies": { "@hookform/resolvers": "^5.2.1",