diff --git a/classes/sequelize.js b/classes/sequelize.js index f0ee2f90..0411b83c 100644 --- a/classes/sequelize.js +++ b/classes/sequelize.js @@ -40,7 +40,7 @@ module.exports = class SequelizePlugin { } ], path: dir, - pattern: /\.(js|ts)$/ + pattern: /(\.js|.{2,*}\.ts)$/ } }) ) @@ -54,7 +54,7 @@ module.exports = class SequelizePlugin { if (fs.statSync(filename).isDirectory()) { return this.importModelsFromDirectory(filename) } - if (path.extname(file) !== '.js' && path.extname(file) !== '.ts') return + if ((path.extname(file) !== '.js' && path.extname(file) !== '.ts') || file.indexOf('.d.ts') > 0) return const nameParts = file.split('/') const name = nameParts[nameParts.length - 1].split('.')[0] const modelFunc = currySchemaFunc(require(filename)) diff --git a/package.json b/package.json index e3fe66c2..8f6bdf40 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "ah-sequelize-plugin", "license": "MIT", "description": "Use Sequelize in ActionHero", - "version": "1.3.1", + "version": "1.3.2", "homepage": "http://actionherojs.com", "repository": { "type": "git",