improve(control-ui): compress and cache bundled assets (#105890)

* perf(control-ui): compress bundled assets

* chore(control-ui): remove release-owned changelog edit

* fix(control-ui): release assets before compression

* refactor(control-ui): split static response helpers

* perf(control-ui): precompress bundled assets

* refactor(control-ui): keep encoding internals private

* chore(control-ui): refresh LOC baseline
This commit is contained in:
Peter Steinberger
2026-07-12 23:13:04 -07:00
committed by GitHub
parent 70b3467484
commit 16fa19cd72
10 changed files with 842 additions and 132 deletions
+17 -1
View File
@@ -101,11 +101,27 @@ describe("collectPreparedPrepackErrors", () => {
expect(
collectPreparedPrepackErrors(
["dist/index.mjs", "dist/control-ui/index.html"],
["dist/control-ui/assets/index-Bu8rSoJV.js"],
[
"dist/control-ui/assets/index-Bu8rSoJV.js",
"dist/control-ui/assets/index-Bu8rSoJV.js.br",
"dist/control-ui/assets/index-Bu8rSoJV.js.gz",
],
),
).toStrictEqual([]);
});
it("rejects a stale Control UI build without precompressed variants", () => {
expect(
collectPreparedPrepackErrors(
["dist/index.mjs", "dist/control-ui/index.html"],
["dist/control-ui/assets/index-Bu8rSoJV.js"],
),
).toEqual([
"missing prepared Control UI .br asset under dist/control-ui/assets/",
"missing prepared Control UI .gz asset under dist/control-ui/assets/",
]);
});
it("reports missing build and control ui artifacts", () => {
expect(collectPreparedPrepackErrors([], [])).toEqual([
"missing required prepared artifact: dist/index.js or dist/index.mjs",