mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 04:47:03 -06:00
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:
committed by
GitHub
parent
70b3467484
commit
16fa19cd72
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user