Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NodeCG v2 support #896

Merged
merged 4 commits into from
Mar 28, 2023
Merged
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
20 changes: 16 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,28 @@ jobs:
run: echo "NODECG_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV

- name: Cache NodeCG dependencies
id: cache-nodecg
id: cache-nodecg-deps
uses: actions/cache@v3
with:
path: 'node_modules'
key: ${{ runner.os }}-${{ env.NODECG_HASH }}-nodecg
key: ${{ runner.os }}-${{ env.NODECG_HASH }}-nodecg-deps

- name: Cache NodeCG compilation outputs
id: cache-nodecg-build
uses: actions/cache@v3
with:
path: 'build'
key: ${{ runner.os }}-${{ env.NODECG_HASH }}-nodecg-build

- name: Install NodeCG dependencies
# Only get dependencies if we didn't get them from the cache
if: steps.cache-nodecg.outputs.cache-hit != 'true'
run: npm install --prod
if: steps.cache-nodecg-deps.outputs.cache-hit != 'true'
run: npm install

- name: Build NodeCG
# Only build NodeCG if we didn't have cached compilation results
if: steps.cache-nodecg-build.outputs.cache-hit != 'true'
run: npm run build

- name: Setup NodeCG config linux
if: matrix.os == 'ubuntu-latest'
Expand Down
5 changes: 3 additions & 2 deletions .scripts/ci-nodecg-integration.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ child.once("exit", (exitCode, signal) => {
console.log("Stopped NodeCG\n");

// Check exit code for failure
if (exitCode !== null && exitCode !== 0) {
// 143 is the exit code when the process is killed by the timeout (SIGTERM)
if (exitCode !== null && exitCode !== 143) {
throw new Error(`NodeCG exited with code ${exitCode} ${signal}`);
}

const log = Buffer.concat(buffer).toString();

// Try to find each bundle in the logs.
const missing = bundles.filter(
(i) => !log.includes(`[nodecg/lib/server/extensions] Mounted ${i.packageJson.name} extension`),
(bundle) => !log.includes(` [extensions] Mounted ${bundle.packageJson.name} extension`),
);

// Fail the run if there are missing bundles.
Expand Down
2 changes: 1 addition & 1 deletion nodecg-io-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"nodecg-bundle"
],
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"dashboardPanels": [
{
"name": "nodecg-io",
Expand Down
2 changes: 1 addition & 1 deletion samples/ahk-sendcommand/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-ahk": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/android/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-android": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/artnet-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-artnet": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/atem/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-atem": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/dbus-ratbagd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-dbus": "0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-debug": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/discord-guild-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/Tim-Tech-Dev"
},
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-discord": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/discord-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-discord-rpc": "0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/elgato-light/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-elgato-light": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-github": "0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/google-cast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-template": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/gsheets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-googleapis": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/intellij/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-intellij": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/irc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-irc": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/midi-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-midi-input": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/midi-io/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-midi-input": "^0.3.0",
"nodecg-io-midi-output": "^0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion samples/midi-output/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-midi-output": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/mqtt-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-mqtt-client": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/nanoleaf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-nanoleaf": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/obs-scenelist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-obs": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/opentts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-template": "^0.3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"description": "",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1"
"compatibleRange": ">=1.1.1 <3.0.0"
}
}
2 changes: 1 addition & 1 deletion samples/philipshue-lights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-philipshue": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/rcon-minecraft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/derNiklaas"
},
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-rcon": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/reddit-msg-read/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/noeppi-noeppi"
},
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-reddit": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/sacn-receiver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/Tim-Tech-Dev"
},
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-sacn-receiver": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/sacn-sender/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-sacn-sender": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/serial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-serial": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/shlink-list-short-urls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-shlink": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/slack-post/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-slack": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/spotify-current-song/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"version": "0.3.0",
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-spotify": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/sql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-sql": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/streamdeck-rainbow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-streamdeck": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/streamelements-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"watch": "npm run build -- --watch"
},
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-streamelements": "^0.3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion samples/telegram-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-telegram": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-template": "^0.3.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/tiane-discord/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"private": true,
"nodecg": {
"compatibleRange": "^1.1.1",
"compatibleRange": ">=1.1.1 <3.0.0",
"bundleDependencies": {
"nodecg-io-discord": "^0.3.0",
"nodecg-io-tiane": "^0.3.0"
Expand Down
Loading