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

aloux-cloud

v1.0.0

Published

Aloux Cloud integrations: AWS S3, SES, SNS and Google BigQuery

Downloads

175

Readme

aloux-cloud

Librería Node.js de integraciones cloud: AWS S3, SES, SNS y Google BigQuery.

Instalación

npm install aloux-cloud

Uso básico

const { s3, ses, sns, bigQuery } = require('aloux-cloud')

await s3.upload('users/123/avatar', file)
await ses.sendCustom('[email protected]', html, 'Bienvenido')
await sns.sendMessagePhone('+521234567890', 'Tu código es: 4821')
await bigQuery.callAppendRows({ name: 'Juan' }, 'usuarios')

Integración con aloux-iam

const iam   = require('aloux-iam')
const cloud = require('aloux-cloud')

iam.init({
  email:     cloud.ses,
  sms:       cloud.sns,
  storage:   cloud.s3,
  analytics: cloud.bigQuery,
})

Variables de entorno

AWS

| Variable | Requerida para | Descripción | |----------|---------------|-------------| | AWS_REGION | S3 · SES · SNS | Región AWS | | AWS_BUCKET | S3 | Nombre del bucket | | AWS_EMAIL_SENDER | SES | Email remitente verificado en SES | | FILE_MAX_SIZE_MB | S3 | Tamaño máximo de archivo en MB. Default: 5 |

Las credenciales AWS_ACCESS_KEY_ID y AWS_SECRET_ACCESS_KEY se toman automáticamente del entorno o de un IAM Role (EC2/ECS).

Google Cloud

| Variable | Descripción | |----------|-------------| | PROJECT_ID | ID del proyecto en Google Cloud | | DATASET_ID | ID del dataset en BigQuery |

También necesitas credenciales de servicio GCP. Configura GOOGLE_APPLICATION_CREDENTIALS apuntando al archivo JSON.

S3 — Almacenamiento

Tipos de archivo permitidos: jpg · jpeg · png · gif · webp · pdf · svg

upload(pathFile, file, contentType?, acl?)

Sube un archivo al bucket. Devuelve la URL.

// pathFile — ruta dentro del bucket (sin extensión)
// file     — objeto de express-fileupload (req.files.archivo)
// acl      — 'private' (default) | 'public-read'

const url = await s3.upload('users/123/avatar', file, 'image/jpeg', 'public-read')
// → "https://mi-bucket.s3.amazonaws.com/users/123/avatar.jpg"

delete(file)

await s3.delete('users/123/avatar.jpg')

deleteMany(files)

await s3.deleteMany([
  { Key: 'products/abc/img1.jpg' },
  { Key: 'products/abc/img2.png' },
])

SES — Email

send(email, url, subject)

Envía un email con un botón de acceso. Útil para bienvenida o restablecimiento de contraseña.

await ses.send(
  '[email protected]',
  'https://tuapp.com/set-password?token=abc123',
  'Establece tu contraseña'
)

sendCustom(email, html, subject)

Envía un email con HTML personalizado.

const html = `<h1>Pedido confirmado</h1><p>Tu pedido #123 está en camino.</p>`

await ses.sendCustom('[email protected]', html, 'Confirmación de pedido')

SNS — SMS

sendMessagePhone(phoneNumber, message)

El número debe estar en formato E.164.

await sns.sendMessagePhone('+521234567890', 'Tu código es: 4821')

| País | Formato | |------|---------| | México | +52XXXXXXXXXX | | Estados Unidos | +1XXXXXXXXXX | | España | +34XXXXXXXXX |

BigQuery

callAppendRows(rows, table)

Inserta una o varias filas en una tabla de BigQuery.

// Una fila
await bigQuery.callAppendRows(
  { name: 'Juan', email: '[email protected]', createdAt: bigQuery.factoryDateTime(Date.now()) },
  'usuarios'
)

// Varias filas
await bigQuery.callAppendRows([
  { name: 'Juan',  email: '[email protected]'  },
  { name: 'María', email: '[email protected]' },
], 'usuarios')

factoryDateTime(dateNumber)

Convierte un timestamp a formato "YYYY-MM-DDTHH:MM:SS" que espera BigQuery.

bigQuery.factoryDateTime(Date.now())
// → "2026-05-28T14:30:00"

Licencia

MIT