@livedesk/client 0.1.13 → 0.1.14

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/README.md CHANGED
@@ -9,7 +9,7 @@ npx @livedesk/client 3
9
9
 
10
10
  The default flow opens Google sign-in, waits for the active LiveDesk manager
11
11
  published by the same account, and connects locally. If the manager is not
12
- ready yet, the client keeps checking every second instead of exiting. Omit the
12
+ ready yet, the client keeps checking every 5 seconds instead of exiting. Omit the
13
13
  number for first-available placement, or pass `1` to `999` to pin this machine
14
14
  to a screen wall slot.
15
15
 
@@ -32,7 +32,7 @@ Usage:
32
32
  Default flow:
33
33
  Opens Google sign-in, waits for the signed-in manager, and connects locally.
34
34
  Omit the number for first-available placement, or pass 1-999 to pin a slot.
35
- If no manager is active yet, the client keeps checking every second.
35
+ If no manager is active yet, the client keeps checking every 5 seconds.
36
36
 
37
37
  Options:
38
38
  --slot <number> Screen wall slot number for this computer.
@@ -548,17 +548,18 @@ async function resolveManagerFromSupabase(supabase, options = {}) {
548
548
  }
549
549
 
550
550
  async function waitForManagerFromSupabase(supabase, options = {}) {
551
- const intervalMs = Math.max(250, Number(options.intervalMs || 1000));
551
+ const intervalMs = Math.max(1000, Number(options.intervalMs || 5000));
552
+ const intervalSeconds = Math.max(1, Math.round(intervalMs / 1000));
552
553
  let attempts = 0;
553
554
  let lastMessage = '';
554
- console.log('Waiting for a LiveDesk manager. This client will keep trying every 1s.');
555
+ console.log(`Waiting for a LiveDesk manager. This client will keep trying every ${intervalSeconds}s.`);
555
556
  while (true) {
556
557
  attempts += 1;
557
558
  try {
558
559
  return await resolveManagerFromSupabase(supabase, { requireReachable: true });
559
560
  } catch (err) {
560
561
  const message = err instanceof Error ? err.message : String(err);
561
- if (message !== lastMessage || attempts === 1 || attempts % 10 === 0) {
562
+ if (message !== lastMessage || attempts === 1 || attempts % 6 === 0) {
562
563
  const suffix = attempts === 1 ? '' : ` attempt ${attempts}`;
563
564
  console.log(`Still waiting for LiveDesk manager${suffix}: ${message}`);
564
565
  lastMessage = message;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livedesk/client",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "LiveDesk local remote client",
5
5
  "type": "module",
6
6
  "bin": {