Open RichiCoder1 opened 1 year ago
I've got a basic PoC branch moving now: https://github.com/aws-cloudformation/cloudformation-cli-typescript-plugin/compare/master...RichiCoder1:cloudformation-cli-typescript-plugin:feat/drop_decorators?expand=1
Ended up using AJV via a some superset tools called typeconv
and suretype
which provide schema generate and validation respectively.
Validated that this gets us validation and rich type information, and using camelcase-keys
gets us the nice, typescript-y experience.
What I'm working on now is:
p-queue
based queue for handling fire-and-forget calls.I might honestly end up making a completely clean fork for the plugin as it'll be a major API change from the current state of this plugin.
This is a rethought version of my previous ticket https://github.com/aws-cloudformation/cloudformation-cli-typescript-plugin/issues/68
To resummarize the issues with
class-transformer
:The updated proposal proposes swapping
class-transformer
with three components:While a very large change, it would uncouple this plugin from TypeScript and an unmaintained library while hopefully simplifying the Dev UX of developing a resource in typescript.
For example, a simple handler like the template default would become (example greatly appreviated):
This also externalizes a lot of concerns unnecessary to the user code, infers a lot more of type information automatically, and makes developing resource types much less mentally onerous allowing developers to focus on business logic.
It would require more work with the SDK and generated code however.