@modelriver/cli 1.2.2 → 1.2.3

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/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@modelriver/cli",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "ModelRiver CLI for testing webhooks and WebSockets from production",
5
5
  "main": "src/index.js",
6
6
  "bin": {
7
- "modelriver": "./bin/modelriver"
7
+ "modelriver": "bin/modelriver"
8
8
  },
9
9
  "scripts": {
10
10
  "start": "node bin/modelriver",
@@ -24,19 +24,19 @@
24
24
  "license": "MIT",
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "https://github.com/modelriver/modelriver-cli.git"
27
+ "url": "git+https://github.com/modelriver/modelriver-cli.git"
28
28
  },
29
29
  "homepage": "https://modelriver.com",
30
30
  "bugs": {
31
31
  "url": "https://github.com/modelriver/modelriver-cli/issues"
32
32
  },
33
33
  "dependencies": {
34
- "commander": "^11.1.0",
35
- "axios": "^1.6.0",
36
- "ws": "^8.14.2",
34
+ "axios": "^1.16.0",
37
35
  "chalk": "^4.1.2",
36
+ "commander": "^11.1.0",
37
+ "express": "^4.22.1",
38
38
  "ora": "^5.4.1",
39
- "express": "^4.18.2"
39
+ "ws": "^8.20.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "jest": "^29.7.0"
@@ -49,4 +49,4 @@
49
49
  "src/",
50
50
  "README.md"
51
51
  ]
52
- }
52
+ }
@@ -194,7 +194,7 @@ async function websocketCommand(options) {
194
194
 
195
195
  // Set up response listener BEFORE waiting (to catch responses that arrive quickly)
196
196
  let responseReceived = false;
197
-
197
+
198
198
  // Timeout after 5 minutes
199
199
  const timeoutId = setTimeout(() => {
200
200
  if (!responseReceived) {
@@ -88,7 +88,7 @@ class WebSocketClient {
88
88
  }
89
89
 
90
90
  const joinRef = '1';
91
-
91
+
92
92
  const joinMsg = JSON.stringify({
93
93
  topic: channelName,
94
94
  event: 'phx_join',
@@ -110,7 +110,7 @@ class WebSocketClient {
110
110
  resolved = true;
111
111
  // Remove this listener - handleMessage() will continue processing other messages
112
112
  this.ws.removeListener('message', handleJoinResponse);
113
-
113
+
114
114
  if (msg.payload.status === 'ok') {
115
115
  this.channel = channelName;
116
116
  resolve(msg.payload);
@@ -126,7 +126,7 @@ class WebSocketClient {
126
126
  // Add listener for join response
127
127
  // The handleMessage() listener in connect() will also be called, but won't match
128
128
  this.ws.on('message', handleJoinResponse);
129
-
129
+
130
130
  this.ws.send(joinMsg);
131
131
 
132
132
  // Timeout after 10 seconds