Skip to content

Commit

Permalink
fix(backup): update backup after ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
sogehige committed Oct 28, 2023
1 parent cf14d33 commit 88b2b94
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import { normalize } from 'path';

import _ from 'lodash';
import { DataSource } from 'typeorm';
import argv from 'yargs'
argv
import yargs from 'yargs'
import { hideBin } from 'yargs/helpers'

const argv = yargs(hideBin(process.argv))
.usage('node tools/backup.js')
.example('node tools/backup.js backup ./backup')
.example('node tools/backup.js restore ./backup')
Expand Down Expand Up @@ -57,7 +59,7 @@ argv
.help()
.argv;

const { getMigrationType } = require('../dest/helpers/getMigrationType');
import { getMigrationType } from '../dest/helpers/getMigrationType.js';

async function main() {
const type = process.env.TYPEORM_AppDataSource;
Expand Down

0 comments on commit 88b2b94

Please sign in to comment.