xedoc-cli 0.1.8 → 0.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xedoc-cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Local web UI for Codex account, chat, execution, and workspace management.",
5
5
  "author": "Edward Nguyen <monokaijs@gmail.com>",
6
6
  "type": "module",
@@ -70,7 +70,6 @@ export function installTerminalSocketHandlers(io, options = {}) {
70
70
  const projectPath = await resolveProjectPath(resolveDirectory, payload)
71
71
  joinProjectRoom(socket, projectPath)
72
72
  const terminal = createTerminal(projectPath, payload)
73
- socket.join(terminalRoomName(terminal.id))
74
73
  broadcastProject(io, projectPath)
75
74
  broadcastCount(io)
76
75
  return {
@@ -106,7 +105,7 @@ export function installTerminalSocketHandlers(io, options = {}) {
106
105
  if (terminal.status !== "running" || !terminal.pty) {
107
106
  throw new Error("Terminal is not running.")
108
107
  }
109
- const data = readString(payload?.data, "data")
108
+ const data = readTerminalInputData(payload?.data)
110
109
  if (Buffer.byteLength(data, "utf8") > MAX_TERMINAL_INPUT_BYTES) {
111
110
  throw new Error("Terminal input is too large.")
112
111
  }
@@ -375,6 +374,13 @@ function readString(value, fieldName) {
375
374
  return value
376
375
  }
377
376
 
377
+ function readTerminalInputData(value) {
378
+ if (typeof value !== "string" || value.length === 0) {
379
+ throw new Error("data is required.")
380
+ }
381
+ return value
382
+ }
383
+
378
384
  function normalizeDimension(value, fallback, min, max) {
379
385
  const number = Number.parseInt(String(value ?? ""), 10)
380
386
  if (!Number.isFinite(number)) {
@@ -1 +0,0 @@
1
- import{j as t,t as r}from"./jsx-runtime-Cal6WBdn.js";import{t as s}from"./app-shell-DnEsSg3r.js";var a=r(),o=t(function(){return(0,a.jsx)(s,{})});export{o as default};