-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
wranglerRelating to the Wrangler CLI toolRelating to the Wrangler CLI tool
Description
We have this code:
workers-sdk/packages/wrangler/src/metrics/metrics-dispatcher.ts
Lines 121 to 138 in e84e8fa
| if (properties.command?.startsWith("wrangler login")) { | |
| properties.command = "wrangler login"; | |
| } | |
| if ( | |
| properties.command === "wrangler telemetry disable" || | |
| properties.command === "wrangler metrics disable" | |
| ) { | |
| return; | |
| } | |
| if ( | |
| properties.command === "wrangler deploy" || | |
| properties.command === "wrangler dev" || | |
| // for testing purposes | |
| properties.command === "wrangler docs" | |
| ) { | |
| printMetricsBanner(); | |
| } | |
It is inconsistent and brittle (i.e. what if "wrangler" changes or commands change ?
Commands behavior should be defined in... command#behaviour instead
workers-sdk/packages/wrangler/src/ai/listCatalog.ts
Lines 12 to 15 in e84e8fa
| behaviour: { | |
| printBanner: (args) => !args.json, | |
| }, | |
| args: { |
/cc @MattieTK
Metadata
Metadata
Assignees
Labels
wranglerRelating to the Wrangler CLI toolRelating to the Wrangler CLI tool
Type
Projects
Status
Backlog