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

@waslpay/cli

v3.0.15

Published

Interactive WaslPay integration generator.

Downloads

1,998

Readme

WaslPay CLI

Mode sans clés API

npx @waslpay/cli init --language node --framework express --providers wave --mock
waslpay dev

La commande génère WAVE_API_KEY=mock_wave_key, WAVE_WEBHOOK_SECRET=mock_wave_webhook et WAVE_BASE_URL=http://localhost:4004/mock/wave. En production, remplacez les clés et supprimez uniquement la ligne WAVE_BASE_URL.

La CLI WaslPay génère une base d'intégration, contrôle la configuration locale et fournit un simulateur de webhooks de développement.

Pour le détail des providers, des variables d'environnement et des SDK, consultez le README principal.

Installation

Exécutez la CLI sans installation globale :

npx @waslpay/cli init

Commandes

init

Lance un assistant qui sélectionne le langage, le framework et les providers, puis génère .env.waslpay.example et un fichier d'intégration.

Sortie simplifiée : l'interface interactive réelle utilise des indicateurs supplémentaires.

$ npx @waslpay/cli init
Welcome to WaslPay SDK Generator 🌍

? Langage backend cible ? Node.js (TypeScript)
? Framework utilisé ? Express
? Providers à activer ? Wave Sénégal, MTN MoMo

WaslPay files generated
Review .env.waslpay.example, add your credentials locally, then wire the selected provider into your application.
(Note for Laravel & Symfony: copy or merge .env.waslpay.example into your project's .env file)

init non interactif

Pour un script CI ou une installation automatisée, fournissez les trois options ensemble : --language, --framework et --providers. Les valeurs admises sont node, php, python ; les frameworks compatibles avec le langage ; et orange-money, wave, mtn-momo pour les providers (séparés par des virgules).

npx @waslpay/cli init --language node --framework express --providers wave,mtn-momo

Cette commande s'exécute silencieusement avec le code de sortie 0. Lors de l'exécution réelle, elle a créé les fichiers suivants :

.env.waslpay.example
waslpay-integration.ts

Les trois flags sont requis ensemble. Sans flag, la CLI lance l'assistant interactif classique ; si une partie seulement des flags est fournie, elle renvoie une erreur au lieu de demander les valeurs manquantes.

Exemple réel de valeur provider invalide (code de sortie 1) :

npx @waslpay/cli init --language node --framework express --providers wave,fake-provider
Error: Invalid --providers value: fake-provider. Expected one of: orange-money, wave, mtn-momo.

dev

Démarre un checkout local et émet des webhooks HMAC vers votre application.

npx @waslpay/cli dev --port 4004 --target http://localhost:8000/api/webhooks/waslpay
WaslPay dev server listening on http://localhost:4004
Webhook target: http://localhost:8000/api/webhooks/waslpay
Webhook HMAC secret: whsec_dev_12345

doctor

Lit .env.local ou .env, détecte les providers configurés et signale les clés manquantes.

npx @waslpay/cli doctor
WaslPay doctor
[✓] Node.js v20.19.2 (v20+ requis)
[✓] .env trouvé

Wave
[✓] WAVE_API_KEY
[✗] WAVE_WEBHOOK_SECRET manquant

Configuration WaslPay incomplète.

trigger <event>

Forge un webhook normalisé, le signe avec HMAC-SHA256 et l’envoie à la cible. Les événements acceptés suivent le format <provider>.payment.<success|failed> (ex: wave.payment.success, orange.payment.success, mtn.payment.failed).

Le code retour HTTP et le temps d'exécution dépendent de la cible réelle ; les valeurs ci-dessous sont des sorties observées, pas des valeurs fixes.

Exemple avec une route indisponible :

npx @waslpay/cli trigger wave.payment.success --target http://localhost:8000/api/webhooks/waslpay
[404 Not Found] wave.payment.success envoyé à http://localhost:8000/api/webhooks/waslpay en 95 ms

Exemple avec un receveur HTTP local qui répond 200 OK :

npx @waslpay/cli trigger wave.payment.success --target http://127.0.0.1:18001/api/webhooks/waslpay
[200 OK] wave.payment.success envoyé à http://127.0.0.1:18001/api/webhooks/waslpay en 43 ms