uloop-cli 0.54.2 → 0.54.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.
- package/dist/cli.bundle.cjs +19 -7
- package/dist/cli.bundle.cjs.map +2 -2
- package/package.json +1 -1
- package/src/cli.ts +18 -4
- package/src/default-tools.json +1 -1
- package/src/execute-tool.ts +5 -1
- package/src/version.ts +1 -1
package/dist/cli.bundle.cjs
CHANGED
|
@@ -5759,7 +5759,7 @@ var import_path3 = require("path");
|
|
|
5759
5759
|
|
|
5760
5760
|
// src/default-tools.json
|
|
5761
5761
|
var default_tools_default = {
|
|
5762
|
-
version: "0.54.
|
|
5762
|
+
version: "0.54.3",
|
|
5763
5763
|
tools: [
|
|
5764
5764
|
{
|
|
5765
5765
|
name: "compile",
|
|
@@ -6190,7 +6190,7 @@ function getCacheFilePath() {
|
|
|
6190
6190
|
}
|
|
6191
6191
|
|
|
6192
6192
|
// src/version.ts
|
|
6193
|
-
var VERSION = "0.54.
|
|
6193
|
+
var VERSION = "0.54.3";
|
|
6194
6194
|
|
|
6195
6195
|
// src/spinner.ts
|
|
6196
6196
|
var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
@@ -6260,7 +6260,7 @@ function isRetryableError(error) {
|
|
|
6260
6260
|
return false;
|
|
6261
6261
|
}
|
|
6262
6262
|
const message = error.message;
|
|
6263
|
-
return message.includes("ECONNREFUSED") || message === "UNITY_NO_RESPONSE";
|
|
6263
|
+
return message.includes("ECONNREFUSED") || message.includes("EADDRNOTAVAIL") || message === "UNITY_NO_RESPONSE";
|
|
6264
6264
|
}
|
|
6265
6265
|
function isVersionOlder(v1, v2) {
|
|
6266
6266
|
const parsed1 = semver.valid(v1);
|
|
@@ -7328,6 +7328,15 @@ function extractGlobalOptions(options) {
|
|
|
7328
7328
|
port: options["port"]
|
|
7329
7329
|
};
|
|
7330
7330
|
}
|
|
7331
|
+
function isConnectionError(message) {
|
|
7332
|
+
return message.includes("ECONNREFUSED") || message.includes("EADDRNOTAVAIL");
|
|
7333
|
+
}
|
|
7334
|
+
function printConnectionError() {
|
|
7335
|
+
console.error("\x1B[31mError: Cannot connect to Unity.\x1B[0m");
|
|
7336
|
+
console.error("Make sure Unity Editor is open and uLoopMCP server is running.");
|
|
7337
|
+
console.error("");
|
|
7338
|
+
console.error("[For AI] Please report the above to the user.");
|
|
7339
|
+
}
|
|
7331
7340
|
async function runWithErrorHandling(fn) {
|
|
7332
7341
|
try {
|
|
7333
7342
|
await fn();
|
|
@@ -7353,9 +7362,8 @@ async function runWithErrorHandling(fn) {
|
|
|
7353
7362
|
console.error("Unity may be compiling, reloading, or starting. Please wait and try again.");
|
|
7354
7363
|
process.exit(1);
|
|
7355
7364
|
}
|
|
7356
|
-
if (message
|
|
7357
|
-
|
|
7358
|
-
console.error("Make sure Unity is running with uLoopMCP installed.");
|
|
7365
|
+
if (isConnectionError(message)) {
|
|
7366
|
+
printConnectionError();
|
|
7359
7367
|
process.exit(1);
|
|
7360
7368
|
}
|
|
7361
7369
|
console.error(`\x1B[31mError: ${message}\x1B[0m`);
|
|
@@ -7659,7 +7667,11 @@ async function main() {
|
|
|
7659
7667
|
}
|
|
7660
7668
|
} catch (error) {
|
|
7661
7669
|
const message = error instanceof Error ? error.message : String(error);
|
|
7662
|
-
|
|
7670
|
+
if (isConnectionError(message)) {
|
|
7671
|
+
printConnectionError();
|
|
7672
|
+
} else {
|
|
7673
|
+
console.error(`\x1B[31mError: Failed to sync tools: ${message}\x1B[0m`);
|
|
7674
|
+
}
|
|
7663
7675
|
process.exit(1);
|
|
7664
7676
|
}
|
|
7665
7677
|
}
|