0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00
Commit Graph

323 Commits

Author SHA1 Message Date
G.Ambatte
5e35ae0c8b Merge branch 'master' into addDBCheckMiddleware 2025-10-06 18:12:40 +13:00
Trevor Buckner
63bebe1efd Lint everything
Catching up on a bunch of linting so random changes stop showing up on PRs when the linter is run.
2025-10-06 00:02:24 -04:00
G.Ambatte
f141c0bebd Move dbCheck to only API calls that touch the database 2025-10-02 19:28:10 +13:00
Trevor Buckner
990bf80b59 Comment out patch contents from logs
patch contents on failed patches clogging logs with pages and pages of text
2025-07-22 14:45:57 -04:00
Trevor Buckner
f16598f238 Fix Google ID Validation Regex
Google IDs with underscores were failing.

Regex found in Google drive documentation: https://developers.google.com/workspace/docs/api/concepts/document
2025-07-22 14:39:09 -04:00
G.Ambatte
b87c78474d Fix for diff patching using encodeURI 2025-07-19 14:49:02 +12:00
G.Ambatte
973e071e93 Slightly loosen Google ID match criteria, add comments 2025-07-15 08:13:35 +12:00
G.Ambatte
a7a8803e9d Merge branch 'master' into experimentalIDValidations 2025-07-13 20:52:52 +12:00
Trevor Buckner
9da8a17053 Remove text mismatch logs 2025-07-10 17:17:25 -04:00
Trevor Buckner
7cadbfbd7b allowExceedingIndices for our patch applier
Test if it allows patches to go through, and log error if it doesn't match the expected output.
2025-07-10 17:11:31 -04:00
Trevor Buckner
489b4b2694 Also log differences on MD5 mismatch 2025-07-10 12:04:09 -04:00
Trevor Buckner
8d279260c2 Merge branch 'master' into AdditionalPatchLogging 2025-07-10 11:19:07 -04:00
Trevor Buckner
c5805af935 On patch failure, compare client and server text bytewise 2025-07-10 11:12:42 -04:00
Trevor Buckner
b2c4bb7082 Merge branch 'master' into experimentalSplitHashAndVersionChecks 2025-07-10 11:06:29 -04:00
David Bolack
c7610cf0f8 Run patch processing in parallel to prior system to attempt to narrow down not-quite-so-edge cases that did not come up prior to user testing. 2025-07-10 07:10:13 -05:00
G.Ambatte
bc82afa5b2 Split version from hash checks 2025-07-10 21:42:51 +12:00
G.Ambatte
abef250631 Update ID validation check 2025-07-10 20:58:46 +12:00
G.Ambatte
25f25da499 Adjust validation regex for IDs 2025-07-10 20:39:12 +12:00
G.Ambatte
aa15bdaacb Initial pass at ID validations 2025-07-10 19:59:09 +12:00
Trevor Buckner
7ba7991631 Additional diff server error logging 2025-07-10 00:37:03 -04:00
Trevor Buckner
daf4eceedd Small rearrangement 2025-07-09 22:09:16 -04:00
David Bolack
a02361ee65 Move normalization to before diffing 2025-07-09 19:37:57 -05:00
David Bolack
81e20f032e NOrmalize strings before rnuning MD5s 2025-07-09 18:52:45 -05:00
David Bolack
0f4157d084 Add Patch wrapper/unwrapper for saves
Object encapsulation for the win?
2025-07-09 17:16:47 -05:00
Trevor Buckner
6414e73e7d Cleanup and better handling of pre-save snapshot 2025-07-08 15:50:27 -04:00
Trevor Buckner
41daf8d172 comment out hash check 2025-07-07 21:05:50 +00:00
Trevor Buckner
4c897fdeb5 Add MD5 hash check 2025-07-07 21:00:03 +00:00
Trevor Buckner
e1e661976d Initial test 2025-06-27 08:07:02 -04:00
Trevor Buckner
862fa7de89 Don't send full text back to client on save
We return the stub after saving. When saving to HB MongoDB, the stub also includes the full text. This does not need to be sent back to the client.
2025-06-24 17:44:22 -04:00
Víctor Losada Hernández
9c1a0fd798 Merge branch 'master' into addLockRoutes-#3326 2025-04-10 13:46:15 +02:00
David Bolack
c6cd6e9864 A little bit of cleanup and structure flattening
Fixes failed tests.
2025-04-08 20:29:32 -05:00
G.Ambatte
be2f1786b5 Add authors to locked brew error message 2025-04-09 09:59:34 +12:00
David Bolack
d0c3765f8f Move Snippets store to metadata block.
Note this still stores the snippets as a string for the passed about brew object.
2025-04-07 23:22:47 -05:00
G.Ambatte
1ded1cad5a Change accessType check 2025-04-08 09:28:54 +12:00
G.Ambatte
7765cb31bf Merge branch 'master' into addLockRoutes-#3326 2025-03-27 17:43:21 +13:00
David Bolack
2f95cc5f45 Merge branch 'master' into localSnippetEditor 2025-03-24 15:10:25 -05:00
Víctor Losada Hernández
f076e05f49 js files 2025-03-18 19:46:11 +01:00
David Bolack
ab6c1ae402 Merge branch 'master' into localSnippetEditor 2025-03-14 17:44:32 -05:00
Trevor Buckner
94f478477d Add test for missing meta:theme tag 2025-02-13 16:20:50 -05:00
Trevor Buckner
d8d672fada Error message if chosen theme does not have "meta:theme" tag. 2025-02-13 15:51:06 -05:00
Trevor Buckner
c080e5b191 Add author to snippetBundle 2025-02-10 22:20:12 -05:00
David Bolack
74122d9057 Display name of write in theme next to write-in
Clear user's active ThemeBundle when an incomplete/broken/invalid writein.

Needs theming help.
2025-01-07 22:11:01 -06:00
David Bolack
9745daf6e2 Merge branch 'master' into writeinBrewTheme 2024-12-20 15:19:06 -06:00
David Bolack
5f54777663 Merge branch 'master' into localSnippetEditor 2024-12-20 15:18:25 -06:00
Trevor Buckner
57467701d0 Fetch Google Brew if only stub requested but nothing found
/update/ requests only the stub for updating. But if no stub exists, we should fetch the full brew so we return *something*.
2024-12-18 23:00:01 -05:00
Trevor Buckner
5f14f656ef Logging 2024-12-18 17:23:38 -05:00
Trevor Buckner
6e8a0d7314 current user owns 0-author brew only if edit mode
Previous code was treating /share/ visits to google brews with no stub as visits by owner, thus using their own credentials to open the file instead of serviceaccount
2024-12-18 17:07:09 -05:00
Trevor Buckner
e61144beb8 Mark as owner if stub doesn't exist
Old Google Drive files without a stub have no author, so if no stub exists, consider the current user the owner.
2024-12-18 13:45:53 -05:00
Trevor Buckner
64b792c645 Fix case where no stub is found
When retrieving a Google Brew with no stub yet, if the user is not logged in or has expired credentials, we enter this error handler. However, the error message itself tries to send a list of authors.

If there was no stub, we crash here with a 500 error.

This adds conditional operator to any stub value so we can send the actual "not logged in" error in case of no stub.
2024-12-18 13:02:14 -05:00
Víctor Losada Hernández
99f2972079 fixes as asked 2024-12-14 23:34:12 +01:00