fix(all): New templates.
This commit is contained in:
parent
760d262842
commit
2a93f0886f
17 changed files with 35 additions and 25 deletions
5
boot.mjs
5
boot.mjs
|
@ -6,6 +6,7 @@ import Path from 'path';
|
||||||
import { exec } from 'child_process';
|
import { exec } from 'child_process';
|
||||||
import pjson from './package.json' assert { type: 'json' };
|
import pjson from './package.json' assert { type: 'json' };
|
||||||
|
|
||||||
|
|
||||||
// Displays version of Node JS being used at runtime and others attributes.
|
// Displays version of Node JS being used at runtime and others attributes.
|
||||||
|
|
||||||
process.stdout.write(`General Bots. BotServer@${pjson.version}, botlib@${pjson.dependencies.botlib}, node@${process.version.replace('v', '')}, ${process.platform} ${process.arch} `);
|
process.stdout.write(`General Bots. BotServer@${pjson.version}, botlib@${pjson.dependencies.botlib}, node@${process.version.replace('v', '')}, ${process.platform} ${process.arch} `);
|
||||||
|
@ -15,8 +16,8 @@ var __dirname = process.env.PWD || process.cwd();
|
||||||
try {
|
try {
|
||||||
var run = () => {
|
var run = () => {
|
||||||
|
|
||||||
import('./dist/src/app.js').then((gb)=> {
|
import('./dist/src/webapp.js').then((gb)=> {
|
||||||
gb.GBServer.run()
|
gb.GBUI.run()
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var processDist = () => {
|
var processDist = () => {
|
||||||
|
|
|
@ -124,11 +124,13 @@
|
||||||
"cli-progress": "3.12.0",
|
"cli-progress": "3.12.0",
|
||||||
"cli-spinner": "0.2.10",
|
"cli-spinner": "0.2.10",
|
||||||
"core-js": "3.37.1",
|
"core-js": "3.37.1",
|
||||||
|
"csv-database": "^0.9.2",
|
||||||
"data-forge": "1.10.2",
|
"data-forge": "1.10.2",
|
||||||
"date-diff": "1.0.2",
|
"date-diff": "1.0.2",
|
||||||
"docximager": "0.0.4",
|
"docximager": "0.0.4",
|
||||||
"docxtemplater": "3.47.4",
|
"docxtemplater": "3.47.4",
|
||||||
"dotenv-extended": "2.9.0",
|
"dotenv-extended": "2.9.0",
|
||||||
|
"electron": "32.0.1",
|
||||||
"exceljs": "4.4.0",
|
"exceljs": "4.4.0",
|
||||||
"express": "4.19.2",
|
"express": "4.19.2",
|
||||||
"express-remove-route": "1.0.0",
|
"express-remove-route": "1.0.0",
|
||||||
|
|
|
@ -35,7 +35,7 @@ import { GBServer } from '../../../src/app.js';
|
||||||
import Fs from 'fs';
|
import Fs from 'fs';
|
||||||
import SwaggerClient from 'swagger-client';
|
import SwaggerClient from 'swagger-client';
|
||||||
import { spawn } from 'child_process';
|
import { spawn } from 'child_process';
|
||||||
import { CodeServices } from '../../gpt.gblib/services/CodeServices.js';
|
import { CodeServices } from '../../llm.gblib/services/CodeServices.js';
|
||||||
import { GBLogEx } from '../../core.gbapp/services/GBLogEx.js';
|
import { GBLogEx } from '../../core.gbapp/services/GBLogEx.js';
|
||||||
import { GBUtil } from '../../../src/util.js';
|
import { GBUtil } from '../../../src/util.js';
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ import ImageModule from 'open-docxtemplater-image-module';
|
||||||
import { GBConversationalService } from '../../core.gbapp/services/GBConversationalService.js';
|
import { GBConversationalService } from '../../core.gbapp/services/GBConversationalService.js';
|
||||||
import { WebAutomationServices } from './WebAutomationServices.js';
|
import { WebAutomationServices } from './WebAutomationServices.js';
|
||||||
import { KeywordsExpressions } from './KeywordsExpressions.js';
|
import { KeywordsExpressions } from './KeywordsExpressions.js';
|
||||||
import { ChatServices } from '../../gpt.gblib/services/ChatServices.js';
|
import { ChatServices } from '../../llm.gblib/services/ChatServices.js';
|
||||||
import mime from 'mime-types';
|
import mime from 'mime-types';
|
||||||
import exts from '../../../extensions.json' assert { type: 'json' };
|
import exts from '../../../extensions.json' assert { type: 'json' };
|
||||||
import { SecService } from '../../security.gbapp/services/SecService.js';
|
import { SecService } from '../../security.gbapp/services/SecService.js';
|
||||||
|
|
|
@ -83,7 +83,7 @@ import { GBAdminService } from '../../admin.gbapp/services/GBAdminService.js';
|
||||||
import { GBVMService } from '../../basic.gblib/services/GBVMService.js';
|
import { GBVMService } from '../../basic.gblib/services/GBVMService.js';
|
||||||
import { DialogKeywords } from '../../basic.gblib/services/DialogKeywords.js';
|
import { DialogKeywords } from '../../basic.gblib/services/DialogKeywords.js';
|
||||||
import { GBMinService } from '../../core.gbapp/services/GBMinService.js';
|
import { GBMinService } from '../../core.gbapp/services/GBMinService.js';
|
||||||
import { ChatServices } from '../../gpt.gblib/services/ChatServices.js';
|
import { ChatServices } from '../../llm.gblib/services/ChatServices.js';
|
||||||
import { GBUtil } from '../../../src/util.js';
|
import { GBUtil } from '../../../src/util.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -47,7 +47,7 @@ import { GBSSR } from '../../core.gbapp/services/GBSSR.js';
|
||||||
import pkg from 'whatsapp-web.js';
|
import pkg from 'whatsapp-web.js';
|
||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import { DialogKeywords } from '../../basic.gblib/services/DialogKeywords.js';
|
import { DialogKeywords } from '../../basic.gblib/services/DialogKeywords.js';
|
||||||
import { ChatServices } from '../../gpt.gblib/services/ChatServices.js';
|
import { ChatServices } from '../../llm.gblib/services/ChatServices.js';
|
||||||
import { GBAdminService } from '../../admin.gbapp/services/GBAdminService.js';
|
import { GBAdminService } from '../../admin.gbapp/services/GBAdminService.js';
|
||||||
import { GBUtil } from '../../../src/util.js';
|
import { GBUtil } from '../../../src/util.js';
|
||||||
const { WAState, Client, MessageMedia } = pkg;
|
const { WAState, Client, MessageMedia } = pkg;
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
import { GBConfigService } from "../packages/core.gbapp/services/GBConfigService";
|
import { GBConfigService } from '../packages/core.gbapp/services/GBConfigService.js';
|
||||||
import { app, BrowserWindow } from 'electron';
|
const {app} = (await import('electron')).default;
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
|
|
||||||
export function runUI() {
|
export function runUI() {
|
||||||
|
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
const win = new BrowserWindow({ width: 800, height: 600, title: 'General Bots Studio' });
|
const win = null;// new BrowserWindow({ width: 800, height: 600, title: 'General Bots Studio' });
|
||||||
|
|
||||||
|
import('./app.js').then(gb => {
|
||||||
|
gb.GBServer.run();
|
||||||
// and load the index.html of the app.
|
// and load the index.html of the app.
|
||||||
win.loadURL(
|
win.loadURL(
|
||||||
url.format({
|
url.format({
|
||||||
|
@ -16,6 +18,11 @@ import url from 'url';
|
||||||
slashes: true
|
slashes: true
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
app.on('ready', runUI);
|
export class GBUI {
|
||||||
|
static run() {
|
||||||
|
app.on('ready', runUI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ Segue o exemplo do JSON do Pedido, apague os itens e mande um com o pedido feito
|
||||||
item: {
|
item: {
|
||||||
id: 23872,
|
id: 23872,
|
||||||
valor: 20,
|
valor: 20,
|
||||||
nome: Caipirinha Limão
|
nome: Guaraná
|
||||||
},
|
},
|
||||||
itensAcompanhamento: [
|
itensAcompanhamento: [
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ Segue o exemplo do JSON do Pedido, apague os itens e mande um com o pedido feito
|
||||||
item: {
|
item: {
|
||||||
id: 25510,
|
id: 25510,
|
||||||
valor: 12,
|
valor: 12,
|
||||||
nome: Heineken Lata 350ml
|
nome: Laranja Lata 350ml
|
||||||
},
|
},
|
||||||
itensAcompanhamento: [],
|
itensAcompanhamento: [],
|
||||||
quantidade: 1,
|
quantidade: 1,
|
||||||
|
@ -68,7 +68,7 @@ Segue o exemplo do JSON do Pedido, apague os itens e mande um com o pedido feito
|
||||||
],
|
],
|
||||||
barracaId: ${barraca},
|
barracaId: ${barraca},
|
||||||
usuarioId: ${operador},
|
usuarioId: ${operador},
|
||||||
identificadorConta: Rafael,
|
identificadorConta: Areia,
|
||||||
tipoEntregaId: 2,
|
tipoEntregaId: 2,
|
||||||
camposTipoEntrega: {
|
camposTipoEntrega: {
|
||||||
Mesa: 5
|
Mesa: 5
|
||||||
|
|
Loading…
Add table
Reference in a new issue