-
Notifications
You must be signed in to change notification settings - Fork 3.5k
v0.5.111: non-polling webhook execs off trigger.dev, gmail subject headers, webhook trigger configs #3530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
v0.5.111: non-polling webhook execs off trigger.dev, gmail subject headers, webhook trigger configs #3530
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
37d524b
fix(gmail): RFC 2047 encode subject headers for non-ASCII characters …
waleedlatif1 d5502d6
feat(webhooks): dedup and custom ack configuration (#3525)
icecrasher321 68d207d
improvement(webhooks): move non-polling executions off trigger.dev (#…
icecrasher321 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
fix(gmail): RFC 2047 encode subject headers for non-ASCII characters (#…
…3526) * fix(gmail): RFC 2047 encode subject headers for non-ASCII characters * Fix RFC 2047 encoded word length limit Split long email subjects into multiple RFC 2047 encoded words to comply with the 75-character limit per RFC 2047 Section 2. Each encoded word now contains at most 45 bytes of UTF-8 content (producing max 60 chars of base64 + 12 chars overhead = 72 total). Multiple encoded words are separated by CRLF + space (folding whitespace). Applied via @cursor push command * fix(gmail): split RFC 2047 encoded words on character boundaries * fix(gmail): simplify RFC 2047 encoding to match Google's own sample --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
- Loading branch information
commit 37d524bb0adce198d36ff589d0e330583e108b6d
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /** | ||
| * @vitest-environment node | ||
| */ | ||
| import { describe, expect, it } from 'vitest' | ||
| import { encodeRfc2047 } from './utils' | ||
|
|
||
| describe('encodeRfc2047', () => { | ||
| it('returns ASCII text unchanged', () => { | ||
| expect(encodeRfc2047('Simple ASCII Subject')).toBe('Simple ASCII Subject') | ||
| }) | ||
|
|
||
| it('returns empty string unchanged', () => { | ||
| expect(encodeRfc2047('')).toBe('') | ||
| }) | ||
|
|
||
| it('encodes emojis as RFC 2047 base64', () => { | ||
| const result = encodeRfc2047('Time to Stretch! 🧘') | ||
| expect(result).toBe('=?UTF-8?B?VGltZSB0byBTdHJldGNoISDwn6eY?=') | ||
| }) | ||
|
|
||
| it('round-trips non-ASCII subjects correctly', () => { | ||
| const subjects = ['Hello 世界', 'Café résumé', '🎉🎊🎈 Party!', '今週のミーティング'] | ||
| for (const subject of subjects) { | ||
| const encoded = encodeRfc2047(subject) | ||
| const match = encoded.match(/^=\?UTF-8\?B\?(.+)\?=$/) | ||
| expect(match).not.toBeNull() | ||
| const decoded = Buffer.from(match![1], 'base64').toString('utf-8') | ||
| expect(decoded).toBe(subject) | ||
| } | ||
| }) | ||
|
|
||
| it('does not double-encode already-encoded subjects', () => { | ||
| const alreadyEncoded = '=?UTF-8?B?VGltZSB0byBTdHJldGNoISDwn6eY?=' | ||
| expect(encodeRfc2047(alreadyEncoded)).toBe(alreadyEncoded) | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.