@blaxel/core 0.2.49-dev.212 → 0.2.49-dev.213

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.
@@ -10,7 +10,7 @@ function getPackageVersion() {
10
10
  if (typeof require !== "undefined") {
11
11
  // Try to require package.json (Node.js only, gracefully fails in browser)
12
12
  // eslint-disable-next-line @typescript-eslint/no-require-imports
13
- const packageJson = {"version":"0.2.49-dev.212","commit":"ffb14f0cc60bc71b20a21fe8bd537e30dd7616d0"};
13
+ const packageJson = {"version":"0.2.49-dev.213","commit":"6b51b11f0b2030cfdcd965e446466b79a79707f5"};
14
14
  return packageJson.version || "unknown";
15
15
  }
16
16
  else {
@@ -62,7 +62,7 @@ function getCommitHash() {
62
62
  if (typeof require !== "undefined") {
63
63
  // Try to require package.json and look for commit field (set during build)
64
64
  // eslint-disable-next-line @typescript-eslint/no-require-imports
65
- const packageJson = {"version":"0.2.49-dev.212","commit":"ffb14f0cc60bc71b20a21fe8bd537e30dd7616d0"};
65
+ const packageJson = {"version":"0.2.49-dev.213","commit":"6b51b11f0b2030cfdcd965e446466b79a79707f5"};
66
66
  // Check for commit in various possible locations
67
67
  const commit = packageJson.commit || packageJson.buildInfo?.commit;
68
68
  if (commit) {
@@ -110,7 +110,7 @@ class SandboxProcessWebSocket extends action_js_1.SandboxAction {
110
110
  }
111
111
  async list() {
112
112
  const data = await this.wsClient.send("process:list", {});
113
- return data;
113
+ return data.processes || [];
114
114
  }
115
115
  async stop(identifier) {
116
116
  const data = await this.wsClient.send("process:stop", { identifier });
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebSocketClient = void 0;
4
4
  const uuid_1 = require("uuid");
5
5
  const node_js_1 = require("../../common/node.js");
6
+ const settings_js_1 = require("../../common/settings.js");
6
7
  class WebSocketClient {
7
8
  ws = null;
8
9
  WebSocketClass = null;
9
10
  url;
10
- headers;
11
11
  reconnect;
12
12
  reconnectInterval;
13
13
  maxReconnectAttempts;
@@ -21,7 +21,6 @@ class WebSocketClient {
21
21
  lastPongReceived = Date.now();
22
22
  constructor(options) {
23
23
  this.url = options.url;
24
- this.headers = options.headers || {};
25
24
  this.reconnect = options.reconnect ?? true;
26
25
  this.reconnectInterval = options.reconnectInterval ?? 5000;
27
26
  this.maxReconnectAttempts = options.maxReconnectAttempts ?? 5;
@@ -55,14 +54,9 @@ class WebSocketClient {
55
54
  if (!wsUrl.endsWith("/ws")) {
56
55
  wsUrl = `${wsUrl}/ws`;
57
56
  }
58
- // Create WebSocket with headers (if supported by the environment)
59
- const wsOptions = {};
60
- if (Object.keys(this.headers).length > 0) {
61
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
62
- wsOptions.headers = this.headers;
63
- }
57
+ wsUrl = `${wsUrl}?token=${settings_js_1.settings.token}`;
64
58
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
65
- this.ws = new this.WebSocketClass(wsUrl, wsOptions);
59
+ this.ws = new this.WebSocketClass(wsUrl);
66
60
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
67
61
  this.ws.onopen = () => {
68
62
  this.reconnectAttempts = 0;
@@ -23,7 +23,6 @@ export declare class WebSocketClient {
23
23
  private ws;
24
24
  private WebSocketClass;
25
25
  private url;
26
- private headers;
27
26
  private reconnect;
28
27
  private reconnectInterval;
29
28
  private maxReconnectAttempts;