Skip to content

Commit

Permalink
Merge branch 'master' into feat/hid-async
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Nov 30, 2023
2 parents bdb2110 + 27998bd commit ad0aa40
Show file tree
Hide file tree
Showing 24 changed files with 281 additions and 109 deletions.
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ Dockerfile
.eslintrc.js
.gitattributes
.gitignore
.prettierignore
.prettierignore

.yarn/cache
.yarn/install-state.gz
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
electron-output
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
34 changes: 21 additions & 13 deletions .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -22,14 +22,16 @@ jobs:
sudo apt-get install -y yasm libudev-dev libusb-1.0-0-dev
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'

- name: Run build
run: |
corepack enable
# try and avoid timeout errors
yarn config set network-timeout 100000 -g
yarn config set httpTimeout 100000
yarn
yarn dist
Expand Down Expand Up @@ -67,19 +69,21 @@ jobs:
runs-on: windows-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'

- name: Run build
run: |
corepack enable
# try and avoid timeout errors
yarn config set network-timeout 100000 -g
yarn config set httpTimeout 100000
yarn
yarn dist
Expand Down Expand Up @@ -117,19 +121,21 @@ jobs:
runs-on: macos-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'

- name: Run build
run: |
corepack enable
# try and avoid timeout errors
yarn config set network-timeout 100000 -g
yarn config set httpTimeout 100000
yarn
yarn dist
Expand Down Expand Up @@ -173,19 +179,21 @@ jobs:
runs-on: macos-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'

- name: Run build
run: |
corepack enable
# try and avoid timeout errors
yarn config set network-timeout 100000 -g
yarn config set httpTimeout 100000
yarn
yarn dist mac-arm64
Expand Down Expand Up @@ -235,7 +243,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,13 @@ dist
config.json
electron-output
.DS_STORE
.cache

# Yarn 3 files
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,52 @@

All notable changes to this project will be documented in this file. See [Convential Commits](https://www.conventionalcommits.org/en/v1.0.0/#specification) for commit guidelines.

## [1.5.6](https://github.com/bitfocus/companion-satellite/compare/v1.5.5...v1.5.6) (Sat Nov 18 2023)


### Fixes

* align streamdeck plus lcd strip drawing [515cf4a](https://github.com/bitfocus/companion-satellite/commit/515cf4acd74e0de55bbff21f979345c9ac678afb)
* scaling is not being setup correctly, when devices are added before the connection is fully open [4a2a30a](https://github.com/bitfocus/companion-satellite/commit/4a2a30a3b468072d93bcc9792d8d90363b5bb9b6)
* streamdeck plus lcd strip not blanking [ed56920](https://github.com/bitfocus/companion-satellite/commit/ed5692077d651bcacfe3824f2e295e7526ff321d)

## [1.5.5](https://github.com/bitfocus/companion-satellite/compare/v1.5.3...v1.5.5) (Wed Oct 11 2023)


### Fixes

* build errors [1dd8969](https://github.com/bitfocus/companion-satellite/commit/1dd896921d2ea2ec5affcd3abba79a76c6eadca4)

## [1.5.4](https://github.com/bitfocus/companion-satellite/compare/v1.5.3...v1.5.4) (Wed Oct 11 2023)


## [1.5.3](https://github.com/bitfocus/companion-satellite/compare/v1.5.2...v1.5.3) (Wed Oct 11 2023)


### Fixes

* install vcruntime [4523f1f](https://github.com/bitfocus/companion-satellite/commit/4523f1fda308c944782fe9ba2c1484a544dc254c)

## [1.5.2](https://github.com/bitfocus/companion-satellite/compare/v1.5.1...v1.5.2) (Sat Oct 07 2023)


### Fixes

* update @julusian/image-rs for arm7 support [64a6903](https://github.com/bitfocus/companion-satellite/commit/64a6903d93f9e89aa648ed3f4cd3bcf1fb76c260)
* **(pi)** reload udev rules during install. ensure nano is installed [6c96faa](https://github.com/bitfocus/companion-satellite/commit/6c96faafc22a582c70d76707af0a2a3c78001b0c)

## [1.5.1](https://github.com/bitfocus/companion-satellite/compare/v1.5.0...v1.5.1) (Mon Sep 04 2023)


### Fixes

* hide version info from about dialog [20aa59c](https://github.com/bitfocus/companion-satellite/commit/20aa59ca599ec51aeb77e0d2e63a85a7cdd4b285)
* add setImmediate to connected event (#85) [0528e36](https://github.com/bitfocus/companion-satellite/commit/0528e36df83d02669da8cb43909d275b19fc82c8)

### Features

* add connected endpoint (#87) [2b40358](https://github.com/bitfocus/companion-satellite/commit/2b4035818c267f5d80dbc8fc3490ea8125739d06)

## [1.5.0](https://github.com/bitfocus/companion-satellite/compare/v1.4.1...v1.5.0) (Sat Aug 19 2023)


Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ To manually build the latest version for your machine:

### Manual Headless / Raspberry pi

If using a Raspberry Pi, we recommend using the 64bit 'Raspberry Pi OS Lite' images, the non-64bit version should work too but it less tested.
If using a different brand SBC, we recommend running [Armbian](https://www.armbian.com/) specifically the minimal debian images, as this provides a minimal and consistent debian environment and are typically more up to date then the manufacturer images.

It can be built and run as a systemd service on a pi or other linux machine

No images are provided for this, but the process has been written to be a single script.
Expand Down
59 changes: 33 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "companion-satellite",
"version": "1.5.0",
"version": "1.5.6",
"description": "Satellite Streamdeck connector for Bitfocus Companion",
"author": {
"name": "Julian Waller",
Expand All @@ -20,27 +20,31 @@
"private": true,
"scripts": {
"prepare": "husky install",
"dev": "yarn ts-node src/main.ts",
"dev-electron": "yarn build:main && electron dist/electron.js",
"build": "rimraf dist && yarn build:main",
"dev": "ts-node src/main.ts",
"dev-electron": "run build:main && electron dist/electron.js",
"build": "rimraf dist && run build:main",
"build:main": "tsc -p tsconfig.build.json",
"lint:raw": "eslint --ext .ts --ext .js --ext .tsx --ext .jsx --ignore-pattern dist",
"lint": "yarn lint:raw .",
"license-validate": "yarn sofie-licensecheck",
"dist": "yarn build && zx tools/build_electron.mjs"
"lint:raw": "run eslint --ext .ts --ext .js --ext .tsx --ext .jsx",
"lint": "run lint:raw .",
"license-validate": "sofie-licensecheck",
"dist": "run build && zx tools/build_electron.mjs",
"eslint": "./node_modules/.bin/eslint",
"prettier": "./node_modules/.bin/prettier",
"lint-staged": "./node_modules/.bin/lint-staged"
},
"devDependencies": {
"@electron/notarize": "^2.1.0",
"@sofie-automation/code-standard-preset": "~2.4.7",
"@types/electron-prompt": "^1.6.1",
"@types/koa": "^2.13.8",
"@types/koa-router": "^7.4.4",
"@types/node": "^18.17.5",
"@types/node-hid": "^1.3.1",
"@electron/notarize": "^2.2.0",
"@sofie-automation/code-standard-preset": "~2.5.2",
"@types/electron-prompt": "^1.6.5",
"@types/koa": "^2.13.12",
"@types/koa-router": "^7.4.8",
"@types/node": "^18.18.14",
"@types/node-hid": "^1.3.4",
"@types/semver": "^7.5.6",
"cross-env": "^7.0.3",
"electron": "^25.5.0",
"electron-builder": "^24.6.3",
"rimraf": "^5.0.1",
"electron": "^25.9.6",
"electron-builder": "^24.6.4",
"rimraf": "^5.0.5",
"ts-node": "^10.9.1",
"typescript": "~4.9.5",
"zx": "^7.2.3"
Expand All @@ -50,9 +54,9 @@
},
"dependencies": {
"@elgato-stream-deck/node": "^6.0.0-async-test.3",
"@julusian/image-rs": "^0.2.0",
"@julusian/image-rs": "^0.2.1",
"@julusian/jpeg-turbo": "^2.1.0",
"@julusian/skia-canvas": "^1.0.4",
"@julusian/skia-canvas": "^1.0.5",
"@loupedeck/node": "^1.0.0",
"@xencelabs-quick-keys/node": "^0.4.0",
"electron-about-window": "^1.15.2",
Expand All @@ -63,12 +67,12 @@
"infinitton-idisplay": "^1.1.2",
"koa": "^2.14.2",
"koa-body": "^6.0.1",
"koa-router": "^12.0.0",
"koa-router": "^12.0.1",
"meow": "^9.0.0",
"node-hid": "npm:@julusian/[email protected]",
"semver": "^7.5.4",
"tslib": "^2.6.1",
"usb": "^2.9.0"
"tslib": "^2.6.2",
"usb": "^2.11.0"
},
"resolutions": {
"node-hid": "npm:@julusian/[email protected]"
Expand Down Expand Up @@ -115,7 +119,8 @@
"perMachine": true,
"oneClick": false,
"allowElevation": true,
"artifactName": "companion-satellite-x64.exe"
"artifactName": "companion-satellite-x64.exe",
"include": "tools/windows/installer.nsi"
},
"linux": {
"target": "tar.gz",
Expand All @@ -135,7 +140,9 @@
"!docs",
"!samples",
"!src",
"!tools"
"!tools",
"!pi-image"
]
}
},
"packageManager": "[email protected]"
}
3 changes: 2 additions & 1 deletion pi-image/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ SATELLITE_BRANCH="${SATELLITE_BRANCH:-master}"
adduser --disabled-password satellite --gecos ""

# install some dependencies
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y git zip unzip curl libusb-1.0-0-dev libudev-dev cmake libfontconfig1
apt-get install -y git zip unzip curl libusb-1.0-0-dev libudev-dev cmake libfontconfig1 nano
apt-get clean

# install fnm to manage node version
Expand Down
4 changes: 2 additions & 2 deletions pi-image/satellite-help
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ echo " $ sudo satellite-update"
echo "and follow the prompts"
echo ""

echo "To edit the companion configuration run:"
echo " $ sudo companion-edit-config"
echo "To edit the Companion Satellite configuration run:"
echo " $ sudo satellite-edit-config"
echo "and follow the prompts"
echo ""
6 changes: 4 additions & 2 deletions pi-image/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ cd /usr/local/src/companion-satellite
# update the node version
fnm use --install-if-missing
fnm default $(fnm current)
npm --unsafe-perm install -g yarn
corepack enable

# install dependencies
yarn config set network-timeout 100000 -g
yarn config set httpTimeout 100000
yarn

# build typescript
yarn build

# update some tooling
cp assets/linux/50-satellite.rules /etc/udev/rules.d/
udevadm control --reload-rules || true

# update startup script
cp pi-image/satellite.service /etc/systemd/system
Expand All @@ -36,6 +37,7 @@ echo "
# Port for the REST server (0 to disable)
REST_PORT=9999" >> /boot/satellite-config
fi
chmod 666 /boot/satellite-config

systemctl daemon-reload

Expand Down
Loading

0 comments on commit ad0aa40

Please sign in to comment.