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

This commit is contained in:
Rodrigo Rodriguez 2019-04-01 09:01:07 -03:00
parent f0c72988c4
commit 895be687cf
3 changed files with 13 additions and 13 deletions

View file

@ -120,7 +120,7 @@ export class StartDialog {
private static retrieveUsername() { private static retrieveUsername() {
let value = GBConfigService.get('CLOUD_USERNAME'); let value = GBConfigService.get('CLOUD_USERNAME');
if (value !== undefined) { if (value === undefined) {
process.stdout.write(`${GBAdminService.GB_PROMPT}CLOUD_USERNAME:`); process.stdout.write(`${GBAdminService.GB_PROMPT}CLOUD_USERNAME:`);
value = scanf('%s').replace(/(\n|\r)+$/, ''); value = scanf('%s').replace(/(\n|\r)+$/, '');
} }
@ -130,7 +130,7 @@ export class StartDialog {
private static retrievePassword() { private static retrievePassword() {
let password = GBConfigService.get('CLOUD_PASSWORD'); let password = GBConfigService.get('CLOUD_PASSWORD');
if (password !== undefined) { if (password === undefined) {
process.stdout.write(`${GBAdminService.GB_PROMPT}CLOUD_PASSWORD:`); process.stdout.write(`${GBAdminService.GB_PROMPT}CLOUD_PASSWORD:`);
password = scanf('%s').replace(/(\n|\r)+$/, ''); password = scanf('%s').replace(/(\n|\r)+$/, '');
} }
@ -140,7 +140,7 @@ export class StartDialog {
private static retrieveBotId() { private static retrieveBotId() {
let botId = GBConfigService.get('BOT_ID'); let botId = GBConfigService.get('BOT_ID');
if (botId !== undefined) { if (botId === undefined) {
process.stdout.write( process.stdout.write(
`${GBAdminService.GB_PROMPT}Choose a unique bot Id containing lowercase letters, digits or `${GBAdminService.GB_PROMPT}Choose a unique bot Id containing lowercase letters, digits or
dashes (cannot use dash as the first two or last one characters), dashes (cannot use dash as the first two or last one characters),
@ -155,7 +155,7 @@ cannot start or end with or contain consecutive dashes and having 4 to 42 charac
private static retrieveAuthoringKey() { private static retrieveAuthoringKey() {
let authoringKey = GBConfigService.get('NLP_AUTHORING_KEY'); let authoringKey = GBConfigService.get('NLP_AUTHORING_KEY');
if (authoringKey !== undefined) { if (authoringKey === undefined) {
process.stdout.write( process.stdout.write(
`${ `${
GBAdminService.GB_PROMPT GBAdminService.GB_PROMPT
@ -174,12 +174,12 @@ cannot start or end with or contain consecutive dashes and having 4 to 42 charac
private static retrieveAppId() { private static retrieveAppId() {
let appId = GBConfigService.get('MARKETPLACE_ID'); let appId = GBConfigService.get('MARKETPLACE_ID');
process.stdout.write( if (appId === undefined) {
`Sorry, this part cannot be automated yet due to Microsoft schedule, process.stdout.write(
`Sorry, this part cannot be automated yet due to Microsoft schedule,
please go to https://apps.dev.microsoft.com/portal/register-app to please go to https://apps.dev.microsoft.com/portal/register-app to
generate manually an App ID and App Secret.\n` generate manually an App ID and App Secret.\n`
); );
if (appId !== undefined) {
process.stdout.write('Generated Application Id (MARKETPLACE_ID):'); process.stdout.write('Generated Application Id (MARKETPLACE_ID):');
appId = scanf('%s').replace(/(\n|\r)+$/, ''); appId = scanf('%s').replace(/(\n|\r)+$/, '');
} }
@ -189,7 +189,7 @@ generate manually an App ID and App Secret.\n`
private static retrieveAppPassword() { private static retrieveAppPassword() {
let appPassword = GBConfigService.get('MARKETPLACE_SECRET'); let appPassword = GBConfigService.get('MARKETPLACE_SECRET');
if (appPassword !== undefined) { if (appPassword === undefined) {
process.stdout.write('Generated Password (MARKETPLACE_SECRET):'); process.stdout.write('Generated Password (MARKETPLACE_SECRET):');
appPassword = scanf('%s').replace(/(\n|\r)+$/, ''); appPassword = scanf('%s').replace(/(\n|\r)+$/, '');
} }
@ -217,7 +217,7 @@ generate manually an App ID and App Secret.\n`
private static retrieveLocation() { private static retrieveLocation() {
let location = GBConfigService.get('CLOUD_LOCATION'); let location = GBConfigService.get('CLOUD_LOCATION');
if (location !== undefined) { if (location === undefined) {
process.stdout.write('CLOUD_LOCATION (eg. westus):'); process.stdout.write('CLOUD_LOCATION (eg. westus):');
location = scanf('%s'); location = scanf('%s');
} }

View file

@ -477,7 +477,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
this.apiVersion this.apiVersion
}`; }`;
url = urlJoin(baseUrl, query); url = urlJoin(baseUrl, query);
req = AzureDeployerService.createRequestObject(url, accessToken, 'GET', JSON.stringify(parameters)); req = AzureDeployerService.createRequestObject(url, accessToken, 'POST', JSON.stringify(parameters));
const resChannel = await httpClient.sendRequest(req); const resChannel = await httpClient.sendRequest(req);
const key = JSON.parse(resChannel.bodyAsText).properties.properties.sites[0].key; const key = JSON.parse(resChannel.bodyAsText).properties.properties.sites[0].key;
instance.webchatKey = key; instance.webchatKey = key;
@ -485,7 +485,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
} catch (error) { } catch (error) {
reject(error); reject(error);
} }
}, 20000); }, 20000);
}); });
} }

View file

@ -88,7 +88,7 @@ export class GBDeployer {
let totalPackages = 0; let totalPackages = 0;
const additionalPath = GBConfigService.get('ADDITIONAL_DEPLOY_PATH'); const additionalPath = GBConfigService.get('ADDITIONAL_DEPLOY_PATH');
let paths = [GBDeployer.deployFolder]; let paths = [GBDeployer.deployFolder];
if (additionalPath !== undefined) { if (additionalPath !== undefined && additionalPath !== '') {
paths = paths.concat(additionalPath.toLowerCase().split(';')); paths = paths.concat(additionalPath.toLowerCase().split(';'));
} }
const botPackages: string[] = []; const botPackages: string[] = [];