channel-worker 1.3.4 → 1.3.5

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.
Files changed (2) hide show
  1. package/lib/nst-manager.js +12 -15
  2. package/package.json +1 -1
@@ -20,10 +20,17 @@ class NstManager {
20
20
  // Get all running browsers
21
21
  async getRunningBrowsers() {
22
22
  try {
23
- const res = await this.api('/browsers/running');
24
- return res?.data || [];
25
- } catch (err) {
26
- console.error(`[nst] Error getting running browsers:`, err.message);
23
+ const rawRes = await fetch(`${this.baseUrl}/browsers/running`, {
24
+ headers: { 'x-api-key': this.apiKey },
25
+ });
26
+ const text = await rawRes.text();
27
+ try {
28
+ const data = JSON.parse(text);
29
+ return data?.data || [];
30
+ } catch {
31
+ return [];
32
+ }
33
+ } catch {
27
34
  return [];
28
35
  }
29
36
  }
@@ -112,17 +119,7 @@ class NstManager {
112
119
  return { profileId, alreadyRunning: true };
113
120
  }
114
121
 
115
- // Update language to en-US
116
- try {
117
- const res = await fetch(`${this.baseUrl}/profiles/${profileId}`, {
118
- method: 'PATCH',
119
- headers: { 'Content-Type': 'application/json', 'x-api-key': this.apiKey },
120
- body: JSON.stringify({ fingerprint: { language: 'en-US' } }),
121
- });
122
- if (!res.ok) console.warn(`[nst] Could not update profile language: ${res.status}`);
123
- } catch (err) {
124
- console.warn(`[nst] Could not update profile language:`, err.message);
125
- }
122
+ // Language set via --lang arg in connectConfig, no need to update profile
126
123
 
127
124
  // Set proxy before launch
128
125
  if (options.proxy) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "channel-worker",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Channel Manager worker daemon — runs on remote machines to execute video pipeline jobs",
5
5
  "main": "lib/daemon.js",
6
6
  "bin": {