[PR #6] [MERGED] fix(cli): move logs under deployments subcommand and fix log rendering #11

Closed
opened 2026-03-02 05:12:31 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/gotempsh/temps/pull/6
Author: @dviejokfs
Created: 2/17/2026
Status: Merged
Merged: 2/17/2026
Merged by: @dviejokfs

Base: mainHead: fix/cli-logs-command-restructure


📝 Commits (1)

  • 454dd88 fix(cli): move logs under deployments subcommand and fix log rendering

📊 Changes

3 files changed (+63 additions, -24 deletions)

View changed files

📝 apps/temps-cli/src/commands/deploy/index.ts (+2 -3)
📝 apps/temps-cli/src/commands/deploy/logs.ts (+42 -15)
📝 apps/temps-cli/src/commands/runtime-logs.ts (+19 -6)

📄 Description

Summary

  • Moves temps logs to temps deployments logs — deployment build logs belong under the deployments command group, not as a generic root command
  • Fixes build log rendering showing undefined for every job — the API returns JSONL as a raw string, but the CLI was treating it as a JSON array
  • Fixes runtime-logs double-spacing — Docker log lines include trailing \n that console.log doubles up

Before

$ temps logs
=== Verify Local Image ===
undefined
=== Deploy Container ===
undefined
$ temps runtime-logs
 ✓ Starting...

   ▲ Next.js 15.2.8

   - Local:        http://localhost:3000

(double-spaced output)

After

$ temps deployments logs
=== Verify Local Image ===
10:15:47 ✅ Image nginx:latest verified
=== Deploy Container ===
10:15:48 Starting container deployment...
$ temps runtime-logs
 ✓ Starting...
   ▲ Next.js 15.2.8
   - Local:        http://localhost:3000

(single-spaced output)

Changes

File Change
apps/temps-cli/src/commands/deploy/index.ts Move logs from program (root) to deployments subcommand group
apps/temps-cli/src/commands/deploy/logs.ts Add parseLogEntries() to properly parse JSONL string responses into LogEntry[]; fix streaming dedup logic
apps/temps-cli/src/commands/runtime-logs.ts Strip trailing \r?\n from WebSocket messages before console.log

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/gotempsh/temps/pull/6 **Author:** [@dviejokfs](https://github.com/dviejokfs) **Created:** 2/17/2026 **Status:** ✅ Merged **Merged:** 2/17/2026 **Merged by:** [@dviejokfs](https://github.com/dviejokfs) **Base:** `main` ← **Head:** `fix/cli-logs-command-restructure` --- ### 📝 Commits (1) - [`454dd88`](https://github.com/gotempsh/temps/commit/454dd8862990617d58aa915552ccbd7e1c5d7770) fix(cli): move logs under deployments subcommand and fix log rendering ### 📊 Changes **3 files changed** (+63 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `apps/temps-cli/src/commands/deploy/index.ts` (+2 -3) 📝 `apps/temps-cli/src/commands/deploy/logs.ts` (+42 -15) 📝 `apps/temps-cli/src/commands/runtime-logs.ts` (+19 -6) </details> ### 📄 Description ## Summary - Moves `temps logs` to `temps deployments logs` — deployment build logs belong under the deployments command group, not as a generic root command - Fixes build log rendering showing `undefined` for every job — the API returns JSONL as a raw string, but the CLI was treating it as a JSON array - Fixes runtime-logs double-spacing — Docker log lines include trailing `\n` that `console.log` doubles up ## Before ``` $ temps logs === Verify Local Image === undefined === Deploy Container === undefined ``` ``` $ temps runtime-logs ✓ Starting... ▲ Next.js 15.2.8 - Local: http://localhost:3000 ``` (double-spaced output) ## After ``` $ temps deployments logs === Verify Local Image === 10:15:47 ✅ Image nginx:latest verified === Deploy Container === 10:15:48 Starting container deployment... ``` ``` $ temps runtime-logs ✓ Starting... ▲ Next.js 15.2.8 - Local: http://localhost:3000 ``` (single-spaced output) ## Changes | File | Change | |---|---| | `apps/temps-cli/src/commands/deploy/index.ts` | Move `logs` from `program` (root) to `deployments` subcommand group | | `apps/temps-cli/src/commands/deploy/logs.ts` | Add `parseLogEntries()` to properly parse JSONL string responses into `LogEntry[]`; fix streaming dedup logic | | `apps/temps-cli/src/commands/runtime-logs.ts` | Strip trailing `\r?\n` from WebSocket messages before `console.log` | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 05:12:31 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/temps#11
No description provided.