Skip to content

Commit

Permalink
fix: pattern of Icon to not allow SVG (#15)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Herman <[email protected]>
  • Loading branch information
GeekyEggo and GeekyEggo authored Oct 30, 2024
1 parent 156a38d commit a8b623c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@

# Change Log

## 0.3.8

### 🐞 Fix

- Fix `Icon` incorrectly allowing SVG images.

## 0.3.7

### ✨ New
Expand Down
3 changes: 2 additions & 1 deletion src/streamdeck/plugins/manifest/__tests__/all.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
});

Expand Down Expand Up @@ -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-]+)+$"
};
2 changes: 1 addition & 1 deletion src/streamdeck/plugins/manifest/latest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]
*/
Expand Down

0 comments on commit a8b623c

Please sign in to comment.