Bug Description
There is a way to create both JavaScript and TypeScript migrations but I can only run JavaScript migrations. When I try to run my new TypeScript migration, it says Couldn't import the migration script from C:\CFAS\KenticoKontentCli\Migrations\test.ts.js due to an error: "Cannot find module C:\CFAS\KenticoKontentCli\Migrations\test.ts.js".
It looks like it is looking for a JavaScript file by default. It assumes the migration is JavaScript.
Repro Steps
- Run
kontent migration add --name test --template-type "typescript".
- Create your migration.
- Run
kontent migration run --name test --environment DEV.
- Observe error.
Expected Behavior
It should run the TypeScript migration file.
Additional Context
I attempted to run the TypeScript migration file provided by the boilerplate. I deleted the JavaScript file and left the TypeScript file alone to see what it would do. It gave me an error because it is looking for a JavaScript file.
I was looking at the code for run and I have a feeling this might have something to do with it.
Perhaps there could be a flag to specify if the migration is JavaScript or TypeScript. If not, have run determine it automatically. If it cannot find the .js file, then look for a .ts file.
Screenshots

Please let me know if I can provide any further details. Thank you! :)
Bug Description
There is a way to create both JavaScript and TypeScript migrations but I can only run JavaScript migrations. When I try to run my new TypeScript migration, it says
Couldn't import the migration script from C:\CFAS\KenticoKontentCli\Migrations\test.ts.js due to an error: "Cannot find module C:\CFAS\KenticoKontentCli\Migrations\test.ts.js".It looks like it is looking for a JavaScript file by default. It assumes the migration is JavaScript.
Repro Steps
kontent migration add --name test --template-type "typescript".kontent migration run --name test --environment DEV.Expected Behavior
It should run the TypeScript migration file.
Additional Context
I attempted to run the TypeScript migration file provided by the boilerplate. I deleted the JavaScript file and left the TypeScript file alone to see what it would do. It gave me an error because it is looking for a JavaScript file.
I was looking at the code for
runand I have a feeling this might have something to do with it.Perhaps there could be a flag to specify if the migration is JavaScript or TypeScript. If not, have run determine it automatically. If it cannot find the
.jsfile, then look for a.tsfile.Screenshots
Please let me know if I can provide any further details. Thank you! :)