uloop-cli 0.62.2 → 0.62.4

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.
@@ -5783,7 +5783,7 @@ var import_path3 = require("path");
5783
5783
 
5784
5784
  // src/default-tools.json
5785
5785
  var default_tools_default = {
5786
- version: "0.62.2",
5786
+ version: "0.62.4",
5787
5787
  tools: [
5788
5788
  {
5789
5789
  name: "compile",
@@ -6227,7 +6227,7 @@ function getCachedServerVersion() {
6227
6227
  }
6228
6228
 
6229
6229
  // src/version.ts
6230
- var VERSION = "0.62.2";
6230
+ var VERSION = "0.62.4";
6231
6231
 
6232
6232
  // src/spinner.ts
6233
6233
  var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
@@ -8183,14 +8183,17 @@ function registerFocusWindowCommand(program3) {
8183
8183
  }
8184
8184
 
8185
8185
  // src/cli.ts
8186
+ var LAUNCH_COMMAND = "launch";
8187
+ var UPDATE_COMMAND = "update";
8188
+ var NO_SYNC_FLAGS = ["-v", "--version", "-h", "--help"];
8186
8189
  var BUILTIN_COMMANDS = [
8187
8190
  "list",
8188
8191
  "sync",
8189
8192
  "completion",
8190
- "update",
8193
+ UPDATE_COMMAND,
8191
8194
  "fix",
8192
8195
  "skills",
8193
- "launch",
8196
+ LAUNCH_COMMAND,
8194
8197
  "focus-window"
8195
8198
  ];
8196
8199
  var program2 = new Command();
@@ -8696,27 +8699,37 @@ function commandExists(cmdName) {
8696
8699
  const tools = loadToolsCache();
8697
8700
  return tools.tools.some((t) => t.name === cmdName);
8698
8701
  }
8702
+ function shouldSkipAutoSync(cmdName, args) {
8703
+ if (cmdName === LAUNCH_COMMAND || cmdName === UPDATE_COMMAND) {
8704
+ return true;
8705
+ }
8706
+ return args.some((arg) => NO_SYNC_FLAGS.includes(arg));
8707
+ }
8699
8708
  async function main() {
8700
8709
  if (handleCompletionOptions()) {
8701
8710
  return;
8702
8711
  }
8703
- const cachedVersion = loadToolsCache().version;
8704
- if (hasCacheFile() && cachedVersion !== VERSION) {
8705
- console.log(
8706
- `\x1B[33mCache outdated (${cachedVersion} \u2192 ${VERSION}). Syncing tools from Unity...\x1B[0m`
8707
- );
8708
- try {
8709
- await syncTools({});
8710
- console.log("\x1B[32m\u2713 Tools synced successfully.\x1B[0m\n");
8711
- } catch (error) {
8712
- const message = error instanceof Error ? error.message : String(error);
8713
- if (isConnectionError(message)) {
8714
- console.error("\x1B[33mWarning: Failed to sync tools. Using cached definitions.\x1B[0m");
8715
- console.error("\x1B[33mRun 'uloop sync' manually when Unity is available.\x1B[0m\n");
8716
- } else {
8717
- console.error("\x1B[33mWarning: Failed to sync tools. Using cached definitions.\x1B[0m");
8718
- console.error(`\x1B[33mError: ${message}\x1B[0m`);
8719
- console.error("\x1B[33mRun 'uloop sync' manually when Unity is available.\x1B[0m\n");
8712
+ const args = process.argv.slice(2);
8713
+ const cmdName = args.find((arg) => !arg.startsWith("-"));
8714
+ if (!shouldSkipAutoSync(cmdName, args)) {
8715
+ const cachedVersion = loadToolsCache().version;
8716
+ if (hasCacheFile() && cachedVersion !== VERSION) {
8717
+ console.log(
8718
+ `\x1B[33mCache outdated (${cachedVersion} \u2192 ${VERSION}). Syncing tools from Unity...\x1B[0m`
8719
+ );
8720
+ try {
8721
+ await syncTools({});
8722
+ console.log("\x1B[32m\u2713 Tools synced successfully.\x1B[0m\n");
8723
+ } catch (error) {
8724
+ const message = error instanceof Error ? error.message : String(error);
8725
+ if (isConnectionError(message)) {
8726
+ console.error("\x1B[33mWarning: Failed to sync tools. Using cached definitions.\x1B[0m");
8727
+ console.error("\x1B[33mRun 'uloop sync' manually when Unity is available.\x1B[0m\n");
8728
+ } else {
8729
+ console.error("\x1B[33mWarning: Failed to sync tools. Using cached definitions.\x1B[0m");
8730
+ console.error(`\x1B[33mError: ${message}\x1B[0m`);
8731
+ console.error("\x1B[33mRun 'uloop sync' manually when Unity is available.\x1B[0m\n");
8732
+ }
8720
8733
  }
8721
8734
  }
8722
8735
  }
@@ -8724,8 +8737,6 @@ async function main() {
8724
8737
  for (const tool of toolsCache.tools) {
8725
8738
  registerToolCommand(tool);
8726
8739
  }
8727
- const args = process.argv.slice(2);
8728
- const cmdName = args.find((arg) => !arg.startsWith("-"));
8729
8740
  if (cmdName && !commandExists(cmdName)) {
8730
8741
  console.log(`\x1B[33mUnknown command '${cmdName}'. Syncing tools from Unity...\x1B[0m`);
8731
8742
  try {