tldraw/apps
David Sheldrick ee6aa172b2
Unfurl bookmarks in worker (#4039)
This PR adds a `GET /api/unfurl?url=blahblah` endpoint to our worker.

I tried out the existing cheerio implementation but it added 300kb to
our worker bundle in the end, due to transitive dependencies.

So I implemented the same logic with cloudflare's sanctioned streaming
HTML parser `HTMLRewriter` and it seems to work fine.

I also made the vscode extension do its fetching locally (from the node
process so it's not bound by security policies), retaining the cheerio
version for that. At the same time I fixed a bug in the RPC layer that
was preventing unfurled metadata from loading correctly.

In a few months we can retire the bookmark-extractor app by just
deleting it in the vercel dashboard.

### Change Type


<!--  Please select a 'Type' label ️ -->

- [ ] `feature` — New feature
- [x] `improvement` — Product improvement
- [ ] `api` — API change
- [ ] `bugfix` — Bug fix
- [ ] `other` — Changes that don't affect SDK users, e.g. internal or
.com changes


### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Do link unfurling on the same subdomain as all our other api
endpoints.
2024-07-01 14:40:03 +00:00
..
apps-script google meet: add hardware whiteboard integration (#3765) 2024-05-20 14:52:05 +00:00
bemo-worker Initial bemo worker setup (#4017) 2024-07-01 11:35:23 +00:00
docs Fix fog of war (#4031) 2024-06-28 09:04:47 +00:00
dotcom Unfurl bookmarks in worker (#4039) 2024-07-01 14:40:03 +00:00
dotcom-asset-upload Fixup staging worker deploys (#4050) 2024-07-01 14:32:14 +00:00
dotcom-worker Unfurl bookmarks in worker (#4039) 2024-07-01 14:40:03 +00:00
examples Add setDefaultValue to StyleProp (#4044) 2024-07-01 10:21:33 +00:00
health-worker main: fix health worker wrnagler names 2024-07-01 15:44:30 +01:00
huppy dx: PR labels re-revamp (#4016) 2024-06-26 11:06:15 +00:00
vscode Unfurl bookmarks in worker (#4039) 2024-07-01 14:40:03 +00:00