From f709009444b740dfdf96e028b298e95dc1dcca2e Mon Sep 17 00:00:00 2001 From: Richard Herman Date: Tue, 29 Oct 2024 19:08:59 +0000 Subject: [PATCH] fix: pattern of Icon to not allow SVG --- CHANGELOG.md | 6 ++++++ src/streamdeck/plugins/manifest/__tests__/all.test.ts | 3 ++- src/streamdeck/plugins/manifest/latest.ts | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15f1af4..d287f01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ # Change Log +## 0.3.8 + +### 🐞 Fix + +- Fix `Icon` incorrectly allowing SVG images. + ## 0.3.7 ### ✨ New diff --git a/src/streamdeck/plugins/manifest/__tests__/all.test.ts b/src/streamdeck/plugins/manifest/__tests__/all.test.ts index 32a3854..f903281 100644 --- a/src/streamdeck/plugins/manifest/__tests__/all.test.ts +++ b/src/streamdeck/plugins/manifest/__tests__/all.test.ts @@ -188,7 +188,7 @@ describe.each(["v6.4", "v6.5", "v6.6", "v6.7", "v6.8"])("%s", (version) => { expect(errors).toHaveError({ instancePath: "/Icon", keyword: "pattern", - pattern: patterns.IMAGE_PATH + pattern: patterns.ICON_PATH }); }); @@ -251,6 +251,7 @@ const patterns = { LAYOUT: "^(^(?![\\.]*[\\\\\\/]+).+\\.([Jj][Ss][Oo][Nn])$)|(\\$(X1|A0|A1|B1|B2|C1))$", IMAGE_PATH_WITH_GIF_SUPPORT: "^(?![~\\.]*[\\\\\\/]+)(?!.*\\.(([Gg][Ii][Ff])|([Ss][Vv][Gg])|([Pp][Nn][Gg]))$).*$", IMAGE_PATH: "^(?![~\\.]*[\\\\\\/]+)(?!.*\\.(([Ss][Vv][Gg])|([Pp][Nn][Gg]))$).*$", + ICON_PATH: "^(?![~\\.]*[\\\\\\/]+)(?!.*\\.(([Pp][Nn][Gg]))$).*$", PROFILE_PATH: "^(?![~\\.]*[\\\\\\/]+)(?!.*\\.(([Ss][Tt][Rr][Ee][Aa][Mm][Dd][Ee][Cc][Kk][Pp][Rr][Oo][Ff][Ii][Ll][Ee]))$).*$", UUID: "^([a-z0-9-]+)(\\.[a-z0-9-]+)+$" }; diff --git a/src/streamdeck/plugins/manifest/latest.ts b/src/streamdeck/plugins/manifest/latest.ts index 6a4aca1..45030e4 100644 --- a/src/streamdeck/plugins/manifest/latest.ts +++ b/src/streamdeck/plugins/manifest/latest.ts @@ -113,7 +113,7 @@ export type Manifest = { * assets/plugin-icon * imgs/plugin * @filePath - * { extensions: [".svg", ".png"], includeExtension: false } + * { extensions: [".png"], includeExtension: false } * @imageDimensions * [288, 288] */