Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 5163e3a

Browse files
authored
Merge pull request #896 from codeoverflow-org/fix/nodecg-v2-support
Add NodeCG v2 support
2 parents d2f1e60 + 1d08b05 commit 5163e3a

File tree

96 files changed

+113
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+113
-100
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,28 @@ jobs:
7979
run: echo "NODECG_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
8080

8181
- name: Cache NodeCG dependencies
82-
id: cache-nodecg
82+
id: cache-nodecg-deps
8383
uses: actions/cache@v3
8484
with:
8585
path: 'node_modules'
86-
key: ${{ runner.os }}-${{ env.NODECG_HASH }}-nodecg
86+
key: ${{ runner.os }}-${{ env.NODECG_HASH }}-nodecg-deps
87+
88+
- name: Cache NodeCG compilation outputs
89+
id: cache-nodecg-build
90+
uses: actions/cache@v3
91+
with:
92+
path: 'build'
93+
key: ${{ runner.os }}-${{ env.NODECG_HASH }}-nodecg-build
8794

8895
- name: Install NodeCG dependencies
8996
# Only get dependencies if we didn't get them from the cache
90-
if: steps.cache-nodecg.outputs.cache-hit != 'true'
91-
run: npm install --prod
97+
if: steps.cache-nodecg-deps.outputs.cache-hit != 'true'
98+
run: npm install
99+
100+
- name: Build NodeCG
101+
# Only build NodeCG if we didn't have cached compilation results
102+
if: steps.cache-nodecg-build.outputs.cache-hit != 'true'
103+
run: npm run build
92104

93105
- name: Setup NodeCG config linux
94106
if: matrix.os == 'ubuntu-latest'

.scripts/ci-nodecg-integration.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,16 @@ child.once("exit", (exitCode, signal) => {
3939
console.log("Stopped NodeCG\n");
4040

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

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

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

5354
// Fail the run if there are missing bundles.

nodecg-io-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"nodecg-bundle"
3232
],
3333
"nodecg": {
34-
"compatibleRange": "^1.1.1",
34+
"compatibleRange": ">=1.1.1 <3.0.0",
3535
"dashboardPanels": [
3636
{
3737
"name": "nodecg-io",

samples/ahk-sendcommand/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.3.0",
44
"private": true,
55
"nodecg": {
6-
"compatibleRange": "^1.1.1",
6+
"compatibleRange": ">=1.1.1 <3.0.0",
77
"bundleDependencies": {
88
"nodecg-io-ahk": "^0.3.0"
99
}

samples/android/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.3.0",
44
"private": true,
55
"nodecg": {
6-
"compatibleRange": "^1.1.1",
6+
"compatibleRange": ">=1.1.1 <3.0.0",
77
"bundleDependencies": {
88
"nodecg-io-android": "^0.3.0"
99
}

samples/artnet-console/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": "0.3.0",
1414
"private": true,
1515
"nodecg": {
16-
"compatibleRange": "^1.1.1",
16+
"compatibleRange": ">=1.1.1 <3.0.0",
1717
"bundleDependencies": {
1818
"nodecg-io-artnet": "^0.3.0"
1919
}

samples/atem/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": "0.3.0",
1414
"private": true,
1515
"nodecg": {
16-
"compatibleRange": "^1.1.1",
16+
"compatibleRange": ">=1.1.1 <3.0.0",
1717
"bundleDependencies": {
1818
"nodecg-io-atem": "^0.3.0"
1919
}

samples/dbus-ratbagd/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.3.0",
44
"private": true,
55
"nodecg": {
6-
"compatibleRange": "^1.1.1",
6+
"compatibleRange": ">=1.1.1 <3.0.0",
77
"bundleDependencies": {
88
"nodecg-io-dbus": "0.3.0"
99
}

samples/debug/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.3.0",
44
"private": true,
55
"nodecg": {
6-
"compatibleRange": "^1.1.1",
6+
"compatibleRange": ">=1.1.1 <3.0.0",
77
"bundleDependencies": {
88
"nodecg-io-debug": "^0.3.0"
99
}

samples/discord-guild-chat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"url": "https://github.com/Tim-Tech-Dev"
99
},
1010
"nodecg": {
11-
"compatibleRange": "^1.1.1",
11+
"compatibleRange": ">=1.1.1 <3.0.0",
1212
"bundleDependencies": {
1313
"nodecg-io-discord": "^0.3.0"
1414
}

0 commit comments

Comments
 (0)