ReviewOS

also looking at this

stacks/rpx

feat: imgx integration — on-the-fly image transforms from query params

#2264
Merged glennmichael123 wants to merge feat/imgx-integration into main
15 files +1118 -16
packages/rpx/src/daemon-runner.tsmodified+4-1
Changes to packages/rpx/src/daemon-runner.ts
@@ -10,7 +10,7 @@
1010 *
1111 * The daemon's PID-GC reaps anything we miss if this process dies `kill -9`.
1212 */
13import type { LoadBalancerConfig, PathRewrite, ProxyFrom, StaticRouteConfig } from './types'
13import type { ImgxOptions, LoadBalancerConfig, PathRewrite, ProxyFrom, StaticRouteConfig } from './types'
1414import * as fs from 'node:fs'
1515import * as path from 'node:path'
1616import * as process from 'node:process'
@@ -36,6 +36,8 @@ export interface DaemonRunnerProxy {
3636 path?: string
3737 cleanUrls?: boolean
3838 changeOrigin?: boolean
39 /** Transform image responses from imgix-style query params — see {@link ImgxOptions}. */
40 imgx?: boolean | ImgxOptions
3941 pathRewrites?: PathRewrite[]
4042 /** Serve a local directory for this route instead of proxying. */
4143 static?: string | StaticRouteConfig
@@ -118,6 +120,7 @@ export async function runViaDaemon(opts: DaemonRunnerOptions): Promise<void> {
118120 createdAt,
119121 cleanUrls: p.cleanUrls,
120122 changeOrigin: p.changeOrigin,
123 imgx: p.imgx,
121124 pathRewrites: p.pathRewrites,
122125 static: p.static,
123126 loadBalancer: p.loadBalancer,