new(all): #156 and logo enhancement.

This commit is contained in:
rodrigorodriguez 2023-02-24 13:31:40 -03:00
parent 2f9d07908f
commit 6fcd009fb2
4 changed files with 22 additions and 37 deletions

View file

@ -11,15 +11,11 @@ import pjson from './package.json' assert { type: 'json' };
console.log(``); console.log(``);
console.log(``); console.log(``);
console.log(``); console.log(``);
console.log(` ██████ ███████ ███ ██ ███████ ██████ █████ ██ ██████ ██████ ████████ ███████ ®`); console.log(` ████ ██████ ███ ██ ██████ ██████ █████ ██ ██████ ███████ ████████ ████ ® `);
console.log(`██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ `); console.log(` ██ ███ ██ █ ██ ██ ██ ██ █ ██ ███ ███ ███ ██ ██████ ██ * * ██ ██ █ `);
console.log(`██ ███ █████ ██ ██ ██ █████ ██████ ███████ ██ ██████ ██ ██ ██ ███████ `); console.log(` ██████ ██████ ██ ████ ██████ ██ ██ ██ ██ ██████ ██████ ███████ ██ ████ 3.0`);
console.log(`██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ `);
console.log(` ██████ ███████ ██ ████ ███████ ██ ██ ██ ██ ███████ ██████ ██████ ██ ███████ 3.0`);
console.log(``);
console.log(`botserver@${pjson.version}, botlib@${pjson.dependencies.botlib}, botbuilder@${pjson.dependencies.botbuilder}, nodeJS: ${process.version}, platform: ${process.platform}, architecture: ${process.arch}.`);
console.log(``);
console.log(``); console.log(``);
console.debug(`botserver@${pjson.version}, botlib@${pjson.dependencies.botlib}, botbuilder@${pjson.dependencies.botbuilder}, nodeJS: ${process.version}, platform: ${process.platform}, architecture: ${process.arch}.`);
var now = () => { var now = () => {
return new Date().toISOString().replace(/T/, ' ').replace(/\..+/, '') + ' UTC'; return new Date().toISOString().replace(/T/, ' ').replace(/\..+/, '') + ' UTC';
}; };

View file

@ -1,2 +1,2 @@
echo Starting General Bots... echo Starting General Bots...
node boot.mjs --no-warnings npm run start

View file

@ -75,8 +75,8 @@
"adm-zip": "0.5.9", "adm-zip": "0.5.9",
"alasql": "2.1.6", "alasql": "2.1.6",
"any-shell-escape": "0.1.1", "any-shell-escape": "0.1.1",
"arraybuffer-to-buffer": "^0.0.7", "arraybuffer-to-buffer": "0.0.7",
"async-mutex": "^0.4.0", "async-mutex": "0.4.0",
"async-promises": "0.2.3", "async-promises": "0.2.3",
"basic-auth": "2.0.1", "basic-auth": "2.0.1",
"billboard.js": "3.6.3", "billboard.js": "3.6.3",
@ -87,7 +87,7 @@
"botbuilder-ai": "4.18.0", "botbuilder-ai": "4.18.0",
"botbuilder-dialogs": "4.18.0", "botbuilder-dialogs": "4.18.0",
"botframework-connector": "4.18.0", "botframework-connector": "4.18.0",
"botlib": "3.0.2", "botlib": "3.0.5",
"c3-chart-maker": "0.2.8", "c3-chart-maker": "0.2.8",
"chatgpt": "2.4.2", "chatgpt": "2.4.2",
"chrome-remote-interface": "0.31.3", "chrome-remote-interface": "0.31.3",
@ -118,18 +118,18 @@
"ms-rest-azure": "3.0.0", "ms-rest-azure": "3.0.0",
"nexmo": "2.9.1", "nexmo": "2.9.1",
"node-cron": "3.0.2", "node-cron": "3.0.2",
"node-html-parser": "^6.1.5", "node-html-parser": "6.1.5",
"node-nlp": "4.24.0", "node-nlp": "4.24.0",
"node-tesseract-ocr": "2.2.1", "node-tesseract-ocr": "2.2.1",
"open": "8.4.0", "open": "8.4.0",
"open-docxtemplater-image-module": "^1.0.3", "open-docxtemplater-image-module": "1.0.3",
"pdf-extraction": "1.0.2", "pdf-extraction": "1.0.2",
"pdf-to-png-converter": "^2.7.1", "pdf-to-png-converter": "2.7.1",
"pdfkit": "0.13.0", "pdfkit": "0.13.0",
"phone": "3.1.30", "phone": "3.1.30",
"pizzip": "3.1.3", "pizzip": "3.1.3",
"pptxtemplater": "1.0.5", "pptxtemplater": "1.0.5",
"pragmatismo-io-framework": "1.0.20", "pragmatismo-io-framework": "1.1.0",
"prism-media": "1.3.4", "prism-media": "1.3.4",
"public-ip": "6.0.1", "public-ip": "6.0.1",
"punycode": "2.1.1", "punycode": "2.1.1",
@ -146,7 +146,7 @@
"sequelize": "6.28.2", "sequelize": "6.28.2",
"sequelize-cli": "6.6.0", "sequelize-cli": "6.6.0",
"sequelize-typescript": "2.1.5", "sequelize-typescript": "2.1.5",
"sharp": "^0.31.3", "sharp": "0.31.3",
"simple-git": "3.16.0", "simple-git": "3.16.0",
"speakingurl": "14.0.1", "speakingurl": "14.0.1",
"ssr-for-bots": "1.0.1-c", "ssr-for-bots": "1.0.1-c",
@ -182,8 +182,8 @@
"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", "simple-commit-message": "4.0.13",
"super-strong-password-generator": "^2.0.2", "super-strong-password-generator": "2.0.2",
"super-strong-password-generator-es": "^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"

View file

@ -713,6 +713,7 @@ export class GBDeployer implements IGBDeployer {
public async rebuildIndex(instance: IGBInstance, searchSchema: any) { public async rebuildIndex(instance: IGBInstance, searchSchema: any) {
// Prepares search. // Prepares search.
const search = new AzureSearch( const search = new AzureSearch(
instance.searchKey, instance.searchKey,
instance.searchHost, instance.searchHost,
@ -721,40 +722,28 @@ export class GBDeployer implements IGBDeployer {
); );
const connectionString = GBDeployer.getConnectionStringFromInstance(instance); const connectionString = GBDeployer.getConnectionStringFromInstance(instance);
const dsName = 'gb'; const dsName = 'gb';
// Removes any previous index.
try { try {
await search.deleteDataSource(dsName); await search.createDataSource(dsName, dsName, 'GuaribasQuestion', 'azuresql', connectionString);
} catch (err) { } catch (err) {
// If it is a 404 there is nothing to delete as it is the first creation. GBLog.error(err);
if (err.code !== 404) {
throw err;
}
} }
// Removes the index. // Removes the index.
try { try {
await search.deleteIndex(); await search.createIndex(searchSchema, dsName);
} catch (err) { } catch (err) {
// If it is a 404 there is nothing to delete as it is the first creation. // If it is a 404 there is nothing to delete as it is the first creation.
if (err.code !== 404 && err.code !== 'OperationNotAllowed') { if (err.code !== 404 && err.code !== 'OperationNotAllowed') {
throw err;
} }
} }
// Creates the data source and index on the cloud.
try { await search.rebuildIndex(instance.searchIndexer);
await search.createDataSource(dsName, dsName, 'GuaribasQuestion', 'azuresql', connectionString);
} catch (err) {
GBLog.error(err);
throw err;
}
await search.createIndex(searchSchema, dsName);
} }
/** /**