Skip to content

Commit

Permalink
fixup checks to load TS files, but not .d.ts files
Browse files Browse the repository at this point in the history
  • Loading branch information
evantahler committed Nov 18, 2019
1 parent b944c13 commit 8100afa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions classes/sequelize.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = class SequelizePlugin {
}
],
path: dir,
pattern: /\.(js|ts)$/
pattern: /(\.js|.{2,*}\.ts)$/
}
})
)
Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8100afa

Please sign in to comment.