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

bm-cleaner

v0.1.0

Published

CLI pour identifier et corriger les dysfonctionnements et irrégularités dans les données BlueMind accessibles via l'API

Readme

bm-cleaner

CLI pour identifier et corriger les dysfonctionnements et irrégularités dans les données BlueMind accessibles via l'API.

Description

bm-cleaner est un outil en ligne de commande pour diagnostiquer et résoudre divers problèmes dans les données BlueMind.
Il permet de :

  • Rechercher des événements de calendrier spécifiques via l'API BlueMind
  • Détecter les notifications fantômes (alarmes orphelines sur événements terminés)
  • Identifier d'autres irrégularités structurelles dans les événements
  • Inspecter en détail les événements et leur structure (complete, changelog)
  • Supprimer ou annuler les événements problématiques de manière sécurisée (backup)
  • Auditer et analyser les données de calendrier via différents endpoints API

Prérequis

  • Node.js >= 20
  • Accès à une instance BlueMind avec clé API

Installation

npm install -g bm-cleaner

Ou en utilisant npx sans installation :

npx bm-cleaner [options]

Configuration

Variables d'environnement

Créer un fichier .env à la racine du projet :

BM_API_KEY=votre_cle_api
BM_INSTANCE_URL=https://bm.example.com
BM_DOMAIN=votre-domaine.com

Options CLI

Les options CLI ont la priorité sur les variables d'environnement :

  • --api-key <key> : Clé API BlueMind
  • --instance-url <url> : URL de base de l'instance BlueMind
  • --domain <domain> : Domaine pour la résolution utilisateur
  • --login <login> : Login de l'utilisateur
  • --email <email> : Email de l'utilisateur

Utilisation

Mode interactif

Lance l'interface interactive avec prompts :

bm-cleaner

Mode batch

Recherche par titre

bm-cleaner \
  --api-key YOUR_KEY \
  --instance-url https://bm.example.com \
  --domain example.com \
  --login john.doe \
  --titre "Réunion hebdomadaire"

Ciblage direct par UID

bm-cleaner \
  --api-key YOUR_KEY \
  --instance-url https://bm.example.com \
  --target-uid 3e2786fc-37ed-4bb6-91db-83dd1be0a2fa \
  --container user.john.doe

Scan complet

Analyse tous les événements d'un calendrier pour détecter des irrégularités sans filtre par titre :

bm-cleaner \
  --api-key YOUR_KEY \
  --instance-url https://bm.example.com \
  --login john.doe \
  --scan-all

Options avancées

  • --json : Sortie JSON pure (utile pour scripting)
  • --md : Sortie Markdown (experimental)
  • --cache : Active le cache des requêtes API (⚠️ données en clair)
  • --clear-cache : Purge le cache avant exécution
  • --request-delay-ms <ms> : Délai entre requêtes API (rate limiting)

Exemples

Inspection en JSON pour traitement automatisé

bm-cleaner --json --login john.doe --titre "Meeting" > results.json

Utilisation avec cache pour tests répétés

# Premier run - peuple le cache
bm-cleaner --cache --login john.doe --titre "Test"

# Runs suivants - utilise le cache (plus rapide)
bm-cleaner --cache --login john.doe --titre "Test"

# Purge du cache
bm-cleaner --clear-cache

Fonctionnalités de diagnostic

Détection de notifications fantômes

L'outil identifie automatiquement les événements répondant aux critères :

  • Status CONFIRMED + récurrence terminée (UNTIL dépassé) + VALARM actif
  • Flip de status vers/depuis CANCELLED dans l'historique

Inspection détaillée

Pour chaque événement, l'outil récupère :

  • Données complètes via /complete (structure, récurrence, alarmes, attendees)
  • Historique des modifications via /_itemchangelog
  • Export ICS pour traçabilité

Actions disponibles

Après l'inspection, l'outil propose les actions suivantes :

  • Backup ICS : Sauvegarde l'événement au format .ics
  • Delete : Suppression définitive de l'événement
  • Cancel : Annulation de l'événement (status CANCELLED)
  • Skip : Passer à l'événement suivant

⚠️ Un backup automatique est créé avant toute modification destructive.

Sécurité

  • Les clés API ne doivent jamais être commitées
  • Le cache stocke les données en clair - utiliser uniquement en environnement sécurisé
  • Les backups sont horodatés et stockés dans ./backups/

Développement

Installation locale

git clone <repository>
cd bm-notif-cleaner
npm install

Exécution en développement

npm start -- [options]

Tests

npm test

Licence

ISC