uloop-cli 0.62.0 → 0.62.2

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.
@@ -5717,6 +5717,32 @@ function findUnityProjectInParentsWithoutUloop(startPath) {
5717
5717
 
5718
5718
  // src/port-resolver.ts
5719
5719
  var DEFAULT_PORT = 8700;
5720
+ function normalizePort(port) {
5721
+ if (typeof port !== "number") {
5722
+ return null;
5723
+ }
5724
+ if (!Number.isInteger(port)) {
5725
+ return null;
5726
+ }
5727
+ if (port < 1 || port > 65535) {
5728
+ return null;
5729
+ }
5730
+ return port;
5731
+ }
5732
+ function resolvePortFromUnitySettings(settings) {
5733
+ const serverPort = normalizePort(settings.serverPort);
5734
+ const customPort = normalizePort(settings.customPort);
5735
+ if (settings.isServerRunning === true && serverPort !== null) {
5736
+ return serverPort;
5737
+ }
5738
+ if (customPort !== null) {
5739
+ return customPort;
5740
+ }
5741
+ if (serverPort !== null) {
5742
+ return serverPort;
5743
+ }
5744
+ return null;
5745
+ }
5720
5746
  async function resolveUnityPort(explicitPort) {
5721
5747
  if (explicitPort !== void 0) {
5722
5748
  return explicitPort;
@@ -5748,13 +5774,7 @@ async function readPortFromSettings(projectRoot) {
5748
5774
  } catch {
5749
5775
  return null;
5750
5776
  }
5751
- if (typeof settings.serverPort === "number") {
5752
- return settings.serverPort;
5753
- }
5754
- if (typeof settings.customPort === "number") {
5755
- return settings.customPort;
5756
- }
5757
- return null;
5777
+ return resolvePortFromUnitySettings(settings);
5758
5778
  }
5759
5779
 
5760
5780
  // src/tool-cache.ts
@@ -5763,7 +5783,7 @@ var import_path3 = require("path");
5763
5783
 
5764
5784
  // src/default-tools.json
5765
5785
  var default_tools_default = {
5766
- version: "0.62.0",
5786
+ version: "0.62.2",
5767
5787
  tools: [
5768
5788
  {
5769
5789
  name: "compile",
@@ -6207,7 +6227,7 @@ function getCachedServerVersion() {
6207
6227
  }
6208
6228
 
6209
6229
  // src/version.ts
6210
- var VERSION = "0.62.0";
6230
+ var VERSION = "0.62.2";
6211
6231
 
6212
6232
  // src/spinner.ts
6213
6233
  var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];