Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Request] multi-level tasklog

オープン
#336 コメント 3 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
cli

調査の方向性

ファイルやテストは指定されていません。まず taskLog の実装と、そのターミナルバッファをクリアする動作を探します。これを issue にある外側と内側の入れ子になった例と比較します。入れ子になったタスクログを、外側の表示を壊さずに反復処理でき、要求された成功状態が保持されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Is your feature request related to a problem? Please describe.
We are currently exploring clack for Storybook's CLI. When upgrading multiple Storybook projects (e.g. in a monorepo), we loop through each project and run migrations. Each migration will execute a set of things which might take time. This use case makes us want to use clack's taskLog because of its convenient collapsing feature, although it doesn't match with our expectations at the moment as our use case is a bit more complex.

Describe the solution you'd like
Ideally we would be able to use a taskLog per project, then an inner taskLog per migration:

Starts with a single taskLog per project:

◇ Upgrading project 1/4 // beginning of a taskLog
|   detecting migrations // taskLog.message
|

Then it finds multiple migrations from one of the projects, starting an inner task log while the outer one is still open:

◇ Upgrading project 1/4 // beginning of a taskLog
|   detecting migrations // taskLog.message
| ◇  migration FOO detected, running... // beginning of inner taskLog
|      migration step 1 // innerTaskLog.message
|      migration step 2 // innerTaskLog.message
|

Then the inner task logs are iterated, the previous one ends its session, the next one begins, while the outer task log is still open:

◇ Upgrading project 1/4 // beginning of a taskLog
|   detecting migrations // taskLog.message
| ⬩ migration FOO executed // innerTaskLog.success
| ◇  migration BAR detected, running... // beginning of another inner taskLog
|      migration step 1 // anotherInnerTaskLog.message
|      migration step 2 // anotherInnerTaskLog.message
|

Then upon all inner task logs succeed:

◇ Upgrading project 1/4 // beginning of a taskLog
|   detecting migrations // taskLog.message
| ⬩  migration FOO executed
| ⬩  migration BAR executed // anotherInnerTaskLog.success
|

The outer task log is then succeeded, and the iteration continues so another loop of outer + inner task logs are shown:

⬩ Project 1/4 upgraded
◇ Upgrading project 2/4 // beginning of a taskLog
|   detecting migrations // taskLog.message
| ◇  migration FOO detected, running... // beginning of inner taskLog
|      migration step 1 // innerTaskLog.message
|      migration step 2 // innerTaskLog.message
|

Ideally even making it possible to prompt during a taskLog session, but I know it's hard to keep track of the buffer from all of that. Perhaps this would need a new concept? If there was a way for us to at least manipulate (get/set) the buffer of taskLogs maybe we could try some workaround on our end. Currently, multiple taskLogs inside of each other end up in non-ideal clearing of the terminal messages, as the outer task log doesn't account for the buffer generated by the inner task logs (or any other logs from clack, either prompts or normal logs)

Describe alternatives you've considered
We tried patching clack but it doesn't seem like the best idea, ideally we could collaborate in making this a great feature

主要言語
TypeScript
スター
8.1k
フォーク
217
平均マージ
1日 11時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bombshell-dev/clack のほかの issue

bombshell-dev/clack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。