orchestrix-yuri 4.5.3 → 4.5.4

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.
@@ -14,7 +14,15 @@ function getProxyConfig() {
14
14
  if (!proxyUrl) return {};
15
15
 
16
16
  try {
17
- const { HttpsProxyAgent } = require('https-proxy-agent');
17
+ // Try multiple resolve paths (global npm may have flat or nested node_modules)
18
+ let HttpsProxyAgent;
19
+ try {
20
+ ({ HttpsProxyAgent } = require('https-proxy-agent'));
21
+ } catch {
22
+ // Fallback: resolve from package root
23
+ const pkgRoot = require('path').join(__dirname, '..', '..', '..');
24
+ ({ HttpsProxyAgent } = require(require('path').join(pkgRoot, 'node_modules', 'https-proxy-agent')));
25
+ }
18
26
  const agent = new HttpsProxyAgent(proxyUrl);
19
27
  log.telegram(`Using proxy: ${proxyUrl}`);
20
28
  return {
@@ -23,8 +31,8 @@ function getProxyConfig() {
23
31
  compress: true,
24
32
  },
25
33
  };
26
- } catch {
27
- log.warn('https-proxy-agent not available, proxy env vars will be ignored');
34
+ } catch (err) {
35
+ log.warn(`Proxy configured but https-proxy-agent unavailable: ${err.message}`);
28
36
  return {};
29
37
  }
30
38
  }
@@ -232,7 +240,13 @@ function forceDisconnectPolling(token) {
232
240
  || process.env.http_proxy || process.env.HTTP_PROXY;
233
241
  if (proxyUrl) {
234
242
  try {
235
- const { HttpsProxyAgent } = require('https-proxy-agent');
243
+ let HttpsProxyAgent;
244
+ try {
245
+ ({ HttpsProxyAgent } = require('https-proxy-agent'));
246
+ } catch {
247
+ const pkgRoot = require('path').join(__dirname, '..', '..', '..');
248
+ ({ HttpsProxyAgent } = require(require('path').join(pkgRoot, 'node_modules', 'https-proxy-agent')));
249
+ }
236
250
  agent = new HttpsProxyAgent(proxyUrl);
237
251
  } catch { /* ok */ }
238
252
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestrix-yuri",
3
- "version": "4.5.3",
3
+ "version": "4.5.4",
4
4
  "description": "Yuri — Meta-Orchestrator for Orchestrix. Drive your entire project lifecycle with natural language.",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {