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

deps-exporter

v1.9.0

Published

Herramienta CLI para generar JSON de dependencias de endpoints en proyectos NestJS, Express o Angular, y opcionalmente persistirlos en Redis.

Readme

deps-exporter

Herramienta CLI para generar JSON de dependencias de endpoints en proyectos NestJS, Express o Angular, y opcionalmente persistirlos en Redis.

Instalación

npm install deps-exporter

Uso

deps-exporter [opciones]

Opciones

| Opción | Descripción | Valor por defecto | Requerido | |------------------------|------------------------------------------------------------------|------------------------|-------------------------------------------| | -f, --framework | Framework: nest | express | angular | express | No | | -p, --pieza | Nombre de la pieza (aplicación o módulo) | Nombre en package.json | No | | -t, --tipo | Tipo de la pieza (p.ej. MS, API) | Inferido del nombre | No | | -c, --cluster | Cluster de la pieza | AWS | No | | -e, --equipo | Equipo o célula responsable | '' | No | | -r, --root | Ruta raíz del proyecto | process.cwd() | No | | -o, --out | Directorio de salida para el JSON (si no se envia no se escribe el archivo)| '' | No | | --funcionalidad | Funcionalidad (solo Angular) | | Sí, si -f angular | | --redis-mode | Modo de Redis: standalone | cluster | | No (pero si usa Redis, sí) | | --redis-host | Host de Redis | | Si usa Redis | | --redis-port | Puerto de Redis | | Si usa Redis | | --redis-pass | Password de Redis | | Si usa Redis | | --redis-db | Base de datos de Redis | | Si usa Redis |

Ejemplos

1. Exportar dependencias de Express a JSON

deps-exporter \
  -f express \
  -r ./mi-proyecto-express \
  -o exports

Genera exports/<nombre-proyecto>.json con la estructura:

{
  "nombre": "mi-proyecto-express",
  "tipo": "MS",
  "cluster": "AWS",
  "celula": "",
  "endpoints": [
    {
      "metodo": "GET",
      "path": "/ruta",
      "dependienteDe": [
        {
          "tipo": "BD",
          "tipoBD": "MYSQL",
          "accion": "LEER",
          "key": "users"
        }
      ]
    }
  ]
}

2. Exportar dependencias de NestJS y persistir en Redis

deps-exporter \
  -f nest \
  -r ./mi-proyecto-nest \
  -o nest-exports \
  --redis-mode standalone \
  --redis-host localhost \
  --redis-port 6379 \
  --redis-db 0
  • Genera nest-exports/<nombre-proyecto>.json.
  • Persiste la pieza en Redis según la configuración.

3. Exportar dependencias de Angular

deps-exporter \
  -f angular \
  -r ./mi-proyecto-angular \
  --funcionalidad auth \
  -o ng-exports

Genera ng-exports/<nombre-paquete>.json con:

{
  "funcionalidad": "auth",
  "cluster": "AWS",
  "endpoints": [
    {
      "pieza": "users",
      "path": "/users",
      "metodo": "GET"
    }
  ]
}

Uso de Decoradores

Express

const express = require('express');
const { expressEndpointDependency } = require('deps-exporter');
const usersController = require('./users.controller');
const app = express();

app.get(
  '/users',
  expressEndpointDependency(
    [
      { tipo: 'BD', tipoBD: 'MYSQL', accion: 'LEER', key: 'users' },
      { tipo: 'HTTP', pieza: 'auth', endpoint: '/login', metodo: 'POST', cluster: 'AWS' }
    ],
    usersController
  )
);

NestJS

import { Controller, Get } from '@nestjs/common';
import { EndpointDependency } from 'deps-exporter';

@Controller('users')
export class UsersController {
  @Get()
  @EndpointDependency([
    { tipo: 'BD', tipoBD: 'MONGO', accion: 'LEER', key: 'users' }
  ])
  findAll() {
    // lógica del endpoint
  }
}

Angular

import { Injectable } from '@angular/core';
import { EndpointDependencies } from 'deps-exporter';

@EndpointDependencies([
  { pieza: 'users', path: '/users', metodo: 'GET' },
  { pieza: 'auth', path: '/login', metodo: 'POST' }
])
@Injectable({ providedIn: 'root' })
export class UserService {
  constructor(private http: HttpClient) {}
  // ...
}

Persistencia en Redis

Para persistir la pieza en Redis, añade las opciones --redis-mode, --redis-host, --redis-port, --redis-pass y --redis-db. El JSON resultante se almacenará bajo la clave <pieza>.

Licencia

MIT