fix(general): tslint being applied in all sources.

This commit is contained in:
Rodrigo Rodriguez 2019-04-07 12:23:27 -03:00
parent 25d14592b7
commit 77ccc3d319
9 changed files with 498 additions and 286 deletions

695
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -57,28 +57,28 @@
"azure-arm-search": "^1.3.0-preview", "azure-arm-search": "^1.3.0-preview",
"azure-arm-sql": "5.6.0", "azure-arm-sql": "5.6.0",
"azure-arm-website": "5.7.0", "azure-arm-website": "5.7.0",
"bluebird": "^3.5.3", "bluebird": "^3.5.4",
"body-parser": "1.18.3", "body-parser": "1.18.3",
"botbuilder": "4.1.7", "botbuilder": "4.3.4",
"botbuilder-ai": "4.2.0", "botbuilder-ai": "4.3.4",
"botbuilder-azure": "4.2.0", "botbuilder-azure": "4.3.4",
"botbuilder-choices": "4.0.0-preview1.2", "botbuilder-choices": "4.0.0-preview1.2",
"botbuilder-dialogs": "4.2.0", "botbuilder-dialogs": "4.3.4",
"botbuilder-prompts": "4.0.0-preview1.2", "botbuilder-prompts": "4.0.0-preview1.2",
"botlib": "^0.1.23", "botlib": "0.1.24",
"chai": "4.2.0", "chai": "4.2.0",
"child_process": "^1.0.2", "child_process": "^1.0.2",
"chokidar": "2.1.2", "chokidar": "2.1.5",
"cli-spinner": "^0.2.10", "cli-spinner": "^0.2.10",
"csv-parse": "4.3.3", "csv-parse": "4.3.4",
"dotenv-extended": "2.4.0", "dotenv-extended": "2.4.0",
"express": "4.16.4", "express": "4.16.4",
"express-promise-router": "3.0.3", "express-promise-router": "3.0.3",
"fs-extra": "7.0.1", "fs-extra": "7.0.1",
"ip": "^1.1.5", "ip": "^1.1.5",
"js-beautify": "^1.9.0", "js-beautify": "^1.9.1",
"localize": "0.4.7", "localize": "0.4.7",
"marked": "0.6.1", "marked": "0.6.2",
"mocha": "6.0.2", "mocha": "6.0.2",
"mocha-typescript": "1.1.17", "mocha-typescript": "1.1.17",
"ms": "2.1.1", "ms": "2.1.1",
@ -87,28 +87,28 @@
"nexmo": "2.4.1", "nexmo": "2.4.1",
"ngrok": "3.1.1", "ngrok": "3.1.1",
"nyc": "13.3.0", "nyc": "13.3.0",
"opn": "5.4.0", "opn": "6.0.0",
"pragmatismo-io-framework": "1.0.19", "pragmatismo-io-framework": "1.0.20",
"process-exists": "3.1.0", "process-exists": "3.1.0",
"public-ip": "^3.0.0", "public-ip": "^3.0.0",
"reflect-metadata": "0.1.13", "reflect-metadata": "0.1.13",
"request-promise": "4.2.4", "request-promise": "4.2.4",
"request-promise-native": "1.0.7", "request-promise-native": "1.0.7",
"scanf": "^1.0.2", "scanf": "^1.0.2",
"sequelize": "^4.43.0", "sequelize": "^5.2.12",
"sequelize-typescript": "0.6.7", "sequelize-typescript": "0.6.9",
"shx": "0.3.2", "shx": "0.3.2",
"simple-git": "1.107.0", "simple-git": "1.110.0",
"sqlite3": "4.0.6", "sqlite3": "4.0.6",
"strict-password-generator": "^1.1.2", "strict-password-generator": "^1.1.2",
"swagger-client": "3.8.25", "swagger-client": "3.8.25",
"tedious": "5.0.3", "tedious": "6.1.0",
"temperature-js": "^0.1.0", "temperature-js": "^0.1.0",
"ts-node": "8.0.3", "ts-node": "8.0.3",
"typedoc": "0.14.2", "typedoc": "0.14.2",
"typedoc-plugin-external-module-name": "^2.0.0", "typedoc-plugin-external-module-name": "^2.0.0",
"typedoc-plugin-markdown": "^1.1.27", "typedoc-plugin-markdown": "^1.1.27",
"typescript": "3.3.3333", "typescript": "3.4.1",
"url-join": "4.0.0", "url-join": "4.0.0",
"vbscript-to-typescript": "^1.0.8", "vbscript-to-typescript": "^1.0.8",
"wait-until": "0.0.2", "wait-until": "0.0.2",
@ -124,7 +124,7 @@
"@semantic-release/release-notes-generator": "^7.1.4", "@semantic-release/release-notes-generator": "^7.1.4",
"@types/chai": "4.1.7", "@types/chai": "4.1.7",
"@types/mocha": "5.2.6", "@types/mocha": "5.2.6",
"@types/sequelize": "4.27.39", "@types/sequelize": "4.27.46",
"@types/url-join": "4.0.0", "@types/url-join": "4.0.0",
"@types/winston": "2.4.4", "@types/winston": "2.4.4",
"ban-sensitive-files": "1.9.2", "ban-sensitive-files": "1.9.2",
@ -142,7 +142,7 @@
"standard": "12.0.1", "standard": "12.0.1",
"travis-deploy-once": "5.0.11", "travis-deploy-once": "5.0.11",
"ts-loader": "^5.3.3", "ts-loader": "^5.3.3",
"tslint": "^5.13.1", "tslint": "^5.15.0",
"tslint-microsoft-contrib": "^6.1.0" "tslint-microsoft-contrib": "^6.1.0"
}, },
"eslintConfig": { "eslintConfig": {

View file

@ -65,7 +65,7 @@ export class AdminDialog extends IGBDialog {
if (!AdminDialog.isSharePointPath(packageName)) { if (!AdminDialog.isSharePointPath(packageName)) {
const additionalPath = GBConfigService.get('ADDITIONAL_DEPLOY_PATH'); const additionalPath = GBConfigService.get('ADDITIONAL_DEPLOY_PATH');
if (additionalPath !== undefined) { if (additionalPath === undefined) {
throw new Error('ADDITIONAL_DEPLOY_PATH is not set and deployPackage was called.'); throw new Error('ADDITIONAL_DEPLOY_PATH is not set and deployPackage was called.');
} }
await deployer.deployPackage(min, urlJoin(additionalPath, packageName)); await deployer.deployPackage(min, urlJoin(additionalPath, packageName));

View file

@ -36,12 +36,6 @@
'use strict'; 'use strict';
import {
DataTypeDate,
DataTypeDecimal,
DataTypes,
DataTypeUUIDv4
} from 'sequelize';
import { import {
AutoIncrement, AutoIncrement,

View file

@ -313,7 +313,8 @@ export class AzureDeployerService implements IGBInstallationDeployer {
GBLog.info(`Deploying Text Analytics...`); GBLog.info(`Deploying Text Analytics...`);
const textAnalytics = await this.createTextAnalytics(name, `${name}-textanalytics`, instance.cloudLocation); const textAnalytics = await this.createTextAnalytics(name, `${name}-textanalytics`, instance.cloudLocation);
keys = await this.cognitiveClient.accounts.listKeys(name, textAnalytics.name); keys = await this.cognitiveClient.accounts.listKeys(name, textAnalytics.name);
instance.textAnalyticsEndpoint = textAnalytics.endpoint;
instance.textAnalyticsEndpoint = textAnalytics.endpoint.replace(`/text/analytics/v2.0`, '');
instance.textAnalyticsKey = keys.key1; instance.textAnalyticsKey = keys.key1;
GBLog.info(`Deploying NLP...`); GBLog.info(`Deploying NLP...`);

View file

@ -137,9 +137,10 @@ export class GBCoreService implements IGBCoreService {
dialect: this.dialect, dialect: this.dialect,
storage: storage, storage: storage,
dialectOptions: { dialectOptions: {
options: {
encrypt: encrypt encrypt: encrypt
}, }
pool: { }, pool: {
max: 32, max: 32,
min: 8, min: 8,
idle: 40000, idle: 40000,
@ -345,8 +346,8 @@ STORAGE_SYNC=true
GBCorePackage, GBCorePackage,
GBSecurityPackage, GBSecurityPackage,
GBKBPackage, GBKBPackage,
GBCustomerSatisfactionPackage, GBCustomerSatisfactionPackage
GBWhatsappPackage // GBWhatsappPackage
].forEach(e => { ].forEach(e => {
GBLog.info(`Loading sys package: ${e.name}...`); GBLog.info(`Loading sys package: ${e.name}...`);
const p = Object.create(e.prototype) as IGBPackage; const p = Object.create(e.prototype) as IGBPackage;

View file

@ -140,7 +140,7 @@ export class GBMinService {
// Install default VBA module. // Install default VBA module.
deployer.deployPackage(min, 'packages/default.gbdialog'); // DISABLED: deployer.deployPackage(min, 'packages/default.gbdialog');
// Call the loadBot context.activity for all packages. // Call the loadBot context.activity for all packages.
@ -354,8 +354,8 @@ export class GBMinService {
GBAdminPackage, GBAdminPackage,
GBKBPackage, GBKBPackage,
GBAnalyticsPackage, GBAnalyticsPackage,
GBCustomerSatisfactionPackage, GBCustomerSatisfactionPackage
GBWhatsappPackage // DISABLED: GBWhatsappPackage
].forEach(sysPackage => { ].forEach(sysPackage => {
const p = Object.create(sysPackage.prototype) as IGBPackage; const p = Object.create(sysPackage.prototype) as IGBPackage;
p.loadBot(min); p.loadBot(min);

View file

@ -210,25 +210,29 @@ export class KBService {
if (subjects) { if (subjects) {
const where = { const where = {
from: from, from: from,
subject1: undefined, // tslint:disable-next-line: no-null-keyword
subject2: undefined, subject1: null,
subject3: undefined, // tslint:disable-next-line: no-null-keyword
subject4: undefined subject2: null,
// tslint:disable-next-line: no-null-keyword
subject3: null,
// tslint:disable-next-line: no-null-keyword
subject4: null
}; };
if (subjects[0]) { if (subjects[0] && subjects[0].internalId) {
where.subject1 = subjects[0].internalId; where.subject1 = subjects[0].internalId;
} }
if (subjects[1]) { if (subjects[1] && subjects[1].internalId) {
where.subject2 = subjects[1].internalId; where.subject2 = subjects[1].internalId;
} }
if (subjects[2]) { if (subjects[2] && subjects[2].internalId) {
where.subject3 = subjects[2].internalId; where.subject3 = subjects[2].internalId;
} }
if (subjects[3]) { if (subjects[3] && subjects[3].internalId) {
where.subject4 = subjects[3].internalId; where.subject4 = subjects[3].internalId;
} }
@ -329,7 +333,7 @@ export class KBService {
packageId: packageId packageId: packageId
}); });
if (lastAnswer !== null && lastQuestionId !== 0) { if (lastAnswer !== undefined && lastQuestionId !== 0) {
await lastAnswer.update({ nextId: lastQuestionId }); await lastAnswer.update({ nextId: lastQuestionId });
} }
lastAnswer = answer1; lastAnswer = answer1;

View file

@ -36,30 +36,17 @@
'use strict'; 'use strict';
import {
DataTypeDate,
DataTypeDecimal,
DataTypes,
DataTypeUUIDv4
} from 'sequelize';
import { import {
AutoIncrement, AutoIncrement,
BelongsTo, BelongsTo,
BelongsToMany,
Column, Column,
CreatedAt,
DataType, DataType,
ForeignKey, ForeignKey,
HasMany,
IsUUID,
Length, Length,
Model, Model,
PrimaryKey, PrimaryKey,
Sequelize, Table} from 'sequelize-typescript';
Table,
UpdatedAt
} from 'sequelize-typescript';
import { GuaribasInstance } from '../../core.gbapp/models/GBModel'; import { GuaribasInstance } from '../../core.gbapp/models/GBModel';