dfinity / sdk

IC SDK: a Software Development Kit for creating and managing canister smart contracts on the ICP blockchain.
https://internetcomputer.org/developers
Apache License 2.0
173 stars 84 forks source link

refactor: data-driven backend project templates #3894

Closed ericswanson-dfinity closed 2 months ago

ericswanson-dfinity commented 2 months ago

Description

Refactors the code that hands backend project templates to be data-driven rather than hardcoded as an enum.

Part of https://dfinity.atlassian.net/browse/SDK-1805

How Has This Been Tested?

Most is covered by existing e2e.

I added two tests that show that the help and command error output still include the list of possible values. It might seem like these are just making sure that clap works, but an experiment in which I tried to make the type variable an Option<ProjectTemplateName> turned out to not show the possible values.

Checklist: