refactor(basic.gblib): Renaming WA.

This commit is contained in:
rodrigorodriguez 2023-02-04 10:57:05 -03:00
parent 1914d377ab
commit cf36adfab7
3 changed files with 6 additions and 6 deletions

View file

@ -42,7 +42,7 @@ import { Sequelize } from 'sequelize-typescript';
import { createServerRouter } from 'typescript-rest-rpc/lib/server.js'; import { createServerRouter } from 'typescript-rest-rpc/lib/server.js';
import { DialogKeywords } from './services/DialogKeywords.js'; import { DialogKeywords } from './services/DialogKeywords.js';
import { SystemKeywords } from './services/SystemKeywords.js'; import { SystemKeywords } from './services/SystemKeywords.js';
import { WebAutomationKeywords } from './services/WebAutomationKeywords.js'; import { WebAutomationServices } from './services/WebAutomationServices.js';
import { ImageProcessing } from './services/ImageProcessing.js'; import { ImageProcessing } from './services/ImageProcessing.js';
import { DebuggerService } from './services/DebuggerService.js'; import { DebuggerService } from './services/DebuggerService.js';
import * as koaBody from 'koa-body'; import * as koaBody from 'koa-body';
@ -81,7 +81,7 @@ export class GBBasicPackage implements IGBPackage {
} }
public async loadBot (min: GBMinInstance): Promise<void> { public async loadBot (min: GBMinInstance): Promise<void> {
const dk = new DialogKeywords(min, null, null); const dk = new DialogKeywords(min, null, null);
const wa = new WebAutomationKeywords(min, null, dk); const wa = new WebAutomationServices(min, null, dk);
const sys = new SystemKeywords(min, null, dk, wa); const sys = new SystemKeywords(min, null, dk, wa);
const dbg = new DebuggerService(min, null, dk); const dbg = new DebuggerService(min, null, dk);
const img = new ImageProcessing(min, null, dk); const img = new ImageProcessing(min, null, dk);

View file

@ -57,7 +57,7 @@ import sgMail from '@sendgrid/mail';
import mammoth from 'mammoth'; import mammoth from 'mammoth';
import qrcode from 'qrcode'; import qrcode from 'qrcode';
import { json } from 'body-parser'; import { json } from 'body-parser';
import { WebAutomationKeywords } from './WebAutomationKeywords.js'; import { WebAutomationServices } from './WebAutomationServices.js';
/** /**
* Default check interval for user replay * Default check interval for user replay
@ -833,7 +833,7 @@ export class DialogKeywords {
if (kind === 'file') { if (kind === 'file') {
GBLog.info(`BASIC (${min.botId}): Upload done for ${answer.filename}.`); GBLog.info(`BASIC (${min.botId}): Upload done for ${answer.filename}.`);
const handle = WebAutomationKeywords.cyrb53(this.min.botId + answer.filename); const handle = WebAutomationServices.cyrb53(this.min.botId + answer.filename);
GBServer.globals.files[handle] = answer; GBServer.globals.files[handle] = answer;
result = handle; result = handle;
} else if (kind === 'boolean') { } else if (kind === 'boolean') {

View file

@ -49,7 +49,7 @@ import { pid } from 'process';
/** /**
* Web Automation services of conversation to be called by BASIC. * Web Automation services of conversation to be called by BASIC.
*/ */
export class WebAutomationKeywords { export class WebAutomationServices {
/** /**
* Reference to minimal bot instance. * Reference to minimal bot instance.
*/ */
@ -131,7 +131,7 @@ export class WebAutomationKeywords {
} }
await page.goto(url); await page.goto(url);
const handle = WebAutomationKeywords.cyrb53(this.min.botId + url); const handle = WebAutomationServices.cyrb53(this.min.botId + url);
this.pageMap[handle] = page; this.pageMap[handle] = page;