pinax-network / substreams-sink

Substreams Sink library
MIT License
4 stars 1 forks source link

Remove `requiredOption` #9

Closed DenisCarriere closed 1 year ago

DenisCarriere commented 1 year ago

We should remove requiredOption, in case the value is provided as .env

https://github.com/pinax-network/substreams-sink/blob/main/src/commander.ts#L47-L49

The idea is you don't need to provide any CLI arguments and everything can be set via .env

CLI arguments would be additional overrides, but not required

We're already checking if the field is required or not here: https://github.com/pinax-network/substreams-sink/blob/main/src/config.ts#L46

chamorin commented 1 year ago

Done in commit: https://github.com/pinax-network/substreams-sink/commit/9ef575b9aeaf1f10f405d4ca0a2d44ebd88eb666 with changes to use new Option(...)