@devlas/dte-sii 2.9.3 → 2.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CafSolicitor.js +12 -0
- package/package.json +1 -1
package/CafSolicitor.js
CHANGED
|
@@ -504,6 +504,18 @@ class CafSolicitor {
|
|
|
504
504
|
|
|
505
505
|
return response;
|
|
506
506
|
}
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Cierra todas las sesiones SII en caché haciendo logout en el portal.
|
|
510
|
+
* Llamar durante el shutdown del proceso para no dejar sesiones huérfanas
|
|
511
|
+
* que acumulen el límite de sesiones concurrentes del SII.
|
|
512
|
+
*/
|
|
513
|
+
static async closeAllSessions() {
|
|
514
|
+
for (const [key, session] of _sessionRegistry) {
|
|
515
|
+
try { await session.logout() } catch (_e) { /* ignorar errores de red al apagar */ }
|
|
516
|
+
_sessionRegistry.delete(key)
|
|
517
|
+
}
|
|
518
|
+
}
|
|
507
519
|
}
|
|
508
520
|
|
|
509
521
|
module.exports = CafSolicitor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devlas/dte-sii",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.4",
|
|
4
4
|
"description": "Facturación y boletas electrónicas para el SII de Chile. Genera, timbra, firma y envía DTEs, libros electrónicos y automatiza la certificación.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "dte-sii.d.ts",
|