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

@sincpro/mobile-odoo

v2.4.0

Published

Integración Odoo opcional para el framework Sincpro Mobile: OdooClient, auth, servidor y res.partner reusables

Readme

@sincpro/mobile-odoo

🤖 Agentes de IA: leé AGENTS.md (orientación del ecosistema, patrones) y docs/GOTCHAS.md (trampas conocidas).

Integración Odoo opcional para el framework Sincpro Mobile. Trae el OdooClient, autenticación, servidor y res.partner reusables como un módulo de dominio listo para registrar.

Instalación

npx expo install @sincpro/mobile @sincpro/mobile-ui @sincpro/mobile-odoo

Depende de @sincpro/mobile (core) y @sincpro/mobile-ui (design system).

Uso

Registra el odooModule al instanciar la app:

import { createTheme, defineAppShell } from "@sincpro/mobile";
import { odooModule, OdooProvider } from "@sincpro/mobile-odoo";

export const shell = defineAppShell({
  theme: createTheme({ primary: "#714B67" }),
  domains: [odooModule /* ...tus dominios */],
  providers: [OdooProvider],
});

Pide @sincpro/mobile 2.2 o superior: cada operación del core es un Command de commonBoundedContext y el portal entrega los mensajes de la página a sus handlers (dispatchWebViewMessage), así que el ciclo de impresión corre como Commands, con su span.

API

  • odooModule / OdooModule — módulo de dominio (key ODOO, shared): su boundedContexts() es [odooBoundedContext].
  • odooBoundedContext — sus casos de uso, armado como el backend (infrastructure/dependencies.ts + infrastructure/framework.ts):
    • sesión: CommandLogin, CommandLogout, CommandRestoreSession (await odooBoundedContext.execute(new CommandLogin(user, password)));
    • servidor: CommandSaveServer, CommandServerParams, CommandDeleteServer;
    • un archivo por caso de uso en services/<agregado>/, desglosado en métodos privados que llama su execute; cada uno usa sus dependencias de forma explícita (this.servers.find());
    • CommandForgetOdooUser: el cliente olvida al usuario. Lo ejecuta el event handler OnOdooLoggedOut (entrypoints/queue/) cuando llega OdooLoggedOutEvent.
  • OdooLoggedInEvent (odoo.auth.v3.logged_in, sin contraseña) y OdooLoggedOutEvent (odoo.auth.v2.logged_out, no espera sesión): una app los escucha registrando un caso de uso para el evento (@ticketsBoundedContext.feature([CommandX, OdooLoggedInEvent])) o un event handler (@ticketsBoundedContext.handler([OdooLoggedInEvent])).
  • getOdooClient() — cliente Odoo (JSON-RPC y HTTP). Cada error declara su tipo de falla: UserError → domain, ValidationError → invalid, AccessDenied → unauthenticated, AccessError → permission_denied, MissingError → not_found, otro código JSON-RPC → kindOfJsonRpcCode, HTTP → kindOfHttpStatus, sin red → unavailable (NETWORK_DOWN), timeout o servidor inalcanzable → unavailable. Un CircuitBreaker("odoo") (odooCircuit) deja de llamar 30 s después de cinco llamadas seguidas sin respuesta.
  • OdooProvider / useOdoo() — contexto de Odoo para la UI.
  • EOdooRepository — enum de repositorios.

Credenciales

La contraseña no viaja en ningún evento ni en ninguna línea de log. Sí queda guardada en el teléfono — en odoo_auth (SQLite) y en memoria del cliente — porque el cliente vuelve a iniciar sesión cuando la de Odoo vence (cada 50 s sin uso). Es un riesgo conocido: el stack no usa expo-secure-store, y agregarlo obliga a recompilar las apps; se decide aparte.

Desarrollo

Todo es vía Makefile:

make init           # entorno + dependencias
make format         # auto-fix: eslint --fix + prettier + typecheck
make verify-format  # gate de CI: format + falla si quedó algo (cubre lint + formato + tipos)
make build          # compila a ./dist (tsc + tsc-alias)

Imports internos absolutos (@sincpro/mobile-odoo/...), resueltos a relativo en el build.