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

@cbm-common/general-report-repository

v0.0.1

Published

Repositorio Angular que expone un servicio y modelos para consumir los "general reports" del backend.

Readme

@cbm-common/general-report-repository

Repositorio Angular que expone un servicio y modelos para consumir los "general reports" del backend.

Resumen

La librería ofrece:

  • Tipos y modelos en CbmGeneralReportModel (definidos en src/lib/general-report.model.ts).
  • Interfaz ICbmGeneralReportRepository que describe la API pública.
  • Implementación HTTP CbmGeneralReportService (usa HttpClient y el token de configuración GENERAL_REPORT_MODULE_CONFIG).
  • Wrapper CbmGeneralReportRepository que delega en el servicio y está disponible para inyección.
  • Un módulo CbmGeneralReportModule que expone el token de configuración con la propiedad baseUrl.

Instalación y uso

Durante el desarrollo en este mono-repo las librerías se consumen mediante tsconfig.paths apuntando a dist/. Pasos básicos:

  1. Construir la librería:
ng build general-report-repository
  1. Configurar el módulo en la aplicación (ejemplo):
import { CbmGeneralReportModule } from 'general-report-repository';

providers: [
   CbmGeneralReportModule.forRoot({ baseUrl: `${environment.msReport}/general-report` }),
]

Nota: en el mono-repo los imports locales usan nombres sin scope; si publicas el paquete en npm usa el nombre publicado.

API pública y modelos

Modelos principales (en CbmGeneralReportModel):

  • ListParams / ListResponse — parámetros y respuesta para listados.
  • GetOneResponse — respuesta para obtener un registro concreto.
  • ConfirmResponse — respuesta genérica de confirmación.

Interfaz pública ICbmGeneralReportRepository expone:

  • list(params: ListParams): Observable
  • getOne(id: string): Observable
  • delete(id: string): Observable

CbmGeneralReportService implementa la lógica HTTP y construye las URLs usando config.baseUrl.

Ejemplo de uso (componente)

import { Component, OnInit } from '@angular/core';
import { CbmGeneralReportRepository } from 'general-report-repository';

@Component({ /* ... */ })
export class ReportsComponent implements OnInit {
   constructor(private repo: CbmGeneralReportRepository) {}

   async ngOnInit() {
      this.repo.list({ page: 1, size: 20 }).subscribe(res => console.log(res));
   }

   async remove(id: string) {
      this.repo.delete(id).subscribe(res => console.log(res));
   }
}

Buenas prácticas y notas

  • Usa los tipos exportados por la librería (evitar any).
  • El servicio devuelve Observable de RxJS; maneja errores en la capa consumidora.
  • Si ves "module not found" al importar general-report-repository, ejecuta ng build general-report-repository para generar dist/general-report-repository.

Contribuciones

  1. Fork del repositorio.
  2. Crear una rama con tus cambios.
  3. Ejecutar build/tests:
ng build general-report-repository
ng test
  1. Crear un merge request con la descripción del cambio.

Licencia

Revisa el fichero LICENSE en la raíz del mono-repo.