dtu-github-actions 0.3.2 → 0.3.3

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.
@@ -1,6 +1,6 @@
1
1
  import polka from "polka";
2
2
  import bodyParser from "body-parser";
3
- import { execa } from "execa";
3
+ import { exec } from "node:child_process";
4
4
  import fs from "node:fs";
5
5
  import path from "node:path";
6
6
  import { config } from "../config.js";
@@ -15,7 +15,9 @@ import { registerArtifactRoutes } from "./routes/artifacts.js";
15
15
  async function terminateOldProcess() {
16
16
  // Kill existing process on DTU port
17
17
  try {
18
- await execa("kill", ["-9", `$(lsof -t -i:${config.DTU_PORT})`], { shell: true, reject: false });
18
+ await new Promise((resolve) => {
19
+ exec(`lsof -t -i:${config.DTU_PORT} | xargs kill -9`, () => resolve());
20
+ });
19
21
  }
20
22
  catch {
21
23
  // Ignore error if no process found
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtu-github-actions",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Digital Twin Universe - GitHub Actions Mock and Simulation",
5
5
  "keywords": [],
6
6
  "license": "FSL-1.1-MIT",
@@ -34,7 +34,6 @@
34
34
  "@types/body-parser": "^1.19.6",
35
35
  "@types/node": "^22.10.2",
36
36
  "@types/polka": "^0.5.8",
37
- "execa": "^9.6.1",
38
37
  "tsx": "^4.19.2",
39
38
  "vitest": "^4.0.18"
40
39
  },