gdharness 1.2.28 → 1.2.30

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/build/keeper.js CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/keeper.ts
4
- import { spawn } from "node:child_process";
5
4
  import { closeSync, existsSync as existsSync2, mkdtempSync as mkdtempSync3, openSync as openSync2, readFileSync as readFileSync2, rmSync as rmSync5, writeFileSync as writeFileSync3 } from "node:fs";
6
5
  import { tmpdir as tmpdir4 } from "node:os";
7
6
  import { join as join5 } from "node:path";
@@ -1095,6 +1094,22 @@ function listening(server, address) {
1095
1094
 
1096
1095
  // src/outside.ts
1097
1096
  import { fileURLToPath } from "node:url";
1097
+
1098
+ // src/spawn.ts
1099
+ import {
1100
+ execFile,
1101
+ execFileSync,
1102
+ spawn,
1103
+ spawnSync
1104
+ } from "node:child_process";
1105
+ function spawnHidden(command, args, options = {}) {
1106
+ return spawn(command, [...args], { ...options, windowsHide: true });
1107
+ }
1108
+ function spawnShown(command, args, options = {}) {
1109
+ return spawn(command, [...args], { ...options, windowsHide: false });
1110
+ }
1111
+
1112
+ // src/outside.ts
1098
1113
  function withChanges(base, changes) {
1099
1114
  const env = { ...base };
1100
1115
  for (const [name, value] of Object.entries(changes)) {
@@ -1128,15 +1143,9 @@ function readLaunched(printed) {
1128
1143
  }
1129
1144
 
1130
1145
  // src/run-record.ts
1131
- import { execFile as execFile2 } from "node:child_process";
1132
1146
  import { createHash as createHash2 } from "node:crypto";
1133
1147
  import { mkdirSync, openSync, readdirSync, readFileSync, realpathSync, rmSync as rmSync3, statSync } from "node:fs";
1134
1148
  import { basename, dirname as dirname2, join as join3, resolve as resolve2 } from "node:path";
1135
- import { promisify as promisify2 } from "node:util";
1136
-
1137
- // src/process-children.ts
1138
- import { execFile } from "node:child_process";
1139
- import { promisify } from "node:util";
1140
1149
 
1141
1150
  // src/windows-ask.ts
1142
1151
  var SCRIPT = [
@@ -1158,9 +1167,6 @@ var SCRIPT = [
1158
1167
  ].join(`
1159
1168
  `);
1160
1169
 
1161
- // src/process-children.ts
1162
- var run = promisify(execFile);
1163
-
1164
1170
  // src/runtime-client.ts
1165
1171
  import { tmpdir as tmpdir2 } from "node:os";
1166
1172
  import { dirname, join as join2, resolve } from "node:path";
@@ -1246,7 +1252,6 @@ function writeWhole(path, text) {
1246
1252
  }
1247
1253
 
1248
1254
  // src/run-record.ts
1249
- var execFileAsync = promisify2(execFile2);
1250
1255
  function runsDirectory() {
1251
1256
  return join3(runtimeDirectory(), "runs");
1252
1257
  }
@@ -1784,10 +1789,9 @@ class ProfileObserver {
1784
1789
  // src/keeper.ts
1785
1790
  async function startDirectly(spec, output, hidden, detached = true, errors = output, directory = process.cwd()) {
1786
1791
  return await new Promise((resolve) => {
1787
- const child = spawn(spec.command, [...spec.args], {
1792
+ const child = (hidden ? spawnHidden : spawnShown)(spec.command, spec.args, {
1788
1793
  stdio: ["ignore", output, errors],
1789
1794
  detached,
1790
- windowsHide: hidden,
1791
1795
  env: withChanges(process.env, spec.envChanges),
1792
1796
  cwd: directory
1793
1797
  });
@@ -1901,10 +1905,9 @@ async function launch() {
1901
1905
  }
1902
1906
  process.exit(0);
1903
1907
  }
1904
- const keeper = spawn(process.execPath, [KEEPER_SCRIPT, "keep"], {
1908
+ const keeper = spawnHidden(process.execPath, [KEEPER_SCRIPT, "keep"], {
1905
1909
  stdio: ["pipe", "pipe", "pipe"],
1906
- detached: true,
1907
- windowsHide: true
1910
+ detached: true
1908
1911
  });
1909
1912
  let printed = "";
1910
1913
  let complained = "";
@@ -1951,7 +1954,7 @@ async function keep() {
1951
1954
  process.exit(1);
1952
1955
  }
1953
1956
  const profiled = run?.profile === undefined ? null : profiledBy(run.profile, run.projectPath);
1954
- const debuggerPeer = run === undefined ? null : await GameDebugger.open(run.breakpoints ?? [], profiled === null ? [] : [profiled.observer]);
1957
+ const debuggerPeer = run === undefined || run.debugged === false ? null : await GameDebugger.open(run.breakpoints ?? [], profiled === null ? [] : [profiled.observer]);
1955
1958
  const toStart = debuggerPeer === null ? spec : { ...spec, args: withEngineArguments(spec.args, debuggerPeer.engineArguments) };
1956
1959
  const transcript = run === undefined ? "ignore" : openSync2(run.transcript, "a");
1957
1960
  const own = run !== undefined && throughTheHelper(spec) ? mkdtempSync3(join5(tmpdir4(), "gdharness-stop-")) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdharness",
3
- "version": "1.2.28",
3
+ "version": "1.2.30",
4
4
  "mcpName": "io.github.Aureliolo/gdharness",
5
5
  "description": "A harness for driving a Godot 4 project from an agent: editor addons, a runtime bridge into the running game, an MCP server in front of them, and a CLI that installs and diagnoses the Godot side.",
6
6
  "type": "module",