coder-config 0.41.13 → 0.41.15

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.
@@ -19,7 +19,7 @@
19
19
 
20
20
  <!-- PWA Manifest -->
21
21
  <link rel="manifest" href="/manifest.json">
22
- <script type="module" crossorigin src="/assets/index-SSZpx2pC.js"></script>
22
+ <script type="module" crossorigin src="/assets/index-ly45ouwX.js"></script>
23
23
  <link rel="stylesheet" crossorigin href="/assets/index-DN9CerwX.css">
24
24
  </head>
25
25
  <body>
@@ -38,11 +38,19 @@ class TerminalServer {
38
38
  const sessionId = this.generateSessionId();
39
39
  console.log(`Terminal session ${sessionId} connected`);
40
40
 
41
- // Parse query params for initial command and cwd
41
+ // Parse query params for initial command, cwd, and env
42
42
  const url = new URL(req.url, 'http://localhost');
43
43
  const cwd = url.searchParams.get('cwd') || process.cwd();
44
44
  const cmd = url.searchParams.get('cmd') || null;
45
45
 
46
+ // Parse additional env vars from query (env_KEY=VALUE format)
47
+ const extraEnv = {};
48
+ for (const [key, value] of url.searchParams.entries()) {
49
+ if (key.startsWith('env_')) {
50
+ extraEnv[key.substring(4)] = value;
51
+ }
52
+ }
53
+
46
54
  // Create PTY with error handling
47
55
  let ptyProcess;
48
56
  try {
@@ -54,6 +62,7 @@ class TerminalServer {
54
62
  cwd: cwd,
55
63
  env: {
56
64
  ...process.env,
65
+ ...extraEnv,
57
66
  TERM: 'xterm-256color',
58
67
  COLORTERM: 'truecolor',
59
68
  }