Commit graph

9 commits

Author SHA1 Message Date
a4da353d5a feat(cli): add graceful process abort
Using an AbortSignal and Promise.race we abandon running migrations that take longer to complete after the process is aborted than the given abortRespite period
2024-01-22 11:30:06 +01:00
cae6d11d53
feat(types): move Emigrate types to separate package and improve types (#41)
* feat(types): move Emigrate types to separate package

Also refactor the types to use discriminating unions for easier error handling and such.
Errors passed to storage plugins should now be serialized and storage plugins are expected to return already serialized errors on failed history entries.

* fix(mysql): handle the new type changes

* fix(storage-fs): handle the new type changes

* feat(cli): better error handling and types

Adapt to the new types from the @emigrate/types package, like discriminating union types and serializing and deserializing errors
2023-12-15 13:03:35 +01:00
bc33e63e3e feat(reporter-default): improve error logging by logging all own properties of the errors 2023-12-12 15:36:30 +01:00
703e6f028a feat(storage): add "end" method to storage for cleaning up resources when commands are finished 2023-12-08 13:01:46 +01:00
a8db22680e feat(up): handle storage initialization errors and present missing loader errors in a better way 2023-12-08 13:01:45 +01:00
d8a6a2428a feat(remove): implement the "remove" command for removing migrations from the history 2023-11-24 15:45:17 +01:00
c68c6f0490 feat(cli): include Emigrate error codes in error names 2023-11-22 15:34:05 +01:00
53cdb23237 feat(cli): implement the "list" command for listing migration history and pending migrations 2023-11-22 14:35:37 +01:00
30a448b4cf feat(cli): improve error handling with more custom Error instances 2023-11-16 12:01:32 +01:00