-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add Stream Deck 6.7 * test: fix incorrect test file ref --------- Co-authored-by: Richard Herman <[email protected]>
- Loading branch information
Showing
8 changed files
with
168 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
"$schema": "../../../../../../streamdeck/plugins/manifest.json", | ||
"Actions": [ | ||
{ | ||
"Controllers": ["Encoder", "Keypad"], | ||
"DisableAutomaticStates": true, | ||
"DisableCaching": false, | ||
"Encoder": { | ||
"background": "background", | ||
"Icon": "icon", | ||
"layout": "$A0", | ||
"StackColor": "#000000", | ||
"TriggerDescription": { | ||
"LongTouch": "Long touch", | ||
"Push": "Push", | ||
"Rotate": "Rotate", | ||
"Touch": "Touch" | ||
} | ||
}, | ||
"Icon": "action-icon", | ||
"Name": "Action One", | ||
"OS": ["mac", "windows"], | ||
"PropertyInspectorPath": "action.html", | ||
"States": [ | ||
{ | ||
"FontFamily": "Arial", | ||
"FontSize": 12, | ||
"FontStyle": "Bold", | ||
"FontUnderline": true, | ||
"Image": "action-state-image", | ||
"MultiActionImage": "action-state-multi-action-image", | ||
"Name": "Action State One", | ||
"ShowTitle": true, | ||
"Title": "State One", | ||
"TitleAlignment": "bottom", | ||
"TitleColor": "#000000" | ||
} | ||
], | ||
"SupportedInMultiActions": true, | ||
"Tooltip": "This is the tooltip", | ||
"UserTitleEnabled": true, | ||
"UUID": "com.elgato.test.one", | ||
"VisibleInActionsList": true | ||
} | ||
], | ||
"ApplicationsToMonitor": { | ||
"mac": ["finder"], | ||
"windows": ["explorer.exe"] | ||
}, | ||
"Author": "Elgato", | ||
"Category": "Testing", | ||
"CategoryIcon": "category-icon", | ||
"CodePath": "main.js", | ||
"CodePathMac": "main-darwin.js", | ||
"CodePathWin": "main-windows.js", | ||
"DefaultWindowSize": [500, 650], | ||
"Description": "Manifest version 6.4", | ||
"Icon": "icon", | ||
"Name": "Test Manifest", | ||
"Nodejs": { | ||
"Debug": "break", | ||
"GenerateProfilerOutput": false, | ||
"Version": "20" | ||
}, | ||
"OS": [ | ||
{ | ||
"MinimumVersion": "13", | ||
"Platform": "mac" | ||
}, | ||
{ | ||
"MinimumVersion": "10", | ||
"Platform": "windows" | ||
} | ||
], | ||
"Profiles": [ | ||
{ | ||
"DeviceType": 7, | ||
"DontAutoSwitchWhenInstalled": true, | ||
"Name": "Test Profile", | ||
"Readonly": true | ||
} | ||
], | ||
"PropertyInspectorPath": "pi.html", | ||
"SDKVersion": 2, | ||
"Software": { | ||
"MinimumVersion": "6.7" | ||
}, | ||
"URL": "https://www.elgato.com", | ||
"UUID": "com.elgato.test", | ||
"Version": "1.0.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { validateStreamDeckPluginManifest } from "@tests"; | ||
|
||
const VERSION = "6.7"; | ||
|
||
describe("v6.7", () => { | ||
/** | ||
* Asserts a valid v6.7 manifest. | ||
*/ | ||
test("full manifest", () => { | ||
// Arrange, act, assert. | ||
const errors = validateStreamDeckPluginManifest("v6.7.json"); | ||
expect(errors).toHaveLength(0); | ||
}); | ||
|
||
/** | ||
* Asserts more than 2 states are allowed. | ||
*/ | ||
test("Actions[].States[] allow more than 2 items", () => { | ||
// Arrange, act, assert. | ||
const errors = validateStreamDeckPluginManifest("v6.7.json", (m) => { | ||
m.Actions[0].States.push({ Image: "imgs/two" }); | ||
m.Actions[0].States.push({ Image: "imgs/three" }); | ||
m.Actions[0].States.push({ Image: "imgs/four" }); | ||
}); | ||
expect(errors).toHaveLength(0); | ||
}); | ||
|
||
describe("v6.7 features", () => { | ||
/** | ||
* Asserts `Actions[].OS` is not valid for a v6.5 manifest. | ||
*/ | ||
test("Actions[].OS is valid", () => { | ||
// Arrange, act, assert. | ||
const errors = validateStreamDeckPluginManifest("Actions[].OS.json", (m) => (m.Software.MinimumVersion = VERSION)); | ||
expect(errors).toHaveLength(0); | ||
}); | ||
|
||
/** | ||
* Asserts `Profiles[].AutoInstall` is not valid for a v6.5 manifest. | ||
*/ | ||
test("Profiles[].AutoInstall is valid", () => { | ||
// Arrange, act, assert. | ||
const errors = validateStreamDeckPluginManifest("Profiles[].AutoInstall.json", (m) => (m.Software.MinimumVersion = VERSION)); | ||
expect(errors).toHaveLength(0); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { Manifest } from "./latest"; | ||
|
||
/** | ||
* Defines the plugin and available actions, and all information associated with them, including the plugin's entry point, all iconography, action default behavior, etc. | ||
*/ | ||
export type Manifest_6_7 = Omit<Manifest, "Software"> & { | ||
/** | ||
* Determines the Stream Deck software requirements for this plugin. | ||
*/ | ||
Software: { | ||
/** | ||
* Minimum version of the Stream Deck application required for this plugin to run. | ||
*/ | ||
MinimumVersion: "6.7"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters