
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
merlins-hat
Advanced tools
Merlin's Hat is some express middleware to quickly provide an image from a URL of an arbitrary resolution with caching. You must implement your own storage method.
There is an example at example/server.coffee.
GraphicsMagick needs to be installed. You can do this on a Mac using homebrew very easily:
brew install graphicsmagick
On Ubuntu 14.04+ you can install it like this:
sudo apt-get install graphicsmagick
The middleware expects 3 functions to be passed:
See example/server.coffee.
You need to mount the middleware on a route. Once you have done that, Merlin's Hat can be used very simply.
In this example, Merlin's Hat is mounted at /api/v1/image. The following query paramaterys are available to you:
width : The max width to resize toheight : The max height to resize toquality : From 0 to 100, what should be the quality of the resulting JPG (default: 80)url : The URL of the upstream image to download and resize.Note: one of width and height are required, but not both.
FAQs
Express middleware to resize images and cache the results
We found that merlins-hat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.