extism / cli

The extism CLI is used to generate plugin scaffolding and manage Extism installations
BSD 3-Clause "New" or "Revised" License
19 stars 5 forks source link

Generating a javascript plugin generates a typescript plugin #82

Closed bhelx closed 1 month ago

bhelx commented 1 month ago

Running:

extism generate plugin --lang javascript -o myplug

Creates a typescript plugin. Running:

extism generate plugin --lang typescript -o myplug

Does nothing. I think we should throw an exception if the language isn't supported. Furthermore it might make sense to change the language name to typescript, or we can support both javascript and typescript as options.

nilslice commented 1 month ago

Just adding a note that changing the name must also map to the lowercased name in the pdk-templates.json as this name is used for the lookup key in that object.

see: https://github.com/extism/cli/blob/79a81b7d3a7a4fd04ef0d409dd6d846b2a1c90ce/generate.go#L89