feat(cli): add the --import option for importing modules/packages before commands are run

Can for instance be used to load environment variables using Dotenv
This commit is contained in:
Joakim Carlstein 2023-12-20 11:01:01 +01:00 committed by Joakim Carlstein
parent e6e4433018
commit 9f91bdcfa0
12 changed files with 131 additions and 40 deletions

View file

@ -1,4 +1,4 @@
import process from 'node:process';
import { hrtime } from 'node:process';
import {
isFinishedMigration,
isFailedMigration,
@ -123,7 +123,7 @@ export const migrationRunner = async ({
await reporter.onMigrationStart?.(migration);
const start = process.hrtime();
const start = hrtime();
const [, migrationError] = await exec(async () => execute(migration));