Add command to generate types without deploying#6901
Conversation
60a9d62 to
adaf4c8
Compare
adaf4c8 to
13a422a
Compare
|
@vimtor one open question on error handling I'd like your call on before this is final. What happens today when The command reads the deployed state via It fails cleanly (exit 1, no state touched), but the message isn't helpful, the real reason is "this stage hasn't been deployed." Worth noting: How would you like to handle it? A few options:
I'm leaning toward (2) since it fixes the root cause the conventional way and benefits the other commands, but I didn't want to expand the scope of this PR without checking. Happy to do whichever you prefer. |
Adds a standalone
sst typescommand that regeneratessst-env.d.tsfrom the currently deployed state of a stage, without requiringsst devorsst deploy.Closes #6872
This reuses the existing
GetCompleted()logic for reading deployed state andtypes.Generate(), the same function used bysst deployto generate type definitions.Verified end-to-end by:
sst-env.d.ts.sst types.