Files
hyperframes/packages/cli/src/commands
Michael Wang e83ddaed28 fix(cli): escape remaining project and sign-in text, ignore stateless callbacks (#8177)
* fix(cli): batch render, cloud render and publish print project text as visible escapes

A batch render printed each failed row's error straight to the terminal. The
error can quote file names and attribute values from the project, so control
characters in them could move the cursor, rewrite earlier lines, set the
window title or write the clipboard. That line, and the manifest path in the
batch header, now go through terminalLines() and terminalText(), which keep
real line breaks and show every other control character as an escape.

cloud render does the same for the media lines it offloads, the "also stays in
the zip" line, the largest-files list, the aspect-ratio detection line and the
names of fonts that are not on this computer. publish does the same for the
composition path in the blank-entry hint and for the publish failure message.

The manifest file and --json output are unchanged.

* fix(cli): sign-in callback ignores requests without the login's state

The browser sign-in listens on a local port for the redirect back from the
sign-in page. It acted on an error in that redirect before checking the
state value, so any page or local process that reached the port could end a
pending sign-in and put its own text in the terminal. A request with a
missing or wrong state also ended the sign-in.

Now only a request carrying the login's state can end it. Any other request
gets the same 400 page as before and the listener keeps waiting for the real
redirect or the timeout. A sign-in that is cancelled or fails on the sign-in
page still carries the state, so it reports the failure as it does today.

The error text from the redirect, and the "Sign-in failed" line, now show
control characters as visible escapes.

* fix(cli): variable issues and oversize file list print control characters as escapes

Variable issue lines from render and render --batch printed the variable ids
and allowed options from the project's data-composition-variables as they
were. Each line now goes through terminalText(), so control characters,
line feeds included, show as visible escapes. The issue objects and their
messages are unchanged for other callers.

When a cloud render project is over the upload limit, the list of its largest
files now escapes each path, line feeds included, so a file name cannot add a
line of its own.

Font names in the cloud render notice are looked up as written and escaped
only when printed, so a name with a trailing control character keeps its
look-alike suggestion.

* fix(cli): a callback from another sign-in says the terminal is still waiting

The 400 page for a callback without the login's state now tells the person to finish signing in
from the newest tab, since the terminal keeps waiting instead of ending the login.
2026-11-18 17:19:49 +00:00
..