querysub 0.240.0 → 0.241.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.240.0",
3
+ "version": "0.241.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -95,21 +95,17 @@ export async function streamScreenOutput(config: {
95
95
  const captureCommand = `${prefix}tmux capture-pane -p -S -2000 -t ${screenName}`;
96
96
  // Initial data
97
97
  const initialContent = await runPromise(captureCommand, { quiet: true });
98
- console.log(green(`Callback to onDataWrapped ${screenName} ${initialContent.length}`));
99
98
  if (initialContent) {
100
99
  await onDataWrapped(initialContent);
101
100
  }
102
- console.log(green(`After callback to onDataWrapped ${screenName} ${initialContent.length}`));
103
101
 
104
- childProcess = spawn(`${prefix}tmux pipe-pane -t ${screenName}`, {
102
+ childProcess = spawn(`${prefix}tmux pipe-pane -t ${screenName} 'cat'`, {
105
103
  shell: true,
106
104
  stdio: "pipe",
107
105
  });
108
106
 
109
107
  let started = new PromiseObj<void>();
110
108
 
111
- console.log(green(`Has stdout: ${!!childProcess.stdout}`));
112
-
113
109
  childProcess.stdout?.on("data", (data) => {
114
110
  if (stopped) return;
115
111
  console.log(`Captured data for ${screenName}: ${data.length}`);
@@ -14,7 +14,8 @@ export async function runPromise(command: string, config?: {
14
14
  const childProc = child_process.spawn(command, {
15
15
  shell: true,
16
16
  cwd: config?.cwd,
17
- stdio: ["inherit", "pipe", "pipe"], // stdin: inherit, stdout: pipe, stderr: pipe
17
+ // NOTE: Now we pipe stdin, as I think inheriting it was causing us to block sometimes?
18
+ stdio: ["pipe", "pipe", "pipe"],
18
19
  });
19
20
 
20
21
  let fullOutput = "";