Merge pull request #316 from AlanPerdomo/master
Removal of start-up bugs
This commit is contained in:
commit
7344a8e7dd
4 changed files with 16 additions and 46 deletions
|
@ -166,7 +166,6 @@
|
||||||
"yarn": "1.22.19"
|
"yarn": "1.22.19"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"simple-commit-message": "4.0.13",
|
|
||||||
"@types/url-join": "4.0.1",
|
"@types/url-join": "4.0.1",
|
||||||
"ban-sensitive-files": "1.9.18",
|
"ban-sensitive-files": "1.9.18",
|
||||||
"commitizen": "4.2.2",
|
"commitizen": "4.2.2",
|
||||||
|
@ -177,6 +176,9 @@
|
||||||
"ngrok": "4.3.3",
|
"ngrok": "4.3.3",
|
||||||
"prettier-standard": "15.0.1",
|
"prettier-standard": "15.0.1",
|
||||||
"semantic-release": "17.2.4",
|
"semantic-release": "17.2.4",
|
||||||
|
"simple-commit-message": "4.0.13",
|
||||||
|
"super-strong-password-generator": "^2.0.2",
|
||||||
|
"super-strong-password-generator-es": "^2.0.2",
|
||||||
"travis-deploy-once": "5.0.11",
|
"travis-deploy-once": "5.0.11",
|
||||||
"ts-node": "10.9.1",
|
"ts-node": "10.9.1",
|
||||||
"tslint": "6.1.3"
|
"tslint": "6.1.3"
|
||||||
|
|
|
@ -49,7 +49,7 @@ import { GBSharePointService } from '../../sharepoint.gblib/services/SharePointS
|
||||||
import { GuaribasAdmin } from '../models/AdminModel.js';
|
import { GuaribasAdmin } from '../models/AdminModel.js';
|
||||||
import msRestAzure from 'ms-rest-azure';
|
import msRestAzure from 'ms-rest-azure';
|
||||||
import Path from 'path';
|
import Path from 'path';
|
||||||
import PasswordGenerator from 'strict-password-generator';
|
import {caseSensitive_Numbs_SpecialCharacters_PW} from 'super-strong-password-generator'
|
||||||
import crypto from 'crypto';
|
import crypto from 'crypto';
|
||||||
import Fs from 'fs';
|
import Fs from 'fs';
|
||||||
import { GBServer } from '../../../src/app.js';
|
import { GBServer } from '../../../src/app.js';
|
||||||
|
@ -90,61 +90,25 @@ export class GBAdminService implements IGBAdminService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getMobileCode () {
|
public static getMobileCode () {
|
||||||
const passwordGenerator = new PasswordGenerator();
|
|
||||||
const options = {
|
return caseSensitive_Numbs_SpecialCharacters_PW(15);
|
||||||
upperCaseAlpha: false,
|
|
||||||
lowerCaseAlpha: false,
|
|
||||||
number: true,
|
|
||||||
specialCharacter: false,
|
|
||||||
minimumLength: 6,
|
|
||||||
maximumLength: 6
|
|
||||||
};
|
|
||||||
|
|
||||||
return passwordGenerator.generatePassword(options);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getRndPassword (): string {
|
public static getRndPassword (): string {
|
||||||
const passwordGenerator = new PasswordGenerator();
|
let password = caseSensitive_Numbs_SpecialCharacters_PW(15);
|
||||||
const options = {
|
|
||||||
upperCaseAlpha: true,
|
|
||||||
lowerCaseAlpha: true,
|
|
||||||
number: true,
|
|
||||||
specialCharacter: true,
|
|
||||||
minimumLength: 14,
|
|
||||||
maximumLength: 14
|
|
||||||
};
|
|
||||||
let password = passwordGenerator.generatePassword(options);
|
|
||||||
password = password.replace(/[\@\[\=\:\;\?\"\'\#]/gi, '*');
|
password = password.replace(/[\@\[\=\:\;\?\"\'\#]/gi, '*');
|
||||||
|
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getRndReadableIdentifier () {
|
public static getRndReadableIdentifier () {
|
||||||
const passwordGenerator = new PasswordGenerator();
|
|
||||||
const options = {
|
|
||||||
upperCaseAlpha: false,
|
|
||||||
lowerCaseAlpha: true,
|
|
||||||
number: false,
|
|
||||||
specialCharacter: false,
|
|
||||||
minimumLength: 14,
|
|
||||||
maximumLength: 14
|
|
||||||
};
|
|
||||||
|
|
||||||
return passwordGenerator.generatePassword(options);
|
return caseSensitive_Numbs_SpecialCharacters_PW(15);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getNumberIdentifier () {
|
public static getNumberIdentifier () {
|
||||||
const passwordGenerator = new PasswordGenerator();
|
|
||||||
const options = {
|
|
||||||
upperCaseAlpha: false,
|
|
||||||
lowerCaseAlpha: false,
|
|
||||||
number: true,
|
|
||||||
specialCharacter: false,
|
|
||||||
minimumLength: 14,
|
|
||||||
maximumLength: 14
|
|
||||||
};
|
|
||||||
|
|
||||||
return passwordGenerator.generatePassword(options);
|
return caseSensitive_Numbs_SpecialCharacters_PW(15);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -73,10 +73,10 @@ export class StartDialog {
|
||||||
// Connects to the cloud and retrieves subscriptions.
|
// Connects to the cloud and retrieves subscriptions.
|
||||||
|
|
||||||
const credentials = await GBAdminService.getADALCredentialsFromUsername(username, password);
|
const credentials = await GBAdminService.getADALCredentialsFromUsername(username, password);
|
||||||
const list = await installationDeployer.getSubscriptions(credentials);
|
|
||||||
|
|
||||||
let subscriptionId: string;
|
let subscriptionId: string;
|
||||||
while (subscriptionId === undefined) {
|
while (subscriptionId === undefined) {
|
||||||
|
const list = await installationDeployer.getSubscriptions(credentials);
|
||||||
subscriptionId = this.retrieveSubscriptionId(list);
|
subscriptionId = this.retrieveSubscriptionId(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,6 +178,10 @@ generate manually an App ID and App Secret.\n`
|
||||||
|
|
||||||
private static retrieveSubscriptionId (list) {
|
private static retrieveSubscriptionId (list) {
|
||||||
let subscriptionId = GBConfigService.get('CLOUD_SUBSCRIPTIONID');
|
let subscriptionId = GBConfigService.get('CLOUD_SUBSCRIPTIONID');
|
||||||
|
if (subscriptionId){
|
||||||
|
|
||||||
|
return subscriptionId;
|
||||||
|
}
|
||||||
const map = {};
|
const map = {};
|
||||||
let index = 1;
|
let index = 1;
|
||||||
list.forEach(element => {
|
list.forEach(element => {
|
||||||
|
|
|
@ -52,7 +52,7 @@ import { GBConfigService } from '../../../packages/core.gbapp/services/GBConfigS
|
||||||
import { GBDeployer } from '../../../packages/core.gbapp/services/GBDeployer.js';
|
import { GBDeployer } from '../../../packages/core.gbapp/services/GBDeployer.js';
|
||||||
import { Account } from '@azure/arm-cognitiveservices';
|
import { Account } from '@azure/arm-cognitiveservices';
|
||||||
import MicrosoftGraph from '@microsoft/microsoft-graph-client';
|
import MicrosoftGraph from '@microsoft/microsoft-graph-client';
|
||||||
import Spinner from 'cli-spinner';
|
import {Spinner} from 'cli-spinner';
|
||||||
import * as publicIp from 'public-ip';
|
import * as publicIp from 'public-ip';
|
||||||
import { AccessToken, TokenCredential } from '@azure/core-auth';
|
import { AccessToken, TokenCredential } from '@azure/core-auth';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue