Commit graph

14 commits

Author SHA1 Message Date
2f6b4d23e0 fix(reporter-default): don't dim decimal points in durations in the default reporter 2024-01-26 16:09:49 +01:00
1f139fd975 feat(remove): rework the "remove" command to be more similar to "up" and "list"
The old reporter methods related to the "remove" command is not used anymore and instead the shared `onMigrationStart`, `onMigrationSuccess` and `onMigrationError` methods are used.
Some preparation has also been made to support for removing multiple migrations at once in the future, similar to how the `--from` and `--to` CLI options work for the "up" command.
2024-01-26 16:09:49 +01:00
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
98adcda37e fix(reporters): use better wording in the header in the default reporter
Also show the number of skipped migrations
2024-01-19 13:43:59 +01:00
beb6cf7719 chore(deps): upgrade ansis package 2023-12-19 14:34:54 +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
1434be5d5e
feat(reporter): print Emigrate CLI's version number and relative paths to migrations (#39)
* feat(reporter-default): print CLI version number

* feat(reporter-default): print relative paths to migrations instead of only the file names

This makes the output clickable in most shells

* feat(reporter-pino): include the Emigrate CLI version in each log
2023-12-14 13:45:02 +01:00
5307e87242 fix(list): don't log info about locked migrations as it doesn't happen in this command 2023-12-12 15:38:24 +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
d8a6a2428a feat(remove): implement the "remove" command for removing migrations from the history 2023-11-24 15:45:17 +01:00
8347fc1fa4 feat(up): improve error handling and presentation 2023-11-22 15:47:17 +01:00
570bd1fa2b feat(cli): make the default reporter print the full command output when done
In interactive mode the output is normally clipped to the number of lines that the current terminal window can show without scrolling
so to remedy that the full command output is now printed to the console when done
2023-11-22 14:35:38 +01:00
53cdb23237 feat(cli): implement the "list" command for listing migration history and pending migrations 2023-11-22 14:35:37 +01:00
4f8fb441f8 refactor(cli): move the default reporter into a separate "reporters" folder 2023-11-22 14:35:35 +01:00
Renamed from packages/cli/src/plugin-reporter-default.ts (Browse further)