@vibecook/ghosttea-electron 0.4.0 → 0.5.1

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.
@@ -37,7 +37,7 @@ async function attachRenderer(rawData, ports) {
37
37
  controlPort.postMessage({
38
38
  requestId: 0,
39
39
  type: "bridge-error",
40
- message: `Invalid terminald response: ${error.message}`,
40
+ message: `Invalid ghosttead response: ${error.message}`,
41
41
  });
42
42
  controlSocket?.destroy();
43
43
  }
@@ -64,7 +64,7 @@ async function attachRenderer(rawData, ports) {
64
64
  if (!message ||
65
65
  typeof message !== "object" ||
66
66
  !["subscription-ack", "frame-gap"].includes(String(message.type))) {
67
- throw new Error("terminald sent an invalid frame-channel message");
67
+ throw new Error("ghosttead sent an invalid frame-channel message");
68
68
  }
69
69
  framePort.postMessage(message);
70
70
  }
@@ -114,7 +114,7 @@ async function attachRenderer(rawData, ports) {
114
114
  if (capabilities) {
115
115
  // Announce support before forwarding the subscription. MessagePort
116
116
  // ordering then guarantees that the renderer knows credits are active
117
- // before terminald can deliver the subscription's first frame.
117
+ // before ghosttead can deliver the subscription's first frame.
118
118
  framePort.postMessage(capabilities);
119
119
  frameFlowEnabled = true;
120
120
  }
@@ -19,7 +19,7 @@ export async function connectSocket(path, token, limit, onPacket, onDisconnect,
19
19
  return;
20
20
  settled = true;
21
21
  socket.destroy();
22
- reject(new Error(`terminald connection timed out during authentication at ${path}`));
22
+ reject(new Error(`ghosttead connection timed out during authentication at ${path}`));
23
23
  }, Math.max(0, deadline - Date.now()));
24
24
  socket.on("error", (error) => {
25
25
  if (!settled) {
@@ -36,10 +36,10 @@ export async function connectSocket(path, token, limit, onPacket, onDisconnect,
36
36
  if (!settled) {
37
37
  settled = true;
38
38
  clearTimeout(timeout);
39
- reject(new Error(`terminald connection closed during authentication at ${path}`));
39
+ reject(new Error(`ghosttead connection closed during authentication at ${path}`));
40
40
  }
41
41
  else if (authenticated) {
42
- onDisconnect(new Error(`terminald connection closed at ${path}`));
42
+ onDisconnect(new Error(`ghosttead connection closed at ${path}`));
43
43
  }
44
44
  });
45
45
  // `openEndpoint` resolves only once connected, so authenticate now.
@@ -52,7 +52,7 @@ export async function connectSocket(path, token, limit, onPacket, onDisconnect,
52
52
  while (buffered.length >= 4) {
53
53
  const length = buffered.readUInt32LE(0);
54
54
  if (length > limit) {
55
- socket.destroy(new Error("terminald packet exceeds bridge quota"));
55
+ socket.destroy(new Error("ghosttead packet exceeds bridge quota"));
56
56
  return;
57
57
  }
58
58
  if (buffered.length < 4 + length)
@@ -64,7 +64,7 @@ export async function connectSocket(path, token, limit, onPacket, onDisconnect,
64
64
  settled = true;
65
65
  clearTimeout(timeout);
66
66
  socket.destroy();
67
- reject(new Error("terminald authentication failed"));
67
+ reject(new Error("ghosttead authentication failed"));
68
68
  return;
69
69
  }
70
70
  authenticated = true;
package/dist/bridge.js CHANGED
@@ -33,7 +33,7 @@ export class GhostteaElectronBridge extends EventEmitter {
33
33
  this.emit("connection-lost", {
34
34
  message: typeof message.message === "string"
35
35
  ? message.message
36
- : "terminald connection lost",
36
+ : "ghosttead connection lost",
37
37
  });
38
38
  }
39
39
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecook/ghosttea-electron",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "Electron lifecycle and direct renderer transport for Ghosttea.",
5
5
  "license": "MIT",
6
6
  "author": "James Yong",
@@ -40,12 +40,12 @@
40
40
  ],
41
41
  "repository": {
42
42
  "type": "git",
43
- "url": "git+https://github.com/jamesyong-42/ghosttea.git",
44
- "directory": "packages/terminal-electron"
43
+ "url": "git+https://github.com/vibecook-dev/ghosttea.git",
44
+ "directory": "packages/ghosttea-electron"
45
45
  },
46
- "homepage": "https://github.com/jamesyong-42/ghosttea#readme",
46
+ "homepage": "https://github.com/vibecook-dev/ghosttea#readme",
47
47
  "bugs": {
48
- "url": "https://github.com/jamesyong-42/ghosttea/issues"
48
+ "url": "https://github.com/vibecook-dev/ghosttea/issues"
49
49
  },
50
50
  "keywords": [
51
51
  "electron",
@@ -64,7 +64,7 @@
64
64
  "prepublishOnly": "npm run build"
65
65
  },
66
66
  "dependencies": {
67
- "@vibecook/ghosttea-client": "0.4.0"
67
+ "@vibecook/ghosttea-client": "0.5.1"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "electron": ">=35"