airterm 1.2.1 → 1.2.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.
Files changed (2) hide show
  1. package/dist/cli.js +25 -5
  2. package/package.json +1 -3
package/dist/cli.js CHANGED
@@ -283,7 +283,6 @@ function SelectMachine({
283
283
  // src/components/Connecting.tsx
284
284
  import { useEffect as useEffect2, useState as useState4 } from "react";
285
285
  import { Box as Box5, Text as Text5, useApp as useApp2 } from "ink";
286
- import Spinner from "ink-spinner";
287
286
  import { execFileSync } from "child_process";
288
287
  import { createInterface } from "readline";
289
288
 
@@ -322,6 +321,15 @@ function connectSSH(conn, command) {
322
321
 
323
322
  // src/components/Connecting.tsx
324
323
  import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
324
+ var spinnerFrames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
325
+ function Dots() {
326
+ const [i, setI] = useState4(0);
327
+ useEffect2(() => {
328
+ const id = setInterval(() => setI((p) => (p + 1) % spinnerFrames.length), 80);
329
+ return () => clearInterval(id);
330
+ }, []);
331
+ return /* @__PURE__ */ jsx5(Text5, { children: spinnerFrames[i] });
332
+ }
325
333
  function isGloballyInstalled() {
326
334
  try {
327
335
  const p = execFileSync("which", ["airterm"], {
@@ -405,12 +413,24 @@ function Connecting({ code, connection, onError }) {
405
413
  console.log("");
406
414
  try {
407
415
  execFileSync("npm", ["install", "-g", "airterm"], {
408
- stdio: "inherit"
416
+ stdio: "pipe"
409
417
  });
410
- console.log("\nNext time, just type `airterm`.\n");
418
+ const installed = isGloballyInstalled();
419
+ if (installed) {
420
+ console.log("\x1B[32mInstalled.\x1B[0m");
421
+ console.log(
422
+ `
423
+ Next time, just type \x1B[1m\x1B[36mairterm\x1B[0m.
424
+ `
425
+ );
426
+ } else {
427
+ console.log(
428
+ "Install may have failed. Try manually: npm install -g airterm\n"
429
+ );
430
+ }
411
431
  } catch {
412
432
  console.log(
413
- "\nInstall failed. You can try manually: npm install -g airterm\n"
433
+ "Install failed. Try manually: npm install -g airterm\n"
414
434
  );
415
435
  }
416
436
  } else {
@@ -434,7 +454,7 @@ function Connecting({ code, connection, onError }) {
434
454
  return /* @__PURE__ */ jsxs4(Box5, { flexDirection: "column", children: [
435
455
  /* @__PURE__ */ jsx5(Header, {}),
436
456
  /* @__PURE__ */ jsxs4(Box5, { children: [
437
- /* @__PURE__ */ jsx5(Text5, { color: "cyan", children: /* @__PURE__ */ jsx5(Spinner, { type: "dots" }) }),
457
+ /* @__PURE__ */ jsx5(Text5, { color: "cyan", children: /* @__PURE__ */ jsx5(Dots, {}) }),
438
458
  /* @__PURE__ */ jsxs4(Text5, { children: [
439
459
  " ",
440
460
  status
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "airterm",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "SSH into your AirClaw machine",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,8 +16,6 @@
16
16
  "dependencies": {
17
17
  "ink": "^5.1.0",
18
18
  "ink-link": "5",
19
- "ink-select-input": "^6.0.0",
20
- "ink-spinner": "^5.0.0",
21
19
  "ink-text-input": "^6.0.0",
22
20
  "react": "^18.3.1"
23
21
  },