gina-sequelize 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.ts +10 -1
- package/package.json +1 -1
package/bin/index.ts
CHANGED
|
@@ -150,7 +150,16 @@ async function generateMigration(migrationName) {
|
|
|
150
150
|
async function upgrade() {
|
|
151
151
|
try {
|
|
152
152
|
const pathName = process.cwd();
|
|
153
|
-
|
|
153
|
+
|
|
154
|
+
const ginaFolder = (await readdir(pathName + '/gina')).filter(file => !file.includes('.d.ts') && !file.includes('.js.map'));
|
|
155
|
+
|
|
156
|
+
let initializeModelsFile = 'initializeModels.ts';
|
|
157
|
+
|
|
158
|
+
if (ginaFolder.includes('initializeModels.js')) {
|
|
159
|
+
initializeModelsFile = 'initializeModels.js';
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const initFile = await import(pathName + '/gina/' + initializeModelsFile);
|
|
154
163
|
|
|
155
164
|
console.log('loading models...');
|
|
156
165
|
let initializeModels = initFile.initializeModels;
|
package/package.json
CHANGED