@raphiiko/wavelink-cli 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/index.js +11 -4
- package/package.json +57 -57
- package/src/commands/output.ts +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Raphiiko
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# @raphiiko/wavelink-cli
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@raphiiko/wavelink-cli)
|
|
4
|
+
[](https://www.npmjs.com/package/@raphiiko/wavelink-cli)
|
|
5
|
+
[](https://github.com/Raphiiko/wavelink-cli/blob/main/LICENSE)
|
|
6
|
+
|
|
3
7
|
A command-line interface for controlling Elgato Wave Link 3.0.
|
|
4
8
|
|
|
5
|
-
> **Note:** This CLI is based on Wave Link 3.0 Beta Update
|
|
9
|
+
> **Note:** This CLI is based on Wave Link 3.0 Beta Update 4. Keep in mind things might break with future Wave Link updates.
|
|
6
10
|
|
|
7
11
|
## Prerequisites
|
|
8
12
|
|
|
9
|
-
- **Elgato Wave Link 3.0** (Beta Update
|
|
13
|
+
- **Elgato Wave Link 3.0** (Beta Update 4 or newer) must be installed and running.
|
|
10
14
|
- **Node.js 18+** or **Bun 1.0+**
|
|
11
15
|
|
|
12
16
|
## Installation
|
package/dist/index.js
CHANGED
|
@@ -5059,6 +5059,7 @@ class WaveLinkClient {
|
|
|
5059
5059
|
reconnectAttempts = 0;
|
|
5060
5060
|
reconnectTimer = null;
|
|
5061
5061
|
isManuallyDisconnected = false;
|
|
5062
|
+
previousMainOutput = null;
|
|
5062
5063
|
options;
|
|
5063
5064
|
currentPort = 1884;
|
|
5064
5065
|
minPort = 1884;
|
|
@@ -5221,9 +5222,15 @@ class WaveLinkClient {
|
|
|
5221
5222
|
break;
|
|
5222
5223
|
case "outputDevicesChanged":
|
|
5223
5224
|
if (Array.isArray(params)) {
|
|
5225
|
+
const mainOutput = params[0];
|
|
5226
|
+
const outputDevices = params[1];
|
|
5227
|
+
if (this.previousMainOutput && JSON.stringify(this.previousMainOutput) !== JSON.stringify(mainOutput)) {
|
|
5228
|
+
this.emit("mainOutputDeviceChanged", { mainOutput });
|
|
5229
|
+
}
|
|
5230
|
+
this.previousMainOutput = mainOutput;
|
|
5224
5231
|
this.emit("outputDevicesChanged", {
|
|
5225
|
-
mainOutput
|
|
5226
|
-
outputDevices
|
|
5232
|
+
mainOutput,
|
|
5233
|
+
outputDevices
|
|
5227
5234
|
});
|
|
5228
5235
|
}
|
|
5229
5236
|
break;
|
|
@@ -5600,7 +5607,7 @@ async function listOutputs(client) {
|
|
|
5600
5607
|
return;
|
|
5601
5608
|
}
|
|
5602
5609
|
for (const device of outputDevices) {
|
|
5603
|
-
const isMain = device.id === mainOutput ? " (MAIN OUTPUT)" : "";
|
|
5610
|
+
const isMain = device.id === mainOutput.outputDeviceId ? " (MAIN OUTPUT)" : "";
|
|
5604
5611
|
console.log(`Device: ${device.name || device.id}${isMain}`);
|
|
5605
5612
|
console.log(` Device ID: ${device.id}`);
|
|
5606
5613
|
console.log(` Wave Device: ${formatMuted(device.isWaveDevice)}`);
|
|
@@ -5916,7 +5923,7 @@ function registerInputCommands(program2) {
|
|
|
5916
5923
|
|
|
5917
5924
|
// src/index.ts
|
|
5918
5925
|
var program2 = new Command;
|
|
5919
|
-
program2.name("wavelink-cli").description("Manage Elgato Wave Link 3.0 via command line").version("0.0.
|
|
5926
|
+
program2.name("wavelink-cli").description("Manage Elgato Wave Link 3.0 via command line").version("0.0.7");
|
|
5920
5927
|
registerInfoCommand(program2);
|
|
5921
5928
|
registerOutputCommands(program2);
|
|
5922
5929
|
registerMixCommands(program2);
|
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@raphiiko/wavelink-cli",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Command line interface for Elgato Wave Link 3.0",
|
|
5
|
-
"author": "Raphiiko",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"homepage": "https://github.com/Raphiiko/wavelink-cli",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/Raphiiko/wavelink-cli.git"
|
|
11
|
-
},
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/Raphiiko/wavelink-cli/issues"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"wavelink",
|
|
17
|
-
"cli",
|
|
18
|
-
"typescript"
|
|
19
|
-
],
|
|
20
|
-
"main": "dist/index.js",
|
|
21
|
-
"module": "dist/index.js",
|
|
22
|
-
"type": "module",
|
|
23
|
-
"bin": {
|
|
24
|
-
"wavelink-cli": "dist/index.js"
|
|
25
|
-
},
|
|
26
|
-
"files": [
|
|
27
|
-
"dist",
|
|
28
|
-
"src"
|
|
29
|
-
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "bun run scripts/build.js",
|
|
32
|
-
"start": "bun run src/index.ts",
|
|
33
|
-
"format": "prettier --write \"src/**/*.ts\"",
|
|
34
|
-
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
35
|
-
"lint": "eslint src/**/*.ts",
|
|
36
|
-
"lint:fix": "eslint src/**/*.ts --fix",
|
|
37
|
-
"typecheck": "tsc --noEmit",
|
|
38
|
-
"check": "bun run format:check && bun run lint && bun run typecheck",
|
|
39
|
-
"prepublishOnly": "bun run build && bun run check"
|
|
40
|
-
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"@types/bun": "latest",
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
|
44
|
-
"@typescript-eslint/parser": "^8.52.0",
|
|
45
|
-
"eslint": "^9.39.2",
|
|
46
|
-
"eslint-config-prettier": "^10.1.8",
|
|
47
|
-
"eslint-plugin-prettier": "^5.5.4",
|
|
48
|
-
"prettier": "^3.7.4",
|
|
49
|
-
"typescript": "^5"
|
|
50
|
-
},
|
|
51
|
-
"peerDependencies": {
|
|
52
|
-
"typescript": "^5"
|
|
53
|
-
},
|
|
54
|
-
"dependencies": {
|
|
55
|
-
"@raphiiko/wavelink-ts": "^1.
|
|
56
|
-
"commander": "^14.0.2"
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@raphiiko/wavelink-cli",
|
|
3
|
+
"version": "0.0.7",
|
|
4
|
+
"description": "Command line interface for Elgato Wave Link 3.0",
|
|
5
|
+
"author": "Raphiiko",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/Raphiiko/wavelink-cli",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/Raphiiko/wavelink-cli.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/Raphiiko/wavelink-cli/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"wavelink",
|
|
17
|
+
"cli",
|
|
18
|
+
"typescript"
|
|
19
|
+
],
|
|
20
|
+
"main": "dist/index.js",
|
|
21
|
+
"module": "dist/index.js",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"bin": {
|
|
24
|
+
"wavelink-cli": "dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"src"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "bun run scripts/build.js",
|
|
32
|
+
"start": "bun run src/index.ts",
|
|
33
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
34
|
+
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
35
|
+
"lint": "eslint src/**/*.ts",
|
|
36
|
+
"lint:fix": "eslint src/**/*.ts --fix",
|
|
37
|
+
"typecheck": "tsc --noEmit",
|
|
38
|
+
"check": "bun run format:check && bun run lint && bun run typecheck",
|
|
39
|
+
"prepublishOnly": "bun run build && bun run check"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/bun": "latest",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
|
44
|
+
"@typescript-eslint/parser": "^8.52.0",
|
|
45
|
+
"eslint": "^9.39.2",
|
|
46
|
+
"eslint-config-prettier": "^10.1.8",
|
|
47
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
48
|
+
"prettier": "^3.7.4",
|
|
49
|
+
"typescript": "^5"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"typescript": "^5"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@raphiiko/wavelink-ts": "^1.3.0",
|
|
56
|
+
"commander": "^14.0.2"
|
|
57
|
+
}
|
|
58
58
|
}
|
package/src/commands/output.ts
CHANGED
|
@@ -39,7 +39,7 @@ export async function listOutputs(client: WaveLinkClient): Promise<void> {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
for (const device of outputDevices) {
|
|
42
|
-
const isMain = device.id === mainOutput ? " (MAIN OUTPUT)" : "";
|
|
42
|
+
const isMain = device.id === mainOutput.outputDeviceId ? " (MAIN OUTPUT)" : "";
|
|
43
43
|
console.log(`Device: ${device.name || device.id}${isMain}`);
|
|
44
44
|
console.log(` Device ID: ${device.id}`);
|
|
45
45
|
console.log(` Wave Device: ${formatMuted(device.isWaveDevice)}`);
|