regula-wasi 3.2.5 → 3.2.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.
Files changed (3) hide show
  1. package/index.js +9 -1
  2. package/package.json +1 -1
  3. package/regula.wasm +0 -0
package/index.js CHANGED
@@ -85,7 +85,7 @@ export async function runRegula(paths, options = {}) {
85
85
  const cliPath = join(__dirname, "cli.js");
86
86
  const command = `node ${cliPath} ${args.join(" ")}`;
87
87
 
88
- execFile("node", [cliPath, ...args], { maxBuffer: 50 * 1024 * 1024 }, (error, stdout, stderr) => {
88
+ const child = execFile("node", [cliPath, ...args], { maxBuffer: 50 * 1024 * 1024 }, (error, stdout, stderr) => {
89
89
  const exitCode = error?.code || 0;
90
90
 
91
91
  // If there was an execution error (not just a non-zero exit), reject with details
@@ -117,6 +117,14 @@ export async function runRegula(paths, options = {}) {
117
117
  );
118
118
  }
119
119
  });
120
+
121
+ // With no path arguments the regula CLI falls back to reading stdin. execFile
122
+ // always hands the child an open stdin pipe, so without an explicit EOF the
123
+ // WASI process blocks on read forever and this promise never settles.
124
+ // Note: execFile ignores the `stdio` option (it owns the pipes to build the
125
+ // callback's stdout/stderr), and `input` is execFileSync-only — closing the
126
+ // stream on the returned handle is what actually delivers EOF.
127
+ child.stdin.end();
120
128
  });
121
129
  }
122
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "regula-wasi",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "description": "Infrastructure as Code security and compliance evaluation tool (WASI build). Fork of fugue/regula with security patches.",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/regula.wasm CHANGED
Binary file