@kzheart_/mc-pilot 0.9.7 → 0.9.8

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.
@@ -16,6 +16,7 @@ export class WebSocketClient {
16
16
  try {
17
17
  const response = await new Promise((resolve, reject) => {
18
18
  const timeout = setTimeout(() => {
19
+ socket.terminate();
19
20
  reject(new MctError({
20
21
  code: "TIMEOUT",
21
22
  message: `Timed out waiting for response from ${this.url}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kzheart_/mc-pilot",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "description": "Minecraft plugin/mod automated testing CLI – control a real Minecraft client to simulate player actions",
5
5
  "type": "module",
6
6
  "bin": {
@@ -35,9 +35,10 @@
35
35
  "node": ">=20"
36
36
  },
37
37
  "scripts": {
38
- "build": "tsc -p tsconfig.json",
39
- "test": "tsc -p tsconfig.json && node --test dist/*.test.js dist/**/*.test.js",
40
- "test:e2e": "tsc -p tsconfig.json && node --test dist/*.e2e.test.js"
38
+ "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
39
+ "build": "npm run clean && tsc -p tsconfig.json",
40
+ "test": "npm run clean && tsc -p tsconfig.json && node --test dist/*.test.js dist/**/*.test.js",
41
+ "test:e2e": "npm run clean && tsc -p tsconfig.json && node --test dist/*.e2e.test.js"
41
42
  },
42
43
  "dependencies": {
43
44
  "@xmcl/core": "^2.15.1",
@@ -1,12 +0,0 @@
1
- export interface CommandLogEntry {
2
- t: number;
3
- iso: string;
4
- argv: string[];
5
- cwd: string;
6
- projectId: string | null;
7
- exitCode: number;
8
- durationMs: number;
9
- errorCode?: string;
10
- errorMessage?: string;
11
- }
12
- export declare function appendCommandHistory(entry: CommandLogEntry): Promise<void>;
@@ -1,13 +0,0 @@
1
- import { appendFile, mkdir } from "node:fs/promises";
2
- import path from "node:path";
3
- import { resolveCommandsLogPath } from "./paths.js";
4
- export async function appendCommandHistory(entry) {
5
- try {
6
- const filePath = resolveCommandsLogPath();
7
- await mkdir(path.dirname(filePath), { recursive: true });
8
- await appendFile(filePath, `${JSON.stringify(entry)}\n`, "utf8");
9
- }
10
- catch {
11
- // Never block the command on logging failure
12
- }
13
- }