Rebuild BR Issue_5048

Moves calls to compress/decompress the text/textBin document members to the hombrewery model code. Compression is done in a save().pre setup. Decompression was already handled in the static for loading a brew but the textBin member was not emptied on decompression.
This commit is contained in:
David Bolack
2026-10-13 12:16:26 -05:00
parent 3179c56263
commit c5461f2ea2
4 changed files with 88 additions and 97 deletions
+11 -4
View File
@@ -700,8 +700,16 @@ brew`);
shareId : expect.any(String),
style : undefined,
tags : [],
text : undefined,
textBin : expect.objectContaining({}),
text : '```metadata\n' +
'title: asdf\n' +
'bleedSize: {}\n' +
'safetySpace: {}\n' +
'trimSize: {}\n' +
'\n' +
'```\n' +
'\n' +
'asdf',
textBin : undefined,
theme : '5ePHB',
thumbnail : '',
title : 'asdf',
@@ -1233,8 +1241,7 @@ brew`);
expect(saveFunc).toHaveBeenCalled();
expect(saved.authors).toEqual(['test2']);
expect(saved.googleId).toEqual(undefined);
expect(saved.text).toEqual(undefined);
expect(saved.textBin).not.toEqual(undefined);
expect(saved.text).not.toEqual(undefined);
});
it('should retain google brew and update stub when multiple authors and extra author requests deletion', async ()=>{