pty-manager 1.9.0 → 1.9.2
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.
- package/dist/index.d.mts +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +18 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -8
- package/dist/index.mjs.map +1 -1
- package/dist/pty-worker.js +18 -8
- package/package.json +1 -1
package/dist/pty-worker.js
CHANGED
|
@@ -582,6 +582,8 @@ var PTYSession = class _PTYSession extends import_events.EventEmitter {
|
|
|
582
582
|
switch (type) {
|
|
583
583
|
case "api_key":
|
|
584
584
|
return "api_key";
|
|
585
|
+
case "cli_auth":
|
|
586
|
+
return "cli_auth";
|
|
585
587
|
case "device_code":
|
|
586
588
|
return "device_code";
|
|
587
589
|
case "oauth":
|
|
@@ -881,14 +883,7 @@ var PTYSession = class _PTYSession extends import_events.EventEmitter {
|
|
|
881
883
|
const command = this.adapter.getCommand();
|
|
882
884
|
const args = this.adapter.getArgs(this.config);
|
|
883
885
|
const adapterEnv = this.adapter.getEnv(this.config);
|
|
884
|
-
const env =
|
|
885
|
-
...process.env,
|
|
886
|
-
...adapterEnv,
|
|
887
|
-
...this.config.env,
|
|
888
|
-
// Force terminal settings
|
|
889
|
-
TERM: "xterm-256color",
|
|
890
|
-
COLORTERM: "truecolor"
|
|
891
|
-
};
|
|
886
|
+
const env = _PTYSession.buildSpawnEnv(this.config, adapterEnv);
|
|
892
887
|
this.logger.info(
|
|
893
888
|
{ sessionId: this.id, command, args: args.join(" ") },
|
|
894
889
|
"Starting PTY session"
|
|
@@ -1270,6 +1265,21 @@ var PTYSession = class _PTYSession extends import_events.EventEmitter {
|
|
|
1270
1265
|
}
|
|
1271
1266
|
}
|
|
1272
1267
|
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Build the environment object for spawning a PTY process.
|
|
1270
|
+
* Merges base env (process.env unless opted out), adapter env, and config env,
|
|
1271
|
+
* with TERM/COLORTERM always forced.
|
|
1272
|
+
*/
|
|
1273
|
+
static buildSpawnEnv(config, adapterEnv) {
|
|
1274
|
+
const baseEnv = config.inheritProcessEnv !== false ? process.env : {};
|
|
1275
|
+
return {
|
|
1276
|
+
...baseEnv,
|
|
1277
|
+
...adapterEnv,
|
|
1278
|
+
...config.env,
|
|
1279
|
+
TERM: "xterm-256color",
|
|
1280
|
+
COLORTERM: "truecolor"
|
|
1281
|
+
};
|
|
1282
|
+
}
|
|
1273
1283
|
/**
|
|
1274
1284
|
* Normalize a list of key names for SPECIAL_KEYS lookup.
|
|
1275
1285
|
*
|
package/package.json
CHANGED