adhdev 0.6.25 → 0.6.29

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/index.js CHANGED
@@ -30017,13 +30017,13 @@ ${e?.stack || ""}`);
30017
30017
  const transport = url2.includes("transport=tcp") ? "tcp" : "udp";
30018
30018
  const isTls = url2.startsWith("turns:");
30019
30019
  const parts = cleanUrl.replace(/^turns?:/, "").split(":");
30020
- const hostname4 = parts[0];
30020
+ const hostname5 = parts[0];
30021
30021
  const port = parseInt(parts[1]) || (isTls ? 5349 : 3478);
30022
30022
  let relayType = "TurnUdp";
30023
30023
  if (isTls) relayType = "TurnTls";
30024
30024
  else if (transport === "tcp") relayType = "TurnTcp";
30025
30025
  converted.push({
30026
- hostname: hostname4,
30026
+ hostname: hostname5,
30027
30027
  port,
30028
30028
  username: server.username,
30029
30029
  password: server.credential,
@@ -30748,7 +30748,7 @@ var init_adhdev_daemon = __esm({
30748
30748
  fs11 = __toESM(require("fs"));
30749
30749
  path14 = __toESM(require("path"));
30750
30750
  import_chalk2 = __toESM(require("chalk"));
30751
- pkgVersion = "0.6.25";
30751
+ pkgVersion = "0.6.29";
30752
30752
  if (pkgVersion === "unknown") {
30753
30753
  try {
30754
30754
  const possiblePaths = [
@@ -30876,6 +30876,8 @@ ${err?.stack || ""}`);
30876
30876
  type: "adhdev-daemon",
30877
30877
  version: pkgVersion,
30878
30878
  platform: os16.platform(),
30879
+ hostname: os16.hostname(),
30880
+ machineId: config2.machineId,
30879
30881
  instanceId
30880
30882
  }
30881
30883
  });
@@ -31268,13 +31270,12 @@ async function quickSetup() {
31268
31270
  markSetupComplete(["daemon"], ["adhdev"]);
31269
31271
  if (loginResult) {
31270
31272
  const configUpdate = {
31271
- connectionToken: loginResult.connectionToken,
31273
+ machineSecret: loginResult.machineSecret,
31272
31274
  userEmail: loginResult.email,
31273
31275
  userName: loginResult.name
31274
31276
  };
31275
- if (loginResult.machineId && loginResult.machineSecret) {
31277
+ if (loginResult.machineId) {
31276
31278
  configUpdate.machineId = loginResult.machineId;
31277
- configUpdate.machineSecret = loginResult.machineSecret;
31278
31279
  console.log(import_chalk3.default.green(` \u2713 Machine registered`));
31279
31280
  }
31280
31281
  updateConfig(configUpdate);
@@ -31365,12 +31366,11 @@ async function loginFlow() {
31365
31366
  return null;
31366
31367
  }
31367
31368
  const data = await res.json();
31368
- if (data.status === "completed" && data.connectionToken) {
31369
+ if (data.status === "completed" && data.machineSecret) {
31369
31370
  pollSpinner.succeed(`Authenticated as ${import_chalk3.default.bold(data.user?.email || "user")}`);
31370
31371
  return {
31371
- connectionToken: data.connectionToken,
31372
31372
  machineId: data.machineId || void 0,
31373
- machineSecret: data.machineSecret || void 0,
31373
+ machineSecret: data.machineSecret,
31374
31374
  email: data.user?.email,
31375
31375
  name: data.user?.name
31376
31376
  };