@stacksjs/buddy 0.70.185 → 0.70.187
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/deploy.js +2 -2
- package/package.json +1 -1
package/dist/commands/deploy.js
CHANGED
|
@@ -997,14 +997,14 @@ if [ -n "$FWD_B64" ] && [ -x /usr/local/bin/bun ]; then
|
|
|
997
997
|
# while forwards.json sat untouched.
|
|
998
998
|
/usr/local/bin/bun --bun -e '
|
|
999
999
|
const fs=require("fs"); const f="/opt/mail/forwards.json";
|
|
1000
|
-
|
|
1000
|
+
let cur={}; try{cur=JSON.parse(fs.readFileSync(f,"utf8"))}catch{}
|
|
1001
1001
|
const add=JSON.parse(fs.readFileSync("/tmp/.mailtenant-fwd.json","utf8"));
|
|
1002
1002
|
const readme=fs.readFileSync("/tmp/.mailtenant-readme.txt","utf8");
|
|
1003
1003
|
const merged={...cur}; delete merged._readme;
|
|
1004
1004
|
for(const [k,v] of Object.entries(add)) merged[k]=v;
|
|
1005
1005
|
const out={_readme:readme,...merged};
|
|
1006
1006
|
const s=JSON.stringify(out,null,2)+"\\n";
|
|
1007
|
-
|
|
1007
|
+
let prev=""; try{prev=fs.readFileSync(f,"utf8")}catch{}
|
|
1008
1008
|
if(s!==prev){ fs.writeFileSync(f,s); process.stdout.write("FWDCHANGED"); }
|
|
1009
1009
|
' > /tmp/.mailtenant-res 2>/tmp/.mailtenant-err || true
|
|
1010
1010
|
# A merge that failed is worth one line, not silence: the rules decide where
|