Mejoras de sesion: estabilizacion, IA, Nexus Yonke y marketplace B2B
Some checks failed
CI / lint-and-test (3.11) (push) Has been cancelled
CI / lint-and-test (3.13) (push) Has been cancelled

- F0 blindaje: Redis/Celery, pg_hba sin trust LAN, secretos a env 600, backups, webhook auth, jobs muertos
- F1 caja: bugs POS, reembolsos al corte, apartados, CFDI, topes de descuento en cotizacion/apartado
- F2/F7 IA de catalogo: autocategorizacion, dedup de SKUs con embeddings, OCR de facturas, descripciones, claves SAT, limpieza de fitment
- F3 IA en el flujo: vision Yonke, preguntas MeLi, venta cruzada, anomalias, sinonimos, busqueda semantica (rerank/embeddings)
- F4/F8 escala y cartera: /metrics+Prometheus+Grafana, pool, score de credito, churn, metricas multi-tenant
- Nexus Yonke (M1-M6): modelo de datos 1-de-1, alta por donador, vitrina publica, MeLi usado, consignacion, garantia por dias, reportes, etiquetas
- Marketplace B2B entre yonkes (catalogo + pedidos cross-tenant)
- Seguridad: auth en /api/admin/* (35 endpoints), alertas por tenant
- Migraciones v4.27/v4.28; timers expire-demos y rollup-metrics
This commit is contained in:
2026-10-12 00:57:31 +00:00
parent f2d4558b80
commit a386ca5b4a
165 changed files with 31313 additions and 2203 deletions

View File

@@ -6,7 +6,7 @@
// The fetch handler normalizes static asset URLs (strips ?v= query strings)
// so templates can use cache-busting query params freely.
const VERSION = 54;
const VERSION = 61;
const CACHE_NAME = 'nexus-pos-v' + VERSION;
const APP_SHELL = [
@@ -104,12 +104,6 @@ self.addEventListener('activate', function (event) {
);
}).then(function () {
return self.clients.claim();
}).then(function () {
return self.clients.matchAll({ type: 'window' }).then(function (clients) {
clients.forEach(function (client) {
client.postMessage({ type: 'SW_UPDATED', cacheName: CACHE_NAME });
});
});
})
);
});
@@ -128,7 +122,9 @@ self.addEventListener('fetch', function (event) {
// catalog.js?v=5 and catalog.js?v=6 share the same cache entry.
var cacheKey = req;
if (/\.(js|css|png|jpg|jpeg|webp|svg|gif|ico|woff|woff2|ttf|eot|json)$/.test(url.pathname)) {
cacheKey = new Request(url.pathname);
// Si el template pide una version ({{?v=N}}), usar la URL completa como clave
// para que un bump de version SI fuerce la descarga del asset nuevo.
cacheKey = url.search ? req : new Request(url.pathname);
}
// Never cache auth endpoints
@@ -142,8 +138,8 @@ self.addEventListener('fetch', function (event) {
return;
}
// Offline cart queue: POST /pos/api/cart/*
if (req.method === 'POST' && url.pathname.indexOf('/pos/api/cart/') !== -1) {
// Offline queue: POST /pos/api/sales (venta offline) y /pos/api/cart/*
if (req.method === 'POST' && (url.pathname.indexOf('/pos/api/cart/') !== -1 || url.pathname === '/pos/api/sales')) {
event.respondWith(
fetch(req.clone()).then(function (response) {
return response;