Files
hyperframes/packages/cli/src/utils/studioProxyEnv.test.ts
T
Miguel Ángel 6458807066 feat(cli): let projects opt out of automatic proxying (#2591)
* feat(studio-server): serve H.264 proxies from the preview route

Wires the codec manifest and the transcoder into the preview surface: the route
negotiates a proxy via a query param and serves it through the existing range
and ETag machinery, composition HTML carries a codec map for the runtime, and
hostile assets pre-warm so a first play does not wait on a cold transcode.
Exposes the three subpath exports the CLI surfaces consume upstack.

Drops the TEMP fallow entry added with the transcoder: it has real importers now.

* fix(studio-server): publish media proxy exports

* fix(parsers): scan HTML comments linearly

* feat(cli): let projects opt out of automatic proxying

Adds media.autoProxy to hyperframes.json plus --proxy/--no-proxy flags, and
forwards the resolved value into the studio and preview servers and the vite
adapter. Lands before the runtime slice that turns auto-proxying on, so the
switch exists before there is any behavior to switch off.

* fix(cli): align media config schema
2026-07-16 23:01:14 -04:00

16 lines
479 B
TypeScript

import { describe, expect, it } from "vitest";
import { studioProxyEnv } from "./studioProxyEnv.js";
describe("studioProxyEnv", () => {
it("forwards an explicit --proxy decision to a Studio child process", () => {
expect(studioProxyEnv(true, { KEEP: "yes" })).toEqual({
KEEP: "yes",
HYPERFRAMES_AUTO_PROXY: "true",
});
expect(studioProxyEnv(false, { KEEP: "yes" })).toEqual({
KEEP: "yes",
HYPERFRAMES_AUTO_PROXY: "false",
});
});
});