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

@quadcore-lib/settings-server

v0.1.0

Published

Configuración del panel/sitio como **key-value** (teléfono, correo, redes, envíos, etc.). Lectura **pública** de los valores marcados `isPublic`; lectura completa y escritura **admin**.

Readme

@quadcore-lib/settings-server

Configuración del panel/sitio como key-value (teléfono, correo, redes, envíos, etc.). Lectura pública de los valores marcados isPublic; lectura completa y escritura admin.

Instalación

npm install @quadcore-lib/settings-server @quadcore-lib/auth-server @quadcore-lib/core-server

Uso

import { QuadcoreSettingsModule } from '@quadcore-lib/settings-server';

@Module({ imports: [/* TypeOrm + Auth */ QuadcoreSettingsModule.forRoot()] })
export class AppModule {}

Endpoints

| Método | Ruta | Acceso | Descripción | |---|---|---|---| | GET | /settings/public | público | Mapa { key: valor } solo de settings isPublic (ej. contact.phone, contact.email). | | GET | /settings | admin | Lista completa. | | GET | /settings/:key | admin | Un setting. | | PUT | /settings/:key | admin | Upsert. Body: value, type? (string\|number\|boolean\|json), isPublic?, label?. | | DELETE | /settings/:key | admin | Eliminar. |

Entidad SettingEntity (tabla settings)

key (PK), value (string serializado), type, isPublic, label?, createdAt, updatedAt. El helper parseSettingValue convierte value al tipo declarado.

Ejemplo

PUT /settings/contact.phone   { "value": "+54 11 1234-5678", "isPublic": true, "label": "WhatsApp" }
PUT /settings/contact.email   { "value": "[email protected]", "isPublic": true }
GET /settings/public          ->  { "contact.phone": "+54 11 1234-5678", "contact.email": "[email protected]" }

Migraciones

Este paquete trae sus migraciones de TypeORM en dist/src/migrations/*.js (se compilan junto al resto). Ver la guía completa (setup del DataSource, cómo combinarlas con las de otros paquetes, synchronize en dev vs. prod) en el README de @quadcore-lib/core-server, sección "Migraciones de DB".

siteConfig — keys estándar

Set de keys estándar que consumen checkout/frontend, todas expuestas por GET /settings/public:

| Key | Type | isPublic | Label | |---|---|---|---| | contact.whatsapp | string | true | WhatsApp de contacto | | shipping.cost | number | true | Costo de envío | | shipping.freeThreshold | number | true | Envío gratis a partir de | | contact.email | string | true | Email de contacto | | store.name | string | true | Nombre de la tienda | | store.logoUrl | string | true | URL del logo |

Seed

src/seed/site-config.seed.ts exporta SITE_CONFIG_KEYS (el array de arriba, shape { key, value, type, isPublic, label }) y seedSiteConfig(settingsService), que hace upsert idempotente: si la key ya existe, no la pisa (respeta valores cargados por un admin); si no existe, la crea con el value default (vacío/0) y isPublic: true. Se invoca una vez al bootstrapear la app (ej. en un script de arranque o migration runner del backend consumidor), pasándole la instancia de SettingsService.

Lectura tipada in-process

getPublicSiteConfig(settingsService) desenvuelve getPublicMap() en un objeto tipado (PublicSiteConfig): { contactWhatsapp, shippingCost, shippingFreeThreshold, contactEmail, storeName, storeLogoUrl }. Útil para consumir siteConfig desde otro service del mismo proceso sin pasar por HTTP.