File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/cli/src/commands/database/alteration Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1+ import { pathToFileURL } from 'node:url' ;
2+
13import type { AlterationScript } from '@logto/schemas/lib/types/alteration.js' ;
24import { conditionalString } from '@silverhand/essentials' ;
35import type { CommonQueryMethods , DatabasePool } from '@silverhand/slonik' ;
@@ -21,7 +23,7 @@ import { chooseAlterationsByVersion, chooseRevertAlterationsByVersion } from './
2123
2224const importAlterationScript = async ( filePath : string ) : Promise < AlterationScript > => {
2325 // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
24- const module = await import ( filePath ) ;
26+ const module = await import ( pathToFileURL ( filePath ) . href ) ;
2527
2628 // eslint-disable-next-line no-restricted-syntax
2729 return module . default as AlterationScript ;
You can’t perform that action at this time.
0 commit comments