npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@devlas/transbank-pos

v0.2.0

Published

Cliente del POS Integrado de Transbank para cajas Devlas: protocolo serial, flujo de cobro, cola sin conexion y transportes (Web Serial, Capacitor). Funciona en navegador, Electron y Node.

Readme

@devlas/transbank-pos

Cliente del POS Integrado de Transbank para las cajas Devlas. Una sola implementacion para web (Chrome desktop y Android), Electron y Capacitor Android. Solo cambia el Transporte (como llegan y salen los bytes del puerto).

  • protocolo: tramas <STX>DATOS<ETX>LRC, pedidos y lectura de respuestas. Sin Buffer ni node:crypto: corre en cualquier motor. El mismo modulo lo usa payments-service para validar las tramas crudas que sube la caja.
  • ClientePos: un comando a la vez, ACK/NAK, 3 intentos, tiempos de espera, mensajes intermedios y un evento de traza por cada cosa que pasa. Un comando sin respuesta no lanza: devuelve respuesta: null y el motivo, porque una venta puede haberse cobrado igual.
  • PosSimulado: POS falso que habla el protocolo real, para pruebas y para desarrollar sin el equipo.
  • TransporteWebSerial: Chrome y Edge de escritorio, Chrome en Android (USB) y Electron. 115200 8N1. Requiere HTTPS.
  • TransporteCapacitor: la app Android (Capacitor), con el plugin @devlas/capacitor-usb-serial. El paquete no depende de Capacitor: la app le pasa el plugin.
  • peticionCobro, peticionAnulacion, peticionCierre, peticionTrazas: convierten los resultados en las peticiones de payments-service.
  • ColaSubida: cola sin conexion con orden garantizado y reintento; el Almacen (localStorage, IndexedDB, archivo) lo pone cada plataforma.

Contrato con payments-service

npx tsx scripts/generar-contrato.ts <salida> genera las peticiones de una jornada completa con el POS simulado. payments-service las guarda como fixture (services/payments/src/__fixtures__/cliente-transbank.json) y su prueba de integracion las envia a la API real. Si cambias el cuerpo de una peticion, regenera el fixture y corre esa prueba.

Diseno y API del servidor: devlas-services/docs/transbank/DISENO.md.

Pendiente

Almacen y Enviar de cada plataforma (en el repo del POS), interfaz de usuario, probar con hardware el plugin Android y confirmar con un POS real el formato del mensaje intermedio (0900), el fin del detalle de ventas (0261) y la disposicion de campos. Falta el comando de detalle de ventas y de ultima venta en ClientePos, que dependen de ese ultimo punto.

Desarrollo

npm install
npm test
npm run typecheck
npm run build