mirror of
https://github.com/strapi/strapi.git
synced 2025-07-08 01:22:29 +00:00
18 lines
450 B
TypeScript
18 lines
450 B
TypeScript
![]() |
import { resetDatabaseAndImportDataFromPath } from '../utils/dts-import';
|
||
|
|
||
|
const importData = async () => {
|
||
|
const args = process.argv.slice(2);
|
||
|
const filePath = args[0];
|
||
|
|
||
|
if (!filePath) {
|
||
|
console.error('Please provide the name of the file you want to import from tests/e2e/data');
|
||
|
process.exit(1);
|
||
|
}
|
||
|
|
||
|
await resetDatabaseAndImportDataFromPath(filePath);
|
||
|
console.log('Data transfer succeeded');
|
||
|
process.exit(0);
|
||
|
};
|
||
|
|
||
|
importData();
|