episoda 0.2.39 → 0.2.40

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.
@@ -2726,7 +2726,7 @@ var require_package = __commonJS({
2726
2726
  "package.json"(exports2, module2) {
2727
2727
  module2.exports = {
2728
2728
  name: "episoda",
2729
- version: "0.2.39",
2729
+ version: "0.2.40",
2730
2730
  description: "CLI tool for Episoda local development workflow orchestration",
2731
2731
  main: "dist/index.js",
2732
2732
  types: "dist/index.d.ts",
@@ -6892,10 +6892,17 @@ var Daemon = class _Daemon {
6892
6892
  serverUrl = config.project_settings.local_server_url;
6893
6893
  console.log(`[Daemon] Using cached server URL: ${serverUrl}`);
6894
6894
  }
6895
- const serverUrlObj = new URL(serverUrl);
6896
- const wsProtocol = serverUrlObj.protocol === "https:" ? "wss:" : "ws:";
6897
- const wsPort = process.env.EPISODA_WS_PORT || "3001";
6898
- const wsUrl = `${wsProtocol}//${serverUrlObj.hostname}:${wsPort}`;
6895
+ let wsUrl;
6896
+ if (config.ws_url) {
6897
+ wsUrl = config.ws_url;
6898
+ console.log(`[Daemon] Using configured ws_url: ${wsUrl}`);
6899
+ } else {
6900
+ const serverUrlObj = new URL(serverUrl);
6901
+ const wsProtocol = serverUrlObj.protocol === "https:" ? "wss:" : "ws:";
6902
+ const wsPort = process.env.EPISODA_WS_PORT || "3001";
6903
+ const wsHostname = serverUrlObj.hostname === "episoda.dev" ? "ws.episoda.dev" : serverUrlObj.hostname;
6904
+ wsUrl = `${wsProtocol}//${wsHostname}:${wsPort}`;
6905
+ }
6899
6906
  console.log(`[Daemon] Connecting to ${wsUrl} for project ${projectId}...`);
6900
6907
  const client = new import_core10.EpisodaClient();
6901
6908
  const gitExecutor = new import_core10.GitExecutor();