Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Node.js
.turbo
.wireit
node_modules/

# Tests
coverage/

# Build output
dist/
packages/schemas/streamdeck

# Shared package files
packages/plugin/README.md
Expand Down
3 changes: 3 additions & 0 deletions packages/schemas/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.turbo
coverage
dist
248 changes: 248 additions & 0 deletions packages/schemas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
# Change Log

## 0.4.15

### Patch Changes

- Add Stream Deck 7.4.

## 0.4.14

### Patch Changes

- Add Stream Deck 7.3.
- Add `Galleon100SD` device type and manifest hint.
- Add `StreamDeckPlusXL` device type and manifest hint.

## 0.4.13

### Patch Changes

- Fix release pipeline.

## 0.4.12

### Patch Changes

- Add Stream Deck 7.2.

## 0.4.11

### Patch Changes

- `Nodejs` is now correctly marked as optional in older version.

## 0.4.10

### Patch Changes

- Add Stream Deck 7.1.
- Add support for Node.js 24.

## 0.4.9

### Patch Changes

- Update recommended `SDKVersion`.

## 0.4.8

### Patch Changes

- Add `Actions[].SupportedInKeyLogicActions`.

## 0.4.7

### Patch Changes

- Add Stream Deck 7.0.
- Add `VirtualStreamDeck` device type and manifest hint.

## 0.4.6

### Patch Changes

- Fix documentation for `Icon` size requirements.

## 0.4.5

### Patch Changes

- Add `StreamDeckStudio` device type and manifest hint.

## 0.4.4

### Patch Changes

- Add `SupportURL` and `Actions[].SupportURL`.

## 0.4.3

### Patch Changes

- Add Stream Deck 6.9.

## 0.4.2

### Patch Changes

- Update iconography color guide.
- Update dependencies.

## 0.4.1

### Patch Changes

- Update manifest `Profiles[].AutoInstall` to reflect minimum Stream Deck version.
- Update manifest `Icon` to remove Marketplace reference.

## 0.4.0

### Minor Changes

- Fix package exports.

## 0.3.9

### Patch Changes

- Remove SVG reference from `Icon` documentation.

## 0.3.8

### Patch Changes

- Fix `Icon` incorrectly allowing SVG images.

## 0.3.7

### Patch Changes

- Add Stream Deck 6.8.

## 0.3.6

### Patch Changes

- Add Stream Deck 6.7.

## 0.3.5

### Patch Changes

- Add `@elgato/schemas/streamdeck/plugins/json` export.

## 0.3.4

### Patch Changes

- Fix `Version` format documentation.

## 0.3.3

### Patch Changes

- Fix patterns for `CategoryIcon`, `Icon`, `PropertyInspectorPath`, and `UUID`.
- Fix patterns for `CodePath`, `CodePathMac`, and `CodePathWin`.
- Fix patterns for an action's `Icon`, `PropertyInspectorPath`, and `UUID`.
- Fix patterns for an encoder's `Icon`, `background`, and `layout`.
- Fix patterns for a state's `Image`, and `MultiActionImage`.
- Fix pattern for a profile's `Name`.

## 0.3.2

### Patch Changes

- `Actions[].States` can now contain more than 2 states.

## 0.3.1

### Patch Changes

- Fix missing `MinimumVersion` values.

## 0.3.0

### Minor Changes

- Renamed SCUF device type to `SCUFController`.

## 0.2.2

### Patch Changes

- Add `ScufGamepad` and `StreamDeckNeo` device hints to manifest documentation.

## 0.2.1

### Patch Changes

- Add `ScufGamepad` and `StreamDeckNeo` device types.

## 0.2.0

### Minor Changes

- Add `Profiles[].AutoInstall`, introduced in Stream Deck 6.6.
- Remove `$schema` property from TypeScript types.

## 0.1.8

### Patch Changes

- Version fix.

## 0.1.7

### Patch Changes

- Update `Version` to require a major, minor, patch, and build numbers.
- Prevent `Version` from having leading zeroes, for example `1.002.3.4`; non-leading zeroes are still permitted.

## 0.1.6

### Patch Changes

- Add `Actions[].OS`, introduced in Stream Deck 6.6.

## 0.1.5

### Patch Changes

- Schemas are now accessible directly under the Elgato domain.
- [Manifest schema](https://schemas.elgato.com/streamdeck/plugins/manifest.json)
- [Layout schema](https://schemas.elgato.com/streamdeck/plugins/layout.json)

## 0.1.4

### Patch Changes

- Loosen rules on `Version` within manifest to allow more types; valid formats are now `{major}`, `{major}.{minor}`, `{major}.{minor}.{patch}`, and `{major}.{minor}.{patch}.{build}`.

## 0.1.3

### Patch Changes

- Add support for CommonJS.

## 0.1.2

### Patch Changes

- Fix pattern for identifiers (action and plugin UUIDs).

## 0.1.1

### Patch Changes

- Add `imageDimensions` schema type.

## 0.1.0

### Minor Changes

- Add JSON schema for Stream Deck plugin's manifest.
- Add TypeScript declaration for Stream Deck plugin's manifest.
- Add JSON schema for Stream Deck plugin's layout.
- Add TypeScript declaration for Stream Deck plugin's layout.
- Add custom keyword definitions.
94 changes: 94 additions & 0 deletions packages/schemas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<div align="center">

[![Stream Deck SDK banner](https://images.ctfassets.net/8j9xr8kwdre8/1ihLKCwNWEfPixs27dq0c0/130be66a5173f332e4caa892a3462893/banner.png)](https://docs.elgato.com/sdk)

# Schemas

[![Schemas npm package](https://img.shields.io/npm/v/%40elgato/schemas?logo=npm&logoColor=white)](https://www.npmjs.com/package/@elgato/schemas)
[![SDK documentation](https://img.shields.io/badge/Documentation-2ea043?labelColor=grey&logo=gitbook&logoColor=white)](https://docs.elgato.com/sdk)
[![Join the Marketplace Makers Discord](https://img.shields.io/badge/Marketplace%20Makers-5662f6?labelColor=grey&logo=discord&logoColor=white)](https://discord.gg/GehBUcu627)
[![Elgato homepage](https://img.shields.io/badge/Elgato-3431cf?labelColor=grey&logo=elgato)](https://elgato.com)

</div>

Collection of schemas, and TypeScript declarations, to support the creation and validation of Stream Deck SDK files.

```bash
npm install @elgato/schemas
```

## Stream Deck

### Plugin

#### Manifest

Manifest JSON file responsible for defining a Stream Deck plugin.

```ts
// TypeScript type.
import { type Manifest } from "@elgato/schemas/streamdeck/plugins";
```

```js
// Schema as an object.
import manifest from "@elgato/schemas/streamdeck/plugins/json";
```

```js
// Schema as an object, with experimental import attributes
import manifest from "@elgato/schemas/streamdeck/plugins/manifest.json" with { type: "json" };
```

```
https://schemas.elgato.com/streamdeck/plugins/manifest.json
```

#### Layout

Layout JSON file that defines the layout of an action on Stream Deck +.

```ts
// TypeScript type.
import { type Layout } from "@elgato/schemas/streamdeck/plugins";
```

```js
// Schema as an object.
import layout from "@elgato/schemas/streamdeck/plugins/json";
```

```js
// Schema as an object, with experimental import attributes
import layout from "@elgato/schemas/streamdeck/plugins/layout.json" with { type: "json" };
```

```
https://schemas.elgato.com/streamdeck/plugins/layout.json
```

## Usage

Schemas can be referenced directly within JSON files, providing intellisense and validation, using the `$schema` property, for example:

```jsonc
{
"$schema": "https://schemas.elgato.com/streamdeck/plugins/manifest.json",
"Name": "Wave Link",
"Version": "1.9.0.0",
"Author": "Elgato"
// ...
}
```

## Keywords

Custom keywords used within the provided schemas can also be directly imported to assist with constructing a validator, such as `Ajv`. Please note, the custom keyword definitions will only register the keyword, and will not provide validation.

```ts
import { keywordDefinitions } from "@elgato/schemas";
import Ajv from "ajv";

// add the "filePath" keyword (excluding validation)
ajv.addKeyword(keywordDefinitions.filePath);
```
3 changes: 3 additions & 0 deletions packages/schemas/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { config } from "@elgato/eslint-config";

export default config.strict;
31 changes: 31 additions & 0 deletions packages/schemas/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const config = ({

Check failure on line 1 in packages/schemas/jest.config.cjs

View workflow job for this annotation

GitHub Actions / Build (20, macos-latest)

'config' is assigned a value but never used

Check failure on line 1 in packages/schemas/jest.config.cjs

View workflow job for this annotation

GitHub Actions / Build (24, macos-latest)

'config' is assigned a value but never used

Check failure on line 1 in packages/schemas/jest.config.cjs

View workflow job for this annotation

GitHub Actions / Build (24, windows-latest)

'config' is assigned a value but never used
compilerOptions: { paths }

Check failure on line 2 in packages/schemas/jest.config.cjs

View workflow job for this annotation

GitHub Actions / Build (20, macos-latest)

'paths' is not defined

Check failure on line 2 in packages/schemas/jest.config.cjs

View workflow job for this annotation

GitHub Actions / Build (24, macos-latest)

'paths' is not defined

Check failure on line 2 in packages/schemas/jest.config.cjs

View workflow job for this annotation

GitHub Actions / Build (24, windows-latest)

'paths' is not defined
} = require("./tsconfig.json"));

/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
module.exports = {
clearMocks: true,
maxWorkers: 1,
modulePathIgnorePatterns: ["<rootDir>/src/.+/__mocks__/.*"],
verbose: true,
roots: ["src"],
setupFilesAfterEnv: ["./tests/setup.ts"],
transform: {
"^.+\\.ts$": [
"@swc/jest",
{
jsc: {
parser: {
syntax: "typescript",
decorators: true
},
baseUrl: "./",
paths

Check failure on line 26 in packages/schemas/jest.config.cjs

View workflow job for this annotation

GitHub Actions / Build (20, macos-latest)

'paths' is not defined

Check failure on line 26 in packages/schemas/jest.config.cjs

View workflow job for this annotation

GitHub Actions / Build (24, macos-latest)

'paths' is not defined

Check failure on line 26 in packages/schemas/jest.config.cjs

View workflow job for this annotation

GitHub Actions / Build (24, windows-latest)

'paths' is not defined
}
}
]
}
};
Loading
Loading