flisk resources --type rejects 5 types that flisk resource --type creates, and accepts 2 that it refuses (10 vs 13 types)

Aperta
#110 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cli, typescript
Ambito
cli, testing

Direzione di ricerca

Start by locating the resource creation and listing commands and their resource type validation, then read the related tests. Compare the accepted type lists and add coverage for the acceptance criteria: each creatable type should be accepted by the filter, with the shared list generated from one constant. Done when the tests verify consistent behavior for all types.

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

Descrizione

area: cli bug docs-mismatch dogfood dx error-messages has-repro help wanted misleading-message needs-test priority:low tech: typescript triaged

Summary

The two commands use different lists of valid resource types, so a type you can create cannot always be filtered, and a type you can filter cannot be created.

Numbers (flisk 1.4.73)

Type flisk resource --type <t> (create) flisk resources --type <t> (filter)
backend, frontend, worker, mcp, agent, database, bring-your-own, sdk accepted accepted (8 shared)
inference, queue, storage, mail, payment accepted (5) rejected: Invalid resource type "queue"
library rejected: Unknown resource type "library" accepted: No resources found with type "library"
migrator rejected (only via --feature prisma) accepted
Total accepted 13 10

Overlap is 8 of 15 distinct names (53%).

Repro

flisk resources --type queue      # ❌ Invalid resource type "queue"
flisk resource jobs --type queue --yes   # works, saves a bring-your-own resource
flisk resources --type library    # "No resources found" (looks valid)
flisk resource lib1 --type library --yes # ❌ Unknown resource type "library"

The queue error does carry a hint (queues are stored as bring-your-own), but the word "Invalid" still contradicts the docs for --type.

Before

Scripts that loop over resource --type values and then verify with resources --type fail for 5 of 13 values. library looks valid in one command and is unknown in the other.

After

  • One shared list of types used by both commands, or resources --type queue returns the bring-your-own resources saved under that alias.
  • resources --type library|migrator warns "no such type is created" or is removed.

Acceptance

A test iterates the create list and asserts flisk resources --type <t> exits 0 for each; the filter list is generated from the same constant.

Found by the /dogfood loop. Related: #85, #88.

Lingua principale
TypeScript
Stelle
1
Fork
2
Merge medio
11h 39m
PR unite (30g)
92

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 flisk-sh/flisk-cli

Tutte le issue di flisk-sh/flisk-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.