| author | |
| committer | |
| log | beab6886f45bf42906d0bd01aefe5dfe9e66a867 |
| tree | a32786a610f4d06a371a7bc299fea8d967948835 |
| parent | f708f63fa9bcd7e51f1f62531f6f9ed966b71807 |
| signature | Signed by PGP key B5690EEEBB952194 |
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <254055478+maria-rcks@users.noreply.github.com>2 files changed, 7 insertions(+), 2 deletions(-)
apps/web/src/openVsxThemes.test.ts+5| ... | @@ -293,6 +293,11 @@ describe("Open VSX themes", () => { | ... | @@ -293,6 +293,11 @@ describe("Open VSX themes", () => { |
| 293 | it("downloads a verified VSIX, reads JSONC includes, and pairs contributed variants", async () => { | 293 | it("downloads a verified VSIX, reads JSONC includes, and pairs contributed variants", async () => { |
| 294 | const zip = new JSZip(); | 294 | const zip = new JSZip(); |
| 295 | zip.file("extension/.gitkeep", ""); | 295 | zip.file("extension/.gitkeep", ""); |
| 296 | // Theme extensions sometimes publish their development dependencies too. | ||
| 297 | // Those unused files should not prevent importing the small theme payload. | ||
| 298 | for (let index = 0; index < 3_000; index += 1) { | ||
| 299 | zip.file(`extension/node_modules/package-${index}.js`, ""); | ||
| 300 | } | ||
| 296 | zip.file( | 301 | zip.file( |
| 297 | "extension/themes/base.jsonc", | 302 | "extension/themes/base.jsonc", |
| 298 | `{ | 303 | `{ |
apps/web/src/openVsxThemes.ts+2-2| ... | @@ -17,8 +17,8 @@ const MAX_DETAIL_BYTES = 256 * 1024; | ... | @@ -17,8 +17,8 @@ const MAX_DETAIL_BYTES = 256 * 1024; |
| 17 | const MAX_MANIFEST_BYTES = 256 * 1024; | 17 | const MAX_MANIFEST_BYTES = 256 * 1024; |
| 18 | const SEARCH_REQUEST_TIMEOUT_MS = 10_000; | 18 | const SEARCH_REQUEST_TIMEOUT_MS = 10_000; |
| 19 | const MAX_THEME_BYTES = 256 * 1024; | 19 | const MAX_THEME_BYTES = 256 * 1024; |
| 20 | const MAX_ZIP_ENTRIES = 2_000; | 20 | const MAX_ZIP_ENTRIES = 5_000; |
| 21 | const MAX_UNCOMPRESSED_BYTES = 50 * 1024 * 1024; | 21 | const MAX_UNCOMPRESSED_BYTES = 100 * 1024 * 1024; |
| 22 | const MAX_COMPRESSION_RATIO = 200; | 22 | const MAX_COMPRESSION_RATIO = 200; |
| 23 | const MAX_THEMES_PER_EXTENSION = 40; | 23 | const MAX_THEMES_PER_EXTENSION = 40; |
| 24 | const MAX_INCLUDE_DEPTH = 8; | 24 | const MAX_INCLUDE_DEPTH = 8; |