@ricsam/r5d-worker 0.0.70 → 0.0.71

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/cjs/main.cjs CHANGED
@@ -2296,7 +2296,10 @@ function resolveHostShell(command, platform = process.platform) {
2296
2296
  return /(?:^|[\\/])cmd\.exe$/i.test(file2) ? { file: file2, args: ["/d", "/s", "/c", command] } : { file: file2, args: ["-Command", command] };
2297
2297
  }
2298
2298
  const file = process.env.SHELL || "/bin/bash";
2299
- return { file, args: command === void 0 ? ["-l"] : ["-lc", command] };
2299
+ if (command === void 0) {
2300
+ return { file, args: ["-l"] };
2301
+ }
2302
+ return { file, args: ["-lc", 'eval "$R5D_SHELL_COMMAND"'], env: { R5D_SHELL_COMMAND: command } };
2300
2303
  }
2301
2304
  async function openPty(input) {
2302
2305
  if (activePtys.has(input.message.ptyId)) {
@@ -2331,7 +2334,8 @@ async function openPty(input) {
2331
2334
  ...githubProcessEnv(),
2332
2335
  ...input.message.env ?? {},
2333
2336
  ...planProcessEnv,
2334
- ...targetProcessEnv
2337
+ ...targetProcessEnv,
2338
+ ...shell.env ?? {}
2335
2339
  }
2336
2340
  },
2337
2341
  onOpened: () => {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-worker",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
4
4
  "type": "commonjs"
5
5
  }
package/dist/mjs/main.mjs CHANGED
@@ -2267,7 +2267,10 @@ function resolveHostShell(command, platform = process.platform) {
2267
2267
  return /(?:^|[\\/])cmd\.exe$/i.test(file2) ? { file: file2, args: ["/d", "/s", "/c", command] } : { file: file2, args: ["-Command", command] };
2268
2268
  }
2269
2269
  const file = process.env.SHELL || "/bin/bash";
2270
- return { file, args: command === void 0 ? ["-l"] : ["-lc", command] };
2270
+ if (command === void 0) {
2271
+ return { file, args: ["-l"] };
2272
+ }
2273
+ return { file, args: ["-lc", 'eval "$R5D_SHELL_COMMAND"'], env: { R5D_SHELL_COMMAND: command } };
2271
2274
  }
2272
2275
  async function openPty(input) {
2273
2276
  if (activePtys.has(input.message.ptyId)) {
@@ -2302,7 +2305,8 @@ async function openPty(input) {
2302
2305
  ...githubProcessEnv(),
2303
2306
  ...input.message.env ?? {},
2304
2307
  ...planProcessEnv,
2305
- ...targetProcessEnv
2308
+ ...targetProcessEnv,
2309
+ ...shell.env ?? {}
2306
2310
  }
2307
2311
  },
2308
2312
  onOpened: () => {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-worker",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
4
4
  "type": "module"
5
5
  }
@@ -209,5 +209,6 @@ export declare function prepareShellEnvForTarget(input: {
209
209
  export declare function resolveHostShell(command?: string, platform?: NodeJS.Platform): {
210
210
  file: string;
211
211
  args: string[];
212
+ env?: Record<string, string>;
212
213
  };
213
214
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricsam/r5d-worker",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
4
4
  "type": "module",
5
5
  "main": "./dist/cjs/main.cjs",
6
6
  "module": "./dist/mjs/main.mjs",