aggiornamenti vari. prima di VITE

This commit is contained in:
Surya Paolo
2025-02-25 18:13:01 +01:00
parent f8de205cf6
commit 57679fe649
25 changed files with 1595 additions and 708 deletions

View File

@@ -16,8 +16,8 @@ URLBASE_APP1=https://localhost
PORT_APP1=8080
SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB
HTTPS_LOCALHOST=true
DEBUG=0
DEBUG=0
VITE_DEBUG=0
VITE_DEBUG=0
TESTING_ON=1
LOCALE=1
DELAY_SENDEMAIL=2000
@@ -44,4 +44,7 @@ CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpY
MIAB_HOST=box.lamiaposta.org
MIAB_ADMIN_EMAIL=admin@lamiaposta.org
MIAB_ADMIN_PASSWORD=passpao1pabox@1A
DS_API_KEY="sk-222e3addb3d8455d8b0516d93906eec7"
DS_API_KEY="sk-222e3addb3d8455d8b0516d93906eec7"
API_KEY_MSSQL="m68yADSr123MIVIDA@154$DSAGVOK"
SERVER_A_URL="http://51.77.156.69:3000"

View File

@@ -16,8 +16,8 @@ URLBASE_APP1=https://localhost
PORT_APP1=8080
SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB
HTTPS_LOCALHOST=true
DEBUG=0
DEBUG=0
VITE_DEBUG=0
VITE_DEBUG=0
TESTING_ON=1
LOCALE=1
DELAY_SENDEMAIL=2000
@@ -41,4 +41,4 @@ FTPSERVER_PWD=ftpmypwd@1A_
AUTH_NEW_SITES=123123123
SCRIPTS_DIR=admin_scripts
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]
DS_API_KEY="sk-222e3addb3d8455d8b0516d93906eec7"
DS_API_KEY="sk-222e3addb3d8455d8b0516d93906eec7"

View File

@@ -1,12 +1,12 @@
DATABASE=test_PiuCheBuono
DATABASE=test_FreePlanet
UDB=paofreeplanet
PDB=mypassword@1A
SEND_EMAIL=0
SEND_EMAIL_ORDERS=1
PORT=3000
appTelegram_TEST=["1","17"]
appTelegram=["1","17"]
appTelegram_DEVELOP=["17"]
appTelegram_TEST=["1","13"]
appTelegram=["1","13"]
appTelegram_DEVELOP=["13"]
DOMAIN=mongodb://localhost:27017/
AUTH_MONGODB=1
MONGODB_USER=admin
@@ -16,8 +16,8 @@ URLBASE_APP1=https://localhost
PORT_APP1=8080
SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB
HTTPS_LOCALHOST=true
DEBUG=0
DEBUG=0
VITE_DEBUG=0
VITE_DEBUG=0
TESTING_ON=1
LOCALE=1
DELAY_SENDEMAIL=2000
@@ -41,7 +41,4 @@ FTPSERVER_PWD=ftpmypwd@1A_
AUTH_NEW_SITES=123123123
SCRIPTS_DIR=admin_scripts
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]
MIAB_HOST=box.lamiaposta.org
MIAB_ADMIN_EMAIL=admin@lamiaposta.org
MIAB_ADMIN_PASSWORD=passpao1pabox@1A
DS_API_KEY="sk-222e3addb3d8455d8b0516d93906eec7"
DS_API_KEY="sk-222e3addb3d8455d8b0516d93906eec7"

View File

@@ -12,7 +12,7 @@ AUTH_MONGODB=1
MONGODB_USER=admin
MONGODB_PWD=mypwadminREAL@1A
SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB
DEBUG=0
VITE_DEBUG=0
LOCALE=0
DELAY_SENDEMAIL=1000
VAPI_KEY_SUBJECT="mailto:paolo@freeplanet.app"

View File

@@ -15,7 +15,7 @@ AUTH_MONGODB=1
MONGODB_USER=admin
MONGODB_PWD=mypwadminREAL@1A
SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB
DEBUG=0
VITE_DEBUG=0
LOCALE=0
DELAY_SENDEMAIL=1000
VAPI_KEY_SUBJECT="mailto:surya@riso.app"
@@ -35,4 +35,11 @@ SCRIPTS_DIR=admin_scripts
CLOUDFLARE_TOKENS=[{"label":"Paolo.arena77@gmail.com","value":"M9EM309v8WFquJKpYgZCw-TViM2wX6vB3wlK6GD0"},{"label":"gruppomacro.com","value":"bqmzGShoX7WqOBzkXocoECyBkPq3GfqcM5t6VFd8"}]
MIAB_HOST=box.lamiaposta.org
MIAB_ADMIN_EMAIL=admin@lamiaposta.org
MIAB_ADMIN_PASSWORD=passpao1pabox@1A
MIAB_ADMIN_PASSWORD=passpao1pabox@1A
#DB_CONNECTION=sqlsrv
DB_HOST_SQLSRVTEST=31.3.180.50
DB_PORT_SQLSRVTEST=14338
DB_DATABASE_SQLSRVTEST=ANAG_MACRO
DB_USERNAME_SQLSRVTEST=woo
DB_PASSWORD_SQLSRVTEST=4n4traPe@

View File

@@ -12,7 +12,7 @@ AUTH_MONGODB=1
MONGODB_USER=admin
MONGODB_PWD=mypwadminREAL@1A
SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB
DEBUG=0
VITE_DEBUG=0
LOCALE=0
DELAY_SENDEMAIL=1000
VAPI_KEY_SUBJECT="mailto:surya@riso.app"

View File

@@ -15,7 +15,7 @@ AUTH_MONGODB=1
MONGODB_USER=admin
MONGODB_PWD=mypwadmin@1A
SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB
DEBUG=0
VITE_DEBUG=0
LOCALE=0
DELAY_SENDEMAIL=1000
VAPI_KEY_SUBJECT="mailto:surya@riso.app"

View File

@@ -12,7 +12,7 @@ AUTH_MONGODB=1
MONGODB_USER=admin
MONGODB_PWD=mypwadmin@1A
SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB
DEBUG=0
VITE_DEBUG=0
LOCALE=0
DELAY_SENDEMAIL=1000
VAPI_KEY_SUBJECT="mailto:surya@riso.app"

View File

@@ -13,7 +13,7 @@ AUTH_MONGODB=1
MONGODB_USER=admin
MONGODB_PWD=mypwadmin@1A
SIGNCODE=SU2134hncaskjdbo231oihJSDNHEI$1@AB
DEBUG=0
VITE_DEBUG=0
LOCALE=0
DELAY_SENDEMAIL=1000
VAPI_KEY_SUBJECT="mailto:paolo@freeplanet.app"

File diff suppressed because it is too large Load Diff

View File

@@ -417,7 +417,7 @@ async function mystart() {
}
mycron();
if (!process.env.DEBUG) {
if (!process.env.VITE_DEBUG) {
mycron();
}
}
@@ -546,14 +546,14 @@ function testmsgwebpush() {
// Cron every X minutes
cron.schedule('*/1 * * * *', () => {
// console.log('Running Cron Job');
// if (!process.env.DEBUG) {
// if (!process.env.VITE_DEBUG) {
mycron();
// }
});
// Cron every X minutes
cron.schedule('*/60 * * * *', async () => {
if (!process.env.DEBUG) {
if (!process.env.VITE_DEBUG) {
mycron_30min();
}
});

View File

@@ -28,7 +28,7 @@
"country-codes-list": "^1.6.8",
"crypto-js": "^4.1.1",
"csurf": "^1.11.0",
"dotenv": "^16.0.2",
"dotenv": "^16.4.7",
"ejs": "^3.1.8",
"email-templates": "^10.0.1",
"express": "^4.18.1",
@@ -65,6 +65,7 @@
"save": "^2.5.0",
"sharp": "^0.30.7",
"superagent": "^8.0.0",
"tedious": "^18.6.1",
"url-parse": "^1.5.10",
"validator": "^13.7.0",
"vhost": "^3.0.2",

View File

@@ -0,0 +1,27 @@
require("dotenv").config();
const { Sequelize } = require("sequelize");
const sequelize = new Sequelize(process.env.DB_DATABASE_SQLSRVTEST, process.env.DB_USERNAME_SQLSRVTEST, process.env.DB_PASSWORD_SQLSRVTEST, {
host: process.env.DB_HOST_SQLSRVTEST || "localhost",
port: process.env.DB_PORT_SQLSRVTEST || 1433,
dialect: "mssql",
dialectOptions: {
options: {
encrypt: false, // Cambia a true se usi SSL
},
},
logging: false, // Disabilita il logging delle query
});
async function testConnection() {
try {
await sequelize.authenticate();
console.log("Connessione al database riuscita!");
} catch (error) {
console.error("Errore nella connessione al database:", error);
}
}
testConnection();
module.exports = sequelize;

View File

@@ -0,0 +1,460 @@
const axios = require('axios');
const server_constants = require('../tools/server_constants');
const shared_consts = require('../tools/shared_nodejs');
const SERVER_A_URL = process.env.SERVER_A_URL || "http://IP_DI_SERVER_A:3000";
const API_KEY = process.env.API_KEY_MSSQL;
// Funzione per ottenere i dati
const getArticlesSales = async () => {
try {
const query = `
SELECT
a.IdArticolo, a.Titolo, a.DataPubblicazione, a.Ean13 AS isbn,
a.IdCollana, y.DescrizioneCollana, i2.DescrArgomento, a.ListaArgomenti,
a.Pagine, a.IdTipoFormato, a.Misure,
COALESCE(o.totVen, 0) as totVen, COALESCE(u.totFat, 0) as totFat,
COALESCE(p.rank3M, 0) as rank3M, COALESCE(t.fatrank3M, 0) as fatrank3M,
COALESCE(q.rank6M, 0) as rank6M, COALESCE(r.rank1Y, 0) as rank1Y,
COALESCE(t.fat3mesi, 0) as fatLast3M, COALESCE(p.venduti3mesi, 0) as vLast3M,
COALESCE(q.venduti6mesi, 0) as vLast6M, COALESCE(r.venduti1anno, 0) as vLastY,
s.ultimoOrdine as dataUltimoOrdine
FROM T_WEB_Articoli a
LEFT JOIN (SELECT CodArticoloGM, SUM(Qta) as totVen FROM T_WEB_Ordini GROUP BY CodArticoloGM) o
ON a.IdArticolo = o.CodArticoloGM
LEFT JOIN (SELECT CodArticolo, SUM(TRY_CAST(Qta AS INT)) as totFat FROM T_WEB_ArticoliFatturati WHERE ISNUMERIC(Qta) = 1 GROUP BY CodArticolo) u
ON a.IdArticolo = u.CodArticolo
WHERE a.IdStatoProdotto IS NOT NULL
ORDER BY totVen DESC;
`;
const response = await axios.post(SERVER_A_URL + '/query', { query }, {
headers: { 'x-api-key': API_KEY }
});
return response.data || [];
} catch (error) {
console.error("Errore nel recupero degli articoli:", error);
throw new Error("Errore nel recupero degli articoli venduti.");
}
};
// Endpoint per ottenere i dati in formato JSON
exports.getArticlesSalesHandler = async (req, res) => {
try {
const data = await getArticlesSales();
if (!data.length) return res.status(404).json({ message: "Nessun articolo trovato." });
res.json(data);
} catch (error) {
res.status(500).json({ error: error.message });
}
};
// Endpoint per esportare i dati come file JSON
exports.exportArticlesSalesByJSON = async (req, res) => {
try {
const data = await getArticlesSales();
if (!data.length) return res.status(404).json({ message: "Nessun articolo trovato." });
res.setHeader("Content-Type", "application/json");
res.setHeader("Content-Disposition", `attachment; filename="ranking_articles_${new Date().toISOString().split('T')[0]}.json"`);
res.json(data);
} catch (error) {
res.status(500).json({ error: error.message });
}
};
const formatDate = (dateValue) => {
const date = new Date(dateValue);
const day = String(date.getDate()).padStart(2, '0');
const month = String(date.getMonth() + 1).padStart(2, '0');
const year = date.getFullYear();
return `${day}/${month}/${year}`;
};
const getTableContent = async (options) => {
try {
// Verifica se la tabella esiste
const checkTableQuery = `SELECT COUNT(*) as tableExists FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '${options.nameTable}'`;
const checkResponse = await axios.post(SERVER_A_URL + '/query', { query: checkTableQuery }, {
headers: { 'x-api-key': API_KEY }
});
if (!checkResponse.data || checkResponse.data.length === 0 || checkResponse.data[0].tableExists === 0) {
return `La tabella '${options.nameTable}' non esiste.`;
}
// Recupera le colonne della tabella principale dal catalogo
const columnsQuery = `SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '${options.nameTable}'`;
const columnsResponse = await axios.post(SERVER_A_URL + '/query', { query: columnsQuery }, {
headers: { 'x-api-key': API_KEY }
});
const tableColumns = columnsResponse.data.map(col => col.COLUMN_NAME);
// Mappatura per unire i campi (ID e Descrizione)
const mergedMapping = {
"IdStatoProdotto": "DescrizioneStatoProdotto",
"IdTipologia": "DescrizioneTipologia",
"IdTipoFormato": "DescrizioneFormato",
"IdCollana": "DescrizioneCollana",
"ListaArgomenti": "DescrArgomento",
"ListaAutori": "AutoriCompleti",
"IdMarchioEditoriale": "CasaEditrice",
};
// Costruisce la query per recuperare i record
let dataQuery = "";
let columnsToShow = 'T.*';
if (options.fieldGM) {
columnsToShow = 'T.' + options.fieldGM;
}
if (options.nameTable.toLowerCase() === 't_web_articoli') {
if (true) {
dataQuery = `
SELECT TOP ${options.numrec}
${columnsToShow}
` + (options.campispeciali ? `
,f.DescrizioneStatoProdotto
,i.DescrizioneTipologia
,n.DescrizioneFormato
,y.DescrizioneCollana
,z.AutoriCompleti
,i2.DescrArgomento
,z3.CasaEditrice` : ``) + (options.showQtaDisponibile ? ` ,q.QtaDisponibile ` : ``) +
` FROM T_WEB_Articoli T
JOIN(
SELECT IdArticolo, MAX(DataOra) AS data
FROM T_WEB_Articoli
GROUP BY IdArticolo
) b ON T.IdArticolo = b.IdArticolo AND T.DataOra = b.data `
+ (options.campispeciali ?
` LEFT JOIN(
SELECT e.IdStatoProdotto, e.Descrizione as DescrizioneStatoProdotto
FROM T_WEB_StatiProdotto e
JOIN(
SELECT IdStatoProdotto, MAX(DataOra) as data1
FROM T_WEB_StatiProdotto
GROUP BY IdStatoProdotto
) c ON e.IdStatoProdotto = c.IdStatoProdotto AND e.DataOra = c.data1
) f ON T.IdStatoProdotto = f.IdStatoProdotto
LEFT JOIN(
SELECT g.IdTipologia, g.Descrizione as DescrizioneTipologia
FROM T_WEB_Tipologie g
JOIN(
SELECT IdTipologia, MAX(DataOra) as data1
FROM T_WEB_Tipologie
GROUP BY IdTipologia
) h ON g.IdTipologia = h.IdTipologia AND g.DataOra = h.data1
) i ON T.IdTipologia = i.IdTipologia
LEFT JOIN(
SELECT l.IdTipoFormato, l.Descrizione as DescrizioneFormato
FROM T_WEB_TipiFormato l
JOIN(
SELECT IdTipoFormato, MAX(DataOra) as data1
FROM T_WEB_TipiFormato
GROUP BY IdTipoFormato
) m ON l.IdTipoFormato = m.IdTipoFormato AND l.DataOra = m.data1
) n ON T.IdTipoFormato = n.IdTipoFormato
LEFT JOIN(
SELECT v.IdCollana, v.Descrizione as DescrizioneCollana
FROM T_WEB_Collane v
INNER JOIN(
SELECT IdCollana, MAX(ID) as MaxID
FROM T_WEB_Collane
GROUP BY IdCollana
) x ON v.IdCollana = x.IdCollana AND v.ID = x.MaxID
) y ON T.IdCollana = y.IdCollana
LEFT JOIN(
SELECT g2.IdArgomento, g2.Descrizione as DescrArgomento
FROM T_WEB_Argomenti g2
INNER JOIN(
SELECT IdArgomento, MAX(DataOra) as data12
FROM T_WEB_Argomenti
GROUP BY IdArgomento
) h ON g2.IdArgomento = h.IdArgomento AND g2.DataOra = h.data12
) i2 ON T.ListaArgomenti = i2.IdArgomento
LEFT JOIN(
SELECT
T1.IdArticolo,
STUFF((
SELECT ',' + ISNULL(A2.AutoreCompleto, '')
FROM(
SELECT CAST('<root><x>' + REPLACE(T1.ListaAutori, ',', '</x><x>') + '</x></root>' AS XML) AS DataXML
) X
CROSS APPLY X.DataXML.nodes('/root/x') AS A(x)
CROSS APPLY(
SELECT TRY_CAST(LTRIM(RTRIM(A.x.value('.', 'VARCHAR(100)'))) AS INT) AS AutoreID
) CA
JOIN(
SELECT a.IdAutore, CONCAT(a.Nome, ' ', a.Cognome) AS AutoreCompleto
FROM T_WEB_Autori a
JOIN(
SELECT IdAutore, MAX(DataOra) AS maxData
FROM T_WEB_Autori
GROUP BY IdAutore
) aa ON a.IdAutore = aa.IdAutore AND a.DataOra = aa.maxData
) A2 ON CA.AutoreID = A2.IdAutore
FOR XML PATH(''), TYPE
).value('.', 'NVARCHAR(MAX)'), 1, 1, '') AS AutoriCompleti
FROM T_WEB_Articoli T1
GROUP BY T1.IdArticolo, T1.ListaAutori
) z ON T.IdArticolo = z.IdArticolo
LEFT JOIN(
SELECT a3.IdMarchioEditoriale, a3.Descrizione as CasaEditrice
FROM T_WEB_MarchiEditoriali a3
JOIN(
SELECT IdMarchioEditoriale, MAX(DataOra) as maxData
FROM T_WEB_MarchiEditoriali
GROUP BY IdMarchioEditoriale
) aa3 ON a3.IdMarchioEditoriale = aa3.IdMarchioEditoriale AND a3.DataOra = aa3.maxData
) z3 ON T.IdMarchioEditoriale = z3.IdMarchioEditoriale `
: ``)
+ (options.showQtaDisponibile ?
` LEFT JOIN(
SELECT o.Codice, o.QtaDisponibile
FROM T_WEB_Disponibile o
JOIN(
SELECT Codice, MAX(DataOra) as data1
FROM T_WEB_Disponibile
GROUP BY Codice
) p ON o.Codice = p.Codice AND o.DataOra = p.data1
) q ON T.IdArticolo = q.Codice` : ``)
} else {
dataQuery += `
SELECT TOP ${options.numrec}
T.*
FROM T_WEB_Articoli T
JOIN(
SELECT IdArticolo, MAX(DataOra) AS data
FROM T_WEB_Articoli
GROUP BY IdArticolo
) b ON T.IdArticolo = b.IdArticolo AND T.DataOra = b.data
`;
}
} else {
dataQuery = `SELECT TOP ${options.numrec} * FROM ${options.nameTable} `;
}
if (options.where && options.where.trim() !== "") {
dataQuery += ` WHERE ${options.where} `;
}
// Esegue la query per recuperare i dati
console.log('dataQuery', dataQuery);
const dataResponse = await axios.post(SERVER_A_URL + '/query', { query: dataQuery }, {
headers: { 'x-api-key': API_KEY }
});
const records = dataResponse.data;
if (!records || records.length === 0) {
return `Nessun record trovato nella tabella '${options.nameTable}'.`;
}
// Determina quali colonne visualizzare.
let displayColumns;
if (options.nameTable.toLowerCase() === 't_web_articoli') {
// Usa tutte le proprietà del record, escludendo le colonne dei campi uniti (quelle usate per il merge)
displayColumns = Object.keys(records[0]).filter(col => !Object.values(mergedMapping).includes(col));
} else {
displayColumns = tableColumns;
}
// Funzione per ottenere il valore da visualizzare, fondendo i campi se presente nella mappatura
const getDisplayValue = (record, col) => {
let value = record[col] ?? 'NULL';
// Format date solo se il nome della colonna indica una data/ora
if ((col.toLowerCase().includes("data") || col.toLowerCase().includes("ora")) && value !== 'NULL') {
if (value.includes(',')) {
// Se ci sono più valori separati da virgola, formatta ciascuno se è una data valida
value = value.split(',')
.map(item => {
const trimmed = item.trim();
const parsed = Date.parse(trimmed);
return !isNaN(parsed) ? formatDate(trimmed) : trimmed;
})
.join(', ');
} else {
const parsed = Date.parse(value);
if (!isNaN(parsed)) {
value = formatDate(value);
}
}
}
if (mergedMapping[col]) {
return `${record[mergedMapping[col]] || ''} (${value})`;
}
return value;
};
// Costruisce l'output HTML
let output = "";
if (options.outhtml) {
if (records.length === 1) {
// Se c'è un solo record, visualizza una lista di chiavi e valori
const record = records[0];
output += `
< table border = '1' style = "border-collapse: collapse; width: 50%;" >
<thead>
<tr>
<th style="padding: 8px; background-color: #f2f2f2;">Campo</th>
<th style="padding: 8px; background-color: #f2f2f2;">Valore</th>
</tr>
</thead>
<tbody>
`;
displayColumns.forEach(column => {
output += `
<tr>
<td style="padding: 8px;">${column}</td>
<td style="padding: 8px;">${getDisplayValue(record, column)}</td>
</tr>
`;
});
output += `
</tbody>
</table >
`;
} else {
// Se ci sono più record, visualizza una tabella con intestazioni
output += "<table border='1' style='border-collapse: collapse; width: 100%;'><thead><tr>";
displayColumns.forEach(column => {
output += `< th style = "padding: 8px; background-color: #f2f2f2;" > ${column}</th > `;
});
output += "</tr></thead><tbody>";
records.forEach(record => {
output += "<tr>";
displayColumns.forEach(column => {
output += `< td style = "padding: 8px;" > ${getDisplayValue(record, column)}</td > `;
});
output += "</tr>";
});
output += "</tbody></table>";
}
} else {
// solo dati
output = {};
if (options.fieldGM) {
if (records && records.length === 1) {
output[options.fieldGM] = records[0][options.fieldGM];
}
} else {
output = [];
records.forEach(record => {
let myrec = {}
displayColumns.forEach(column => {
myrec[column] = `${getDisplayValue(record, column)} `;
});
output.push(myrec)
});
}
}
return output;
} catch (error) {
console.error("Errore nel recupero della tabella: ", error.message);
if (options.outhtml) {
output = `
<head>
<meta charset="UTF-8">
<title>Errore nel Recupero della Tabella ${options.nameTable}</title>
<style>
body {
font - family: Arial, sans-serif;
background-color: #f7f7f7;
color: #333;
padding: 20px;
}
.error-container {
background - color: #ffe6e6;
border: 1px solid #ff4d4d;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
max-width: 800px;
margin: auto;
}
.error-title {
font - size: 24px;
font-weight: bold;
color: #d8000c;
margin-bottom: 10px;
}
.error-message {
font - size: 16px;
white-space: pre-wrap;
background: #fff;
padding: 10px;
border: 1px solid #ddd;
border-radius: 3px;
}
</style>
</head>
<body>
<div class="error-container">
<div class="error-title">Errore nel Recupero della Tabella ${options.nameTable} con query: ${options.where}</div>
<div class="error-message">
${error.response.data.error || error.stack || error.message}
</div>
</div>
</body>
`;
}
return output;
// throw new Error("Errore nel recupero della tabella.");
}
};
// Endpoint per mostrare i dati della tabella
exports.viewTable = async (req, res) => {
try {
const options = req.body.options;
const tableContent = await getTableContent(options);
let out = {};
if (options.outhtml) {
out = `
<h2>Tabella: ${options.nameTable}</h2>
${tableContent}
`
} else {
out = tableContent;
}
return res.send({ code: server_constants.RIS_CODE_OK, data: out });
} catch (error) {
console.error('Error: ', error);
return res.send({ code: server_constants.RIS_CODE_ERR, error });
}
};
// Endpoint per mostrare i dati della tabella
exports.queryTable = async (req, res) => {
try {
const options = req.body.options;
const tableContent = await getTableContent(options);
let out = {};
if (options.outhtml) {
out = `
<h2>Tabella: ${options.nameTable}</h2>
${tableContent}
`
} else {
out = tableContent;
}
return res.send({ code: server_constants.RIS_CODE_OK, data: out });
} catch (error) {
console.error('Error: ', error);
return res.send({ code: server_constants.RIS_CODE_ERR, error });
}
};

View File

@@ -313,6 +313,84 @@ module.exports.replaceProductImgToImageFile = async function (abilitaserver) {
};
/**
* @typedef {Object} Article
* @property {bigint} Id
* @property {number} IdArticolo
* @property {string} Ean13
* @property {string} Titolo
* @property {string} ListaAutori
* @property {string} ListaArgomenti
* @property {number} IdStatoProdotto
* @property {number} PrezzoIvato
* @property {number} IdMarchioEditoriale
* @property {number} IdCollana
* @property {Date} DataPubblicazione
* @property {number} IdTipologia
* @property {number} IdTipoFormato
* @property {string} Misure
* @property {string} Pagine
* @property {string} Sottotitolo
* @property {string} Durata
* @property {string} Numero
* @property {string} Edizione
* @property {string} Ristampa
* @property {Date} DataInizioCampagna
* @property {Date} DataFineCampagna
* @property {number} ScontoCampagna
* @property {number} PrezzoIvatoScontatoCampagna
* @property {Date} DataOra
* @property {boolean} Enabled
* @property {number} IDTagGruppo
* @property {string} Utente
* @property {number} PercIva
* @property {number} IdTitoloOriginale
* @property {boolean} EnabledAlFresco
* @property {number} CodEdizione
* @property {string} FasciaEta
* @property {string} DescrizioneStatoProdotto
* @property {string} DescrizioneTipologia
* @property {string} DescrizioneFormato
* @property {string} DescrizioneCollana
* @property {string} DescrArgomento
* @property {string} AutoriCompleti
* @property {string} CasaEditrice
*/
/**
* Aggiorna il prodotto basandosi su un articolo
* @param {Article} article - Dati dell'articolo da aggiornare
* @param {boolean} creanew
* @returns {Promise<void>}
*/
module.exports.aggiornaProductFromGMArticle = async function (article, creanew) {
const ProductInfo = this;
try {
if (article) {
// cerca se esiste sul db locale
let findrec = this.find({ sku: article.IdArticolo }).lean();
if (findrec) {
// Articolo Trovato !
} else {
// articolo inesistente, lo vuoi creare ?
if (creanew) {
findrec = null;
}
}
if (findrec) {
}
}
} catch (e) {
console.error('Error aggiornaProductFromGMArticle:', err);
}
};
module.exports.correggiProductTypes = async function () {
const ProductInfo = this;
const bulkOps = [];

View File

@@ -241,9 +241,12 @@ sendNotifSchema.statics.getDescrAndLinkByRecNotif = async function (recnotif, us
tag = 'newhosp';
tablerec = 'myhosps';
}
let eventobj = await tools.getAnnuncioForTelegram(recnotif.myrectableorig, tablerec, mydescr, userorig, true);
// newdescr = eventobj.descrperNotif;
recnotif.textcontent_Telegram = eventobj.newdescrtelegram;
if (recnotif.myrectableorig) {
let eventobj = await tools.getAnnuncioForTelegram(recnotif.myrectableorig, tablerec, mydescr, userorig, true);
recnotif.textcontent_Telegram = eventobj.newdescrtelegram;
} else {
recnotif.textcontent_Telegram = newdescr;
}
recnotif.linkaddTelegram = '';
} else if (recnotif.typedir === shared_consts.TypeNotifs.TYPEDIR_EVENTS) {
recnotif.openUrl = shared_consts.getDirectoryByTable(shared_consts.TABLES_MYBACHECAS, true) + myidrec;

View File

@@ -1062,9 +1062,11 @@ router.post('/import', authenticate, async (req, res) => {
if (!recmacro.isbn) {
recmacro.isbn = recrankingisbn.isbn;
}
// Se Pagine non sono state settate
if ((!recmacro.Pagine || recmacro.Pagine === 0) && recrankingisbn.Pagine)
recmacro.Pagine = recrankingisbn.Pagine;
// Se misure non sono state settate
if (!recmacro.misure && recrankingisbn.misure) {
recmacro.misure = recrankingisbn.misure;
}
@@ -1194,12 +1196,12 @@ router.post('/import', authenticate, async (req, res) => {
productInfo.name = productInfo.name.replace(/ - Usato$| - Nuovo$| - Epub$| - Ebook$| - Mobi$| - DVD$| - Streaming$| - Download$/, "");
const recrankingisbn = await ImportaIsbn.findOne({ sku: product.sku }).lean();
let reccateg = null;
if (product.categories) {
// Verifica prima se questa categoria è stata aggiornata !
const recrankingisbn = await ImportaIsbn.findOne({ sku: product.sku }).lean();
if (recrankingisbn && recrankingisbn.DescrArgomento) {
if (tools.isArray(recrankingisbn.ListaArgomenti) && recrankingisbn.ListaArgomenti.length > 1) {
@@ -1346,7 +1348,6 @@ router.post('/import', authenticate, async (req, res) => {
product.active = true;
}
// Update ProductInfo
let risrecInfo = await ProductInfo.findOneAndUpdate({ code: productInfo.code }, { $set: productInfo }, { new: true, upsert: true });
if (risrecInfo) {
@@ -1427,6 +1428,23 @@ router.post('/import', authenticate, async (req, res) => {
variazione.quantita = arrvariazioni[ind].quantita;
}
// *** CONTROLLA SE AGGIORNARE O MENO DETERMINATI CAMPI CHE SONO STATI GIA' SETTATI
if (recrankingisbn) {
if (product.misure !== recrankingisbn.misure && recrankingisbn.misure) {
product.misure = recrankingisbn.misure;
}
if (product.formato !== recrankingisbn.formato && recrankingisbn.formato) {
product.formato = recrankingisbn.formato;
}
if (product.Pagine !== recrankingisbn.Pagine && recrankingisbn.Pagine) {
product.Pagine = recrankingisbn.Pagine;
}
if (product.Edizione !== recrankingisbn.Edizione && recrankingisbn.Edizione) {
product.Edizione = recrankingisbn.Edizione;
}
}
variazione.active = true; // ++ ??
variazione.versione = versione;
variazione.versione = versione;

View File

@@ -0,0 +1,15 @@
const express = require("express");
const { getArticlesSalesHandler, exportArticlesSalesByJSON, viewTable, queryTable } = require("../controllers/articleController");
const { authenticate } = require("../middleware/authenticate");
const router = express.Router();
router.post("/articles-sales", authenticate, getArticlesSalesHandler);
router.post("/export-articles-sales-json", authenticate, exportArticlesSalesByJSON);
router.post("/view-table", authenticate, viewTable);
router.post("/query", authenticate, queryTable);
module.exports = router;

View File

@@ -703,7 +703,7 @@ router.post('/getobj', authenticate_noerror, async (req, res) => {
res.status(200).send({ code: server_constants.RIS_CODE_OK, data: ris });
} catch (e) {
console.error(`ERROR getobj ${cmd}: `, e.message);
console.error(`ERROR getobj`, e.message);
res.status(200).send({ code: server_constants.RIS_CODE_OK, data: [] });
}
});

View File

@@ -938,7 +938,7 @@ module.exports = {
if (user.lastid_newstosent !== id_newstosent.toString()) {
// console.log('@@@@@ COMPARE DIVERSI: lastid', user.lastid_newstosent, 'idsent', id_newstosent.toString());
if (process.env.DEBUG)
if (process.env.VITE_DEBUG)
await tools.snooze(5000);
// Send Email to the User

View File

@@ -142,6 +142,7 @@ myLoad().then(ris => {
const mygoods_router = require('./router/mygoods_router');
const mygen_router = require('./router/mygen_router');
const aitools_router = require('./router/aitools_router');
const article_router = require('./router/articleRoutes');
const { MyEvent } = require('./models/myevent');
@@ -262,6 +263,7 @@ myLoad().then(ris => {
app.use('/mygoods', mygoods_router);
app.use('/mygen', mygen_router);
app.use('/aitools', aitools_router);
app.use('/apisqlsrv', article_router);
mystart();
@@ -302,7 +304,7 @@ async function mystart() {
}
mycron();
if (!process.env.DEBUG) {
if (!process.env.VITE_DEBUG) {
mycron();
}
}
@@ -427,14 +429,14 @@ function testmsgwebpush() {
// Cron every X minutes
cron.schedule('*/1 * * * *', () => {
// console.log('Running Cron Job');
// if (!process.env.DEBUG) {
// if (!process.env.VITE_DEBUG) {
mycron();
// }
});
// Cron every X minutes
cron.schedule('*/60 * * * *', async () => {
if (!process.env.DEBUG) {
if (!process.env.VITE_DEBUG) {
mycron_30min();
}
});

View File

@@ -1653,7 +1653,7 @@ class Telegram {
let risp = '';
const id = msg.chat.id;
let testo = msg.text.toLowerCase().trim();
let testo = msg.text?.toLowerCase()?.trim();
testo = testo.replace('!', '');
testo = testo.replace('?', '');
testo = testo.replace('é', 'è');
@@ -1778,9 +1778,9 @@ class Telegram {
rec.user.index + ']: ' + rec.user.name + ' ' + rec.user.surname +
'\nUsername: ' + rec.user.username + '\n' + 'Email: ' +
rec.user.email + '\nLang: ' + rec.user.lang + tools.ACAPO;
risp += 'Num Invitati: ' + myrec.numinvitati + tools.ACAPO;
risp += 'Num Invitati Attivi: ' + myrec.numinvitatiattivi +
tools.ACAPO;
risp += 'Invitato da ' + rec.user.aportador_solidario + tools.ACAPO;
risp += 'Username Telegram ' + rec.user.profile.username_telegram + tools.ACAPO;
risp += 'Telegram ID ' + rec.user.profile.teleg_id + tools.ACAPO;
} else {
risp = 'Ancora non ti sei Attivato sul BOT';
}
@@ -2838,7 +2838,7 @@ class Telegram {
async setUsernameInvitante(msg) {
try {
let mymsg = msg.text?.toString().trim().toLowerCase();
let mymsg = msg.text?.toString()?.trim().toLowerCase();
let nomeapp = tools.getNomeAppByIdApp(this.idapp);
@@ -3065,7 +3065,7 @@ class Telegram {
texttosend = await this.getNextZoom(msg);
}
const cmd = texttosend.toLowerCase();
const cmd = texttosend?.toLowerCase();
if (usersall) {
if (this.isSelMenu(msg, cmd, 'INDIETRO')) {
@@ -3324,7 +3324,7 @@ class Telegram {
}
const rec = this.getRecInMem(msg);
let testo = msg.text?.toLowerCase().trim();
let testo = msg.text?.toLowerCase()?.trim();
status = this.getstatus(rec);
if (testo === Menu.EXIT_TELEGRAM) {
@@ -3388,7 +3388,7 @@ class Telegram {
rec.chatId = msg.chat.id;
rec.messageId = msg.message_id;
rec.msgall_status = StatusMSGALL.CONFIRM;
const cmd = rec?.msgtosent?.toString().toLowerCase() ?? '';
const cmd = rec?.msgtosent?.toString()?.toLowerCase() ?? '';
let achi = this.getDestinStr(msg, rec.msgall_achi, rec);
let domanda = '';
if (rec.msgall_domanda) {
@@ -3733,7 +3733,7 @@ class Telegram {
for (const recdb of recuser.menuDb) {
if (recdb.active_mem) {
if (recdb.idapp === idapp && recdb.lang === lang &&
recdb.label.toLowerCase() === testo) {
recdb.label?.toLowerCase() === testo) {
if (recdb.type === shared_consts.BOTTYPE_TEXT) {
return recdb.value;
} else if (recdb.type === shared_consts.BOTTYPE_LINK) {
@@ -3774,7 +3774,7 @@ class Telegram {
for (const recdb of recuser.menuDb) {
if (recdb.active_mem) {
if (recdb.idapp === idapp && recdb.lang === lang &&
recdb.label.toLowerCase() === testo) {
recdb.label?.toLowerCase() === testo) {
if (recdb.type === shared_consts.BOTTYPE_MARKDOWN) {
return 'Markdown'
} else {

View File

@@ -5041,11 +5041,14 @@ module.exports = {
descrcontent = '';
}
mystr += `${icon} <strong>${title}</strong>`;
if (acapo) {
mystr += `\n`;
} else {
mystr += `: `;
if (title && icon) {
mystr += `${icon} <strong>${title}</strong>`;
if (acapo) {
mystr += `\n`;
} else {
mystr += `: `;
}
}
if (descrcontent) {
mystr += `${descrcontent}\n`;
@@ -5410,7 +5413,7 @@ module.exports = {
out += `<strong>${myrec.descr}</strong>\n\n`;
if (datastr)
out += this.addRowTelegram('', 'Data Evento', datastr, true, true);
out += this.addRowTelegram('', '', datastr, true, true);
if (cat)
out += this.addRowTelegram('⭐️', 'Categoria', cat, true, true);
@@ -5424,7 +5427,7 @@ module.exports = {
// descrcontent = '<span size="3"><b>Prova Pao</b> Ciaooo</span>';
if (descrcontent)
out += this.addRowTelegram('📝', 'Descrizione ' + newdescr, descrcontent, true, true);
out += this.addRowTelegram('', '', '📝 ' + descrcontent, true, true);
const localita = this.getComuniEProvinceByRec(myrec);

View File

@@ -1181,6 +1181,11 @@ module.exports = {
COMMUNITY_ACCOUNT: 2,
},
CmdQueryMs: {
GET: 0,
SET: 1,
},
// Download, DVD, Epub, Mobi, Nuovo, PDF, Streaming, Usato
};

286
yarn.lock
View File

@@ -492,6 +492,175 @@
"@smithy/types" "^3.7.1"
tslib "^2.6.2"
"@azure/abort-controller@^2.0.0":
version "2.1.2"
resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-2.1.2.tgz#42fe0ccab23841d9905812c58f1082d27784566d"
integrity sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==
dependencies:
tslib "^2.6.2"
"@azure/core-auth@^1.3.0", "@azure/core-auth@^1.4.0", "@azure/core-auth@^1.7.2", "@azure/core-auth@^1.8.0", "@azure/core-auth@^1.9.0":
version "1.9.0"
resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.9.0.tgz#ac725b03fabe3c892371065ee9e2041bee0fd1ac"
integrity sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==
dependencies:
"@azure/abort-controller" "^2.0.0"
"@azure/core-util" "^1.11.0"
tslib "^2.6.2"
"@azure/core-client@^1.3.0", "@azure/core-client@^1.5.0", "@azure/core-client@^1.9.2":
version "1.9.2"
resolved "https://registry.yarnpkg.com/@azure/core-client/-/core-client-1.9.2.tgz#6fc69cee2816883ab6c5cdd653ee4f2ff9774f74"
integrity sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==
dependencies:
"@azure/abort-controller" "^2.0.0"
"@azure/core-auth" "^1.4.0"
"@azure/core-rest-pipeline" "^1.9.1"
"@azure/core-tracing" "^1.0.0"
"@azure/core-util" "^1.6.1"
"@azure/logger" "^1.0.0"
tslib "^2.6.2"
"@azure/core-http-compat@^2.0.1":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@azure/core-http-compat/-/core-http-compat-2.2.0.tgz#20ff535b2460151ea7e68767287996c84cd28738"
integrity sha512-1kW8ZhN0CfbNOG6C688z5uh2yrzALE7dDXHiR9dY4vt+EbhGZQSbjDa5bQd2rf3X2pdWMsXbqbArxUyeNdvtmg==
dependencies:
"@azure/abort-controller" "^2.0.0"
"@azure/core-client" "^1.3.0"
"@azure/core-rest-pipeline" "^1.19.0"
"@azure/core-lro@^2.2.0":
version "2.7.2"
resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-2.7.2.tgz#787105027a20e45c77651a98b01a4d3b01b75a08"
integrity sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==
dependencies:
"@azure/abort-controller" "^2.0.0"
"@azure/core-util" "^1.2.0"
"@azure/logger" "^1.0.0"
tslib "^2.6.2"
"@azure/core-paging@^1.1.1":
version "1.6.2"
resolved "https://registry.yarnpkg.com/@azure/core-paging/-/core-paging-1.6.2.tgz#40d3860dc2df7f291d66350b2cfd9171526433e7"
integrity sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==
dependencies:
tslib "^2.6.2"
"@azure/core-rest-pipeline@^1.17.0", "@azure/core-rest-pipeline@^1.19.0", "@azure/core-rest-pipeline@^1.8.0", "@azure/core-rest-pipeline@^1.8.1", "@azure/core-rest-pipeline@^1.9.1":
version "1.19.0"
resolved "https://registry.yarnpkg.com/@azure/core-rest-pipeline/-/core-rest-pipeline-1.19.0.tgz#4cc60d3f2ee68cf0ef379851b4ed175f7932c8c5"
integrity sha512-bM3308LRyg5g7r3Twprtqww0R/r7+GyVxj4BafcmVPo4WQoGt5JXuaqxHEFjw2o3rvFZcUPiqJMg6WuvEEeVUA==
dependencies:
"@azure/abort-controller" "^2.0.0"
"@azure/core-auth" "^1.8.0"
"@azure/core-tracing" "^1.0.1"
"@azure/core-util" "^1.11.0"
"@azure/logger" "^1.0.0"
http-proxy-agent "^7.0.0"
https-proxy-agent "^7.0.0"
tslib "^2.6.2"
"@azure/core-tracing@^1.0.0", "@azure/core-tracing@^1.0.1":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.2.0.tgz#7be5d53c3522d639cf19042cbcdb19f71bc35ab2"
integrity sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==
dependencies:
tslib "^2.6.2"
"@azure/core-util@^1.0.0", "@azure/core-util@^1.10.0", "@azure/core-util@^1.11.0", "@azure/core-util@^1.2.0", "@azure/core-util@^1.6.1":
version "1.11.0"
resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.11.0.tgz#f530fc67e738aea872fbdd1cc8416e70219fada7"
integrity sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==
dependencies:
"@azure/abort-controller" "^2.0.0"
tslib "^2.6.2"
"@azure/identity@^4.2.1":
version "4.6.0"
resolved "https://registry.yarnpkg.com/@azure/identity/-/identity-4.6.0.tgz#276957b59fed96cf48d5e50fc728c3c226e4f105"
integrity sha512-ANpO1iAvcZmpD4QY7/kaE/P2n66pRXsDp3nMUC6Ow3c9KfXOZF7qMU9VgqPw8m7adP7TVIbVyrCEmD9cth3KQQ==
dependencies:
"@azure/abort-controller" "^2.0.0"
"@azure/core-auth" "^1.9.0"
"@azure/core-client" "^1.9.2"
"@azure/core-rest-pipeline" "^1.17.0"
"@azure/core-tracing" "^1.0.0"
"@azure/core-util" "^1.11.0"
"@azure/logger" "^1.0.0"
"@azure/msal-browser" "^4.0.1"
"@azure/msal-node" "^2.15.0"
events "^3.0.0"
jws "^4.0.0"
open "^8.0.0"
stoppable "^1.1.0"
tslib "^2.2.0"
"@azure/keyvault-common@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@azure/keyvault-common/-/keyvault-common-2.0.0.tgz#91e50df01d9bfa8f55f107bb9cdbc57586b2b2a4"
integrity sha512-wRLVaroQtOqfg60cxkzUkGKrKMsCP6uYXAOomOIysSMyt1/YM0eUn9LqieAWM8DLcU4+07Fio2YGpPeqUbpP9w==
dependencies:
"@azure/abort-controller" "^2.0.0"
"@azure/core-auth" "^1.3.0"
"@azure/core-client" "^1.5.0"
"@azure/core-rest-pipeline" "^1.8.0"
"@azure/core-tracing" "^1.0.0"
"@azure/core-util" "^1.10.0"
"@azure/logger" "^1.1.4"
tslib "^2.2.0"
"@azure/keyvault-keys@^4.4.0":
version "4.9.0"
resolved "https://registry.yarnpkg.com/@azure/keyvault-keys/-/keyvault-keys-4.9.0.tgz#83ad2370429d1f576e6c5c59ff165761e2d8feab"
integrity sha512-ZBP07+K4Pj3kS4TF4XdkqFcspWwBHry3vJSOFM5k5ZABvf7JfiMonvaFk2nBF6xjlEbMpz5PE1g45iTMme0raQ==
dependencies:
"@azure/abort-controller" "^2.0.0"
"@azure/core-auth" "^1.3.0"
"@azure/core-client" "^1.5.0"
"@azure/core-http-compat" "^2.0.1"
"@azure/core-lro" "^2.2.0"
"@azure/core-paging" "^1.1.1"
"@azure/core-rest-pipeline" "^1.8.1"
"@azure/core-tracing" "^1.0.0"
"@azure/core-util" "^1.0.0"
"@azure/keyvault-common" "^2.0.0"
"@azure/logger" "^1.0.0"
tslib "^2.2.0"
"@azure/logger@^1.0.0", "@azure/logger@^1.1.4":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.1.4.tgz#223cbf2b424dfa66478ce9a4f575f59c6f379768"
integrity sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==
dependencies:
tslib "^2.6.2"
"@azure/msal-browser@^4.0.1":
version "4.2.1"
resolved "https://registry.yarnpkg.com/@azure/msal-browser/-/msal-browser-4.2.1.tgz#f8b96035b9ca421c8db2c8da1067a667a64034cd"
integrity sha512-pJX+HNVxEEvxqj3xvnFKMi/Yb6jadwOWN2QkDagj2GV2XXxJg3qq5zkE+czVw6Cmf4QiXxct+J0WF23sE8vZyA==
dependencies:
"@azure/msal-common" "15.1.1"
"@azure/msal-common@14.16.0":
version "14.16.0"
resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-14.16.0.tgz#f3470fcaec788dbe50859952cd499340bda23d7a"
integrity sha512-1KOZj9IpcDSwpNiQNjt0jDYZpQvNZay7QAEi/5DLubay40iGYtLzya/jbjRPLyOTZhEKyL1MzPuw2HqBCjceYA==
"@azure/msal-common@15.1.1":
version "15.1.1"
resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-15.1.1.tgz#2bd9bef17857217f25b5885e7b2824bfd9c8edab"
integrity sha512-bvLWYq9fleAcTJ6H+hfkG91On6vI/UhGyOB7Z6r0Bsa+KTL3zPtigmGCOJgdxrEklOYD88X9SehexLDH/5NRKQ==
"@azure/msal-node@^2.15.0":
version "2.16.2"
resolved "https://registry.yarnpkg.com/@azure/msal-node/-/msal-node-2.16.2.tgz#3eb768d36883ea6f9a939c0b5b467b518e78fffc"
integrity sha512-An7l1hEr0w1HMMh1LU+rtDtqL7/jw74ORlc9Wnh06v7TU/xpG39/Zdr1ZJu3QpjUfKJ+E0/OXMW8DRSWTlh7qQ==
dependencies:
"@azure/msal-common" "14.16.0"
jsonwebtoken "^9.0.0"
uuid "^8.3.0"
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2":
version "7.26.2"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85"
@@ -1068,6 +1237,11 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"
"@js-joda/core@^5.6.1":
version "5.6.4"
resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-5.6.4.tgz#abafce9b30302639bfe4a71bad5120fe39654f10"
integrity sha512-ChdLDTYMEoYoiKZMT90wZMEdGvZ2/QZMnhvjvEqeO5oLoxUfSiLzfe6Lhf3g88+MhZ+utbAu7PAxX1sZkLo5pA==
"@ladjs/country-language@^0.2.1":
version "0.2.1"
resolved "https://registry.yarnpkg.com/@ladjs/country-language/-/country-language-0.2.1.tgz#553f776fa1eb295d0344ed06525a945f94cdafaa"
@@ -1890,6 +2064,13 @@
dependencies:
undici-types "~6.20.0"
"@types/node@>=18":
version "22.13.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.4.tgz#3fe454d77cd4a2d73c214008b3e331bfaaf5038a"
integrity sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==
dependencies:
undici-types "~6.20.0"
"@types/node@^18.11.18":
version "18.19.75"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.75.tgz#be932799d1ab40779ffd16392a2b2300f81b565d"
@@ -1897,6 +2078,14 @@
dependencies:
undici-types "~5.26.4"
"@types/readable-stream@^4.0.0":
version "4.0.18"
resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.18.tgz#5d8d15d26c776500ce573cae580787d149823bfc"
integrity sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==
dependencies:
"@types/node" "*"
safe-buffer "~5.1.1"
"@types/semver-utils@^1.1.1":
version "1.1.3"
resolved "https://registry.yarnpkg.com/@types/semver-utils/-/semver-utils-1.1.3.tgz#f78233e6613e53626844112422845f0f13b573fb"
@@ -2551,6 +2740,16 @@ bl@^4.0.3:
inherits "^2.0.4"
readable-stream "^3.4.0"
bl@^6.0.11:
version "6.0.19"
resolved "https://registry.yarnpkg.com/bl/-/bl-6.0.19.tgz#c4487282bb18768186f02fec6be1be3b5b93677b"
integrity sha512-4Ay3A3oDfGg3GGirhl4s62ebtnk0pJZA5mLp672MPKOQXsWvXjEF4dqdXySjJIs7b9OVr/O8aOo0Lm+xdjo2JA==
dependencies:
"@types/readable-stream" "^4.0.0"
buffer "^6.0.3"
inherits "^2.0.4"
readable-stream "^4.2.0"
bluebird@3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
@@ -2780,6 +2979,14 @@ buffer@^5.5.0, buffer@^5.6.0:
base64-js "^1.3.1"
ieee754 "^1.1.13"
buffer@^6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
dependencies:
base64-js "^1.3.1"
ieee754 "^1.2.1"
busboy@^1.0.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
@@ -3738,6 +3945,11 @@ define-data-property@^1.0.1, define-data-property@^1.1.4:
es-errors "^1.3.0"
gopd "^1.0.1"
define-lazy-prop@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f"
integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==
define-properties@^1.2.0, define-properties@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c"
@@ -4038,7 +4250,7 @@ dot-prop@^6.0.1:
dependencies:
is-obj "^2.0.0"
dotenv@^16.0.2:
dotenv@^16.4.7:
version "16.4.7"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26"
integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==
@@ -4456,6 +4668,11 @@ eventemitter3@^4.0.0:
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
events@^3.0.0, events@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==
execa@^0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50"
@@ -5787,7 +6004,7 @@ http-proxy-agent@^5.0.0:
agent-base "6"
debug "4"
http-proxy-agent@^7.0.2:
http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.2:
version "7.0.2"
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e"
integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==
@@ -5889,14 +6106,14 @@ iconv-lite@0.4.24, iconv-lite@^0.4.4:
dependencies:
safer-buffer ">= 2.1.2 < 3"
iconv-lite@0.6.3, iconv-lite@^0.6.2:
iconv-lite@0.6.3, iconv-lite@^0.6.2, iconv-lite@^0.6.3:
version "0.6.3"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"
integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==
dependencies:
safer-buffer ">= 2.1.2 < 3.0.0"
ieee754@^1.1.13:
ieee754@^1.1.13, ieee754@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
@@ -6186,7 +6403,7 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2:
is-accessor-descriptor "^1.0.1"
is-data-descriptor "^1.0.1"
is-docker@^2.0.0:
is-docker@^2.0.0, is-docker@^2.1.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa"
integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==
@@ -6478,7 +6695,7 @@ is-wsl@^1.1.0:
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==
is-wsl@^2.1.1:
is-wsl@^2.1.1, is-wsl@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==
@@ -7013,6 +7230,11 @@ jpeg-js@^0.2.0:
resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.2.0.tgz#53e448ec9d263e683266467e9442d2c5a2ef5482"
integrity sha512-Ni9PffhJtYtdD7VwxH6V2MnievekGfUefosGCHadog0/jAevRu6HPjYeMHbUemn0IPE8d4wGa8UsOGsX+iKy2g==
js-md4@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/js-md4/-/js-md4-0.3.2.tgz#cd3b3dc045b0c404556c81ddb5756c23e59d7cf5"
integrity sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==
js-stringify@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/js-stringify/-/js-stringify-1.0.2.tgz#1736fddfd9724f28a3682adc6230ae7e4e9679db"
@@ -7146,7 +7368,7 @@ jsonparse@^1.3.1:
resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==
jsonwebtoken@^9.0.1:
jsonwebtoken@^9.0.0, jsonwebtoken@^9.0.1:
version "9.0.2"
resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3"
integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==
@@ -8307,6 +8529,11 @@ napi-build-utils@^1.0.1:
resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806"
integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==
native-duplexpair@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/native-duplexpair/-/native-duplexpair-1.0.0.tgz#7899078e64bf3c8a3d732601b3d40ff05db58fa0"
integrity sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==
natives@^1.1.3:
version "1.1.6"
resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.6.tgz#a603b4a498ab77173612b9ea1acdec4d980f00bb"
@@ -8829,6 +9056,15 @@ open@7:
is-docker "^2.0.0"
is-wsl "^2.1.1"
open@^8.0.0:
version "8.4.2"
resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9"
integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==
dependencies:
define-lazy-prop "^2.0.0"
is-docker "^2.1.1"
is-wsl "^2.2.0"
openai@^4.83.0:
version "4.83.0"
resolved "https://registry.yarnpkg.com/openai/-/openai-4.83.0.tgz#87edfebecf8a4dc2317269dd704cf0ebd9f11979"
@@ -9854,6 +10090,17 @@ readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.2.2, readable
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
readable-stream@^4.2.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.7.0.tgz#cedbd8a1146c13dfff8dab14068028d58c15ac91"
integrity sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==
dependencies:
abort-controller "^3.0.0"
buffer "^6.0.3"
events "^3.3.0"
process "^0.11.10"
string_decoder "^1.3.0"
readdirp@~3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
@@ -10859,6 +11106,11 @@ stealthy-require@^1.1.1:
resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b"
integrity sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==
stoppable@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/stoppable/-/stoppable-1.1.0.tgz#32da568e83ea488b08e4d7ea2c3bcc9d75015d5b"
integrity sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==
stream-combiner@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.2.2.tgz#aec8cbac177b56b6f4fa479ced8c1912cee52858"
@@ -10969,7 +11221,7 @@ string.prototype.trimstart@^1.0.8:
define-properties "^1.2.1"
es-object-atoms "^1.0.0"
string_decoder@^1.1.1:
string_decoder@^1.1.1, string_decoder@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
@@ -11206,6 +11458,22 @@ tar@^6.1.11, tar@^6.1.2:
mkdirp "^1.0.3"
yallist "^4.0.0"
tedious@^18.6.1:
version "18.6.1"
resolved "https://registry.yarnpkg.com/tedious/-/tedious-18.6.1.tgz#1c4a3f06c891be67a032117e2e25193286d44496"
integrity sha512-9AvErXXQTd6l7TDd5EmM+nxbOGyhnmdbp/8c3pw+tjaiSXW9usME90ET/CRG1LN1Y9tPMtz/p83z4Q97B4DDpw==
dependencies:
"@azure/core-auth" "^1.7.2"
"@azure/identity" "^4.2.1"
"@azure/keyvault-keys" "^4.4.0"
"@js-joda/core" "^5.6.1"
"@types/node" ">=18"
bl "^6.0.11"
iconv-lite "^0.6.3"
js-md4 "^0.3.2"
native-duplexpair "^1.0.0"
sprintf-js "^1.1.3"
test-exclude@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e"
@@ -11758,7 +12026,7 @@ utils-merge@1.0.1:
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==
uuid@8.3.2, uuid@^8.3.2:
uuid@8.3.2, uuid@^8.3.0, uuid@^8.3.2:
version "8.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==