Skip to content

Commit

Permalink
[[FIX]] Re-enable library checking (#14)
Browse files Browse the repository at this point in the history
Also, drop src from distro
  • Loading branch information
jmendiara authored Dec 19, 2016
1 parent 84f1568 commit a3be946
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ node_modules/
coverage/
test/
typings/
src/
tsconfig.json
tslint.json
typings.json

npm-debug.log
.eslintrc
Expand All @@ -12,3 +16,6 @@ npm-debug.log
.travis.yml

CONTRIBUTING.md

*.spec.js
*.spec.ts
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"description": "Bot Core package to run bots",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"files": [
"lib"
],
"scripts-info": {
"info": "List available scripts",
"build": "Builds the plugin, by cleaning and compiling TypesScript into Javascript",
Expand Down
3 changes: 1 addition & 2 deletions src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export class PluginLoader {
protected requireLibrary(libpath: string): BotBuilder.Library {
let lib = require(libpath).default as BotBuilder.Library;

// XXX this validation could be improved checking that lib instanceof BotBuilder.Library
if (!lib.name) {
if (!(lib instanceof BotBuilder.Library)) {
logger.warn(`Skip plugin at ${libpath}: not a valid Library`);
return null;
}
Expand Down

0 comments on commit a3be946

Please sign in to comment.