@nyffels/mynodeorm
Advanced tools
Comparing version 1.0.0-alpha136 to 1.0.0-alpha137
@@ -506,7 +506,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
for (const v of versions) { | ||
const migrationPlanPath = path.join(migrationLocation, v.name, "migration-plan"); | ||
let migrationPlanPath = path.join(migrationLocation, v.name, "migration-plan.js"); | ||
if (!fs.existsSync(migrationPlanPath)) { | ||
migrationPlanPath = path.join(migrationLocation, v.name, "migration-plan.ts"); | ||
} | ||
if (!fs.existsSync(migrationPlanPath)) { | ||
throw new Error("Could not find migration plan " + migrationPlanPath); | ||
} | ||
const Plan = require(migrationPlanPath); | ||
const Plan = yield import(migrationPlanPath); | ||
const plan = new Plan.MigrationFile(); | ||
@@ -513,0 +516,0 @@ yield plan.migrate(); |
{ | ||
"name": "@nyffels/mynodeorm", | ||
"version": "1.0.0-alpha136", | ||
"version": "1.0.0-alpha137", | ||
"description": "A full-fledged ORM framework for NodeJS and MySQL with develop friendly code aimed to handle database migrations, MySQL Query builder / helper and property mapping.", | ||
@@ -5,0 +5,0 @@ "private": false, |
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
198476
2755
2