Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Request] multi-level tasklog

Aperta
#336 3 commenti 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
cli

Direzione di ricerca

Non viene indicato alcun file o test. Inizia individuando l’implementazione di taskLog e il relativo comportamento di cancellazione del buffer del terminale; confrontalo con gli esempi annidati esterno e interno nell’issue. L’attività è completata quando i log delle attività annidate possono essere iterati senza corrompere la visualizzazione esterna, mantenendo gli stati di successo richiesti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
8.1k
Fork
217
Merge medio
1g 11h
PR unite (30g)
5

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bombshell-dev/clack

Tutte le issue di bombshell-dev/clack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.