aem-ext-daemon 0.3.5 → 0.3.6

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.
@@ -5,7 +5,7 @@
5
5
  * shell:exec runs a command and returns the full output.
6
6
  */
7
7
  import type { DaemonConnection } from "../connection.js";
8
- /** Run a shell command synchronously and return stdout. */
8
+ /** Run a shell command synchronously and return stdout + stderr. */
9
9
  export declare function exec(command: string, cwd: string): string;
10
10
  /** Check if AIO CLI is installed and return its version. */
11
11
  export declare function checkAio(): string;
@@ -35,19 +35,26 @@ function getEnhancedEnv() {
35
35
  PATH: `${extraPaths.join(":")}:${currentPath}`,
36
36
  };
37
37
  }
38
- /** Run a shell command synchronously and return stdout. */
38
+ /** Run a shell command synchronously and return stdout + stderr. */
39
39
  export function exec(command, cwd) {
40
40
  if (!command)
41
41
  throw new Error("command is required");
42
- const result = execSync(command, {
42
+ // Redirect stderr to stdout so we capture everything, and ensure
43
+ // no interactive prompts leak to the daemon terminal.
44
+ // Also set CI=true and TERM=dumb so CLIs skip interactive prompts.
45
+ const wrappedCommand = `${command} 2>&1`;
46
+ const result = execSync(wrappedCommand, {
43
47
  cwd,
44
48
  timeout: EXEC_TIMEOUT,
45
49
  maxBuffer: MAX_BUFFER,
46
50
  encoding: "utf-8",
47
51
  shell: getUserShell(),
48
- env: getEnhancedEnv(),
49
- // Pipe all stdio so interactive prompts don't bleed into the daemon terminal.
50
- // stdin is /dev/null so commands that prompt for input fail fast instead of hanging.
52
+ env: {
53
+ ...getEnhancedEnv(),
54
+ CI: "true",
55
+ TERM: "dumb",
56
+ NO_COLOR: "1",
57
+ },
51
58
  stdio: ["pipe", "pipe", "pipe"],
52
59
  });
53
60
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aem-ext-daemon",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Local daemon for AEM Extension Builder — connects your machine to the cloud UI",
5
5
  "type": "module",
6
6
  "bin": {