@mcptoolshop/registry-stats 1.2.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.es.md +150 -90
- package/README.fr.md +150 -128
- package/README.hi.md +150 -90
- package/README.it.md +150 -90
- package/README.ja.md +150 -90
- package/README.md +60 -38
- package/README.pt-BR.md +150 -90
- package/README.zh.md +150 -90
- package/dist/cli.js +2 -70
- package/dist/index.cjs +2 -70
- package/dist/index.d.cts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +2 -70
- package/package.json +2 -2
package/README.fr.md
CHANGED
|
@@ -1,46 +1,80 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="README.md"
|
|
3
|
-
</p>
|
|
4
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="README.ja.md">日本語</a> | <a href="README.zh.md">中文</a> | <a href="README.es.md">Español</a> | <a href="README.md">English</a> | <a href="README.hi.md">हिन्दी</a> | <a href="README.it.md">Italiano</a> | <a href="README.pt-BR.md">Português (BR)</a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
5
|
<p align="center">
|
|
6
6
|
<img src="https://raw.githubusercontent.com/mcp-tool-shop-org/brand/main/logos/registry-stats/readme.png" alt="registry-stats logo" width="400" />
|
|
7
7
|
</p>
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
<p align="center">
|
|
10
|
-
|
|
10
|
+
Five registries. One engine. Dashboard included.
|
|
11
11
|
</p>
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
<p align="center">
|
|
14
14
|
<a href="https://github.com/mcp-tool-shop-org/registry-stats/actions/workflows/pages.yml"><img src="https://github.com/mcp-tool-shop-org/registry-stats/actions/workflows/pages.yml/badge.svg" alt="CI"></a>
|
|
15
15
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"></a>
|
|
16
16
|
<a href="https://www.npmjs.com/package/@mcptoolshop/registry-stats"><img src="https://img.shields.io/npm/v/@mcptoolshop/registry-stats" alt="npm version"></a>
|
|
17
|
+
<a href="https://mcp-tool-shop-org.github.io/registry-stats/dashboard/"><img src="https://img.shields.io/badge/Dashboard-live-green" alt="Dashboard"></a>
|
|
17
18
|
<a href="https://mcp-tool-shop-org.github.io/registry-stats/"><img src="https://img.shields.io/badge/Landing_Page-live-blue" alt="Landing Page"></a>
|
|
18
19
|
</p>
|
|
19
|
-
|
|
20
|
+
|
|
20
21
|
<p align="center">
|
|
21
|
-
<a href="
|
|
22
|
+
<a href="#dashboard">Dashboard</a> ·
|
|
23
|
+
<a href="#desktop-app">Desktop App</a> ·
|
|
22
24
|
<a href="#install">Install</a> ·
|
|
23
25
|
<a href="#cli">CLI</a> ·
|
|
24
|
-
<a href="#config-file">Config</a> ·
|
|
25
26
|
<a href="#programmatic-api">API</a> ·
|
|
26
27
|
<a href="#rest-api-server">REST Server</a> ·
|
|
28
|
+
<a href="#config-file">Config</a> ·
|
|
27
29
|
<a href="#license">License</a>
|
|
28
30
|
</p>
|
|
29
|
-
|
|
31
|
+
|
|
30
32
|
---
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Aucune dépendance. Utilise la fonction native `fetch()`.
|
|
35
|
-
|
|
36
|
-
##
|
|
37
|
-
|
|
33
|
+
|
|
34
|
+
Vous publiez sur npm, PyPI, NuGet, le Marketplace de VS Code et Docker Hub. Actuellement, répondre à la question "comment vont mes paquets ?" nécessite de consulter cinq sites différents. **registry-stats** est une plateforme complète : un moteur TypeScript (CLI + API + serveur REST), un tableau de bord web interactif et une application de bureau Windows native, le tout regroupé dans un seul dépôt.
|
|
35
|
+
|
|
36
|
+
Aucune dépendance d'exécution. Utilise la fonction native `fetch()`. Node 18+.
|
|
37
|
+
|
|
38
|
+
## Contenu
|
|
39
|
+
|
|
40
|
+
| Couche | Fonctionnalités |
|
|
41
|
+
|-------|-------------|
|
|
42
|
+
| **Engine** | Bibliothèque TypeScript + CLI + serveur REST. Interrogez cinq registres avec une seule interface. Publié sur npm sous le nom `@mcptoolshop/registry-stats`. |
|
|
43
|
+
| **Dashboard** | Application web basée sur Astro. Aperçus, indicateurs de croissance, état des données, classement avec des graphiques. Reconstruite chaque semaine par CI. |
|
|
44
|
+
| **Desktop** | Application Windows native utilisant WinUI 3 + WebView2. Inclut le tableau de bord hors ligne et récupère les statistiques en direct à la demande. |
|
|
45
|
+
|
|
46
|
+
## Tableau de bord
|
|
47
|
+
|
|
48
|
+
Un tableau de bord de statistiques qui se met à jour automatiquement est disponible à l'adresse [`/dashboard/`](https://mcp-tool-shop-org.github.io/registry-stats/dashboard/).
|
|
49
|
+
|
|
50
|
+
- **Aperçu** — récit hebdomadaire en une phrase : registre principal, paquet principal, progression la plus importante, répartition des paquets, fiabilité des données.
|
|
51
|
+
- **Indicateurs de croissance** — paquets avec la progression la plus importante, les baisses les plus importantes et les nouveaux paquets actifs (npm sur 7 jours par rapport aux 7 jours précédents).
|
|
52
|
+
- **État des données** — couverture par registre, badges de fiabilité (OK / partiel / manquant), détails des erreurs pouvant être développés.
|
|
53
|
+
- **Évolution des données** — suivi semaine par semaine pour les registres cumulatifs uniquement (Docker, VS Code, NuGet).
|
|
54
|
+
- **Classement** — tous les paquets classés par nombre de téléchargements hebdomadaires, avec des graphiques sur 30 jours pour chaque ligne.
|
|
55
|
+
- **Thème clair/sombre** — suit les préférences du système.
|
|
56
|
+
|
|
57
|
+
Les données sont récupérées au moment de la construction et le tableau de bord est reconstruit chaque semaine par CI (lundi à 06h00 UTC). Configurez les paquets suivis dans `site/src/data/packages.json`.
|
|
58
|
+
|
|
59
|
+
## Application de bureau
|
|
60
|
+
|
|
61
|
+
Une application Windows native qui intègre le tableau de bord dans un environnement WebView2 local :
|
|
62
|
+
|
|
63
|
+
- **Fonctionne hors ligne** — inclut les fichiers HTML/CSS/JS ; fonctionne sans connexion Internet.
|
|
64
|
+
- **Actualisation en direct** — récupère le fichier `stats.json` depuis GitHub Pages à la demande.
|
|
65
|
+
- **Exportation CSV** — exportez les données du classement en un seul clic.
|
|
66
|
+
- **Paquet MSIX** — construit et signé par CI via `desktop-ci.yml`.
|
|
67
|
+
|
|
68
|
+
Le code source de l'application de bureau se trouve dans le répertoire `desktop/`. Développé avec .NET 10 MAUI et ciblant WinUI 3.
|
|
69
|
+
|
|
70
|
+
## Installer
|
|
71
|
+
|
|
38
72
|
```bash
|
|
39
73
|
npm install @mcptoolshop/registry-stats
|
|
40
74
|
```
|
|
41
|
-
|
|
42
|
-
## CLI
|
|
43
|
-
|
|
75
|
+
|
|
76
|
+
## CLI
|
|
77
|
+
|
|
44
78
|
```bash
|
|
45
79
|
# Query a single registry
|
|
46
80
|
registry-stats express -r npm
|
|
@@ -52,10 +86,6 @@ registry-stats express
|
|
|
52
86
|
|
|
53
87
|
# Time series with monthly breakdown + trend
|
|
54
88
|
registry-stats express -r npm --range 2025-01-01:2025-06-30
|
|
55
|
-
# 2025-01 142,359,021
|
|
56
|
-
# 2025-02 147,522,528
|
|
57
|
-
# ...
|
|
58
|
-
# Total: 448,383,383 Avg/day: 4,982,038 Trend: flat (-0.46%)
|
|
59
89
|
|
|
60
90
|
# Raw JSON output
|
|
61
91
|
registry-stats express -r npm --json
|
|
@@ -74,14 +104,6 @@ registry-stats
|
|
|
74
104
|
|
|
75
105
|
# Compare across registries
|
|
76
106
|
registry-stats express --compare
|
|
77
|
-
# express — comparison
|
|
78
|
-
#
|
|
79
|
-
# Metric npm pypi
|
|
80
|
-
# ─────────────────────────────────
|
|
81
|
-
# Total - -
|
|
82
|
-
# Month 283,472 47,201
|
|
83
|
-
# Week 67,367 11,800
|
|
84
|
-
# Day 11,566 1,686
|
|
85
107
|
|
|
86
108
|
# Export as CSV or chart-friendly JSON
|
|
87
109
|
registry-stats express -r npm --range 2025-01-01:2025-06-30 --format csv
|
|
@@ -90,11 +112,11 @@ registry-stats express -r npm --range 2025-01-01:2025-06-30 --format chart
|
|
|
90
112
|
# Start a REST API server
|
|
91
113
|
registry-stats serve --port 3000
|
|
92
114
|
```
|
|
93
|
-
|
|
94
|
-
## Fichier de configuration
|
|
95
|
-
|
|
96
|
-
Créez un fichier `registry-stats.config.json` à la racine de votre projet (ou exécutez la commande `registry-stats --init`) :
|
|
97
|
-
|
|
115
|
+
|
|
116
|
+
## Fichier de configuration
|
|
117
|
+
|
|
118
|
+
Créez un fichier `registry-stats.config.json` à la racine de votre projet (ou exécutez la commande `registry-stats --init`) :
|
|
119
|
+
|
|
98
120
|
```json
|
|
99
121
|
{
|
|
100
122
|
"registries": ["npm", "pypi", "nuget", "vscode", "docker"],
|
|
@@ -113,11 +135,11 @@ Créez un fichier `registry-stats.config.json` à la racine de votre projet (ou
|
|
|
113
135
|
"concurrency": 5
|
|
114
136
|
}
|
|
115
137
|
```
|
|
116
|
-
|
|
117
|
-
Exécutez la commande `registry-stats` sans arguments pour obtenir les statistiques de tous les paquets configurés. L'interface en ligne de commande (CLI) remonte à partir du répertoire de travail actuel (cwd) pour trouver le fichier de configuration le plus proche.
|
|
118
|
-
|
|
119
|
-
La configuration est également accessible par programmation :
|
|
120
|
-
|
|
138
|
+
|
|
139
|
+
Exécutez la commande `registry-stats` sans arguments pour obtenir les statistiques de tous les paquets configurés. L'interface en ligne de commande (CLI) remonte à partir du répertoire de travail actuel (cwd) pour trouver le fichier de configuration le plus proche.
|
|
140
|
+
|
|
141
|
+
La configuration est également accessible par programmation :
|
|
142
|
+
|
|
121
143
|
```typescript
|
|
122
144
|
import { loadConfig, defaultConfig, starterConfig } from '@mcptoolshop/registry-stats';
|
|
123
145
|
|
|
@@ -125,9 +147,9 @@ const config = loadConfig(); // finds nearest config file, or null
|
|
|
125
147
|
const defaults = defaultConfig(); // returns default Config object
|
|
126
148
|
const template = starterConfig(); // returns starter JSON string
|
|
127
149
|
```
|
|
128
|
-
|
|
129
|
-
## API programmable
|
|
130
|
-
|
|
150
|
+
|
|
151
|
+
## API programmable
|
|
152
|
+
|
|
131
153
|
```typescript
|
|
132
154
|
import { stats, calc, createCache } from '@mcptoolshop/registry-stats';
|
|
133
155
|
|
|
@@ -161,7 +183,6 @@ calc.toChartData(daily, 'express'); // { labels: [...], datasets: [{ labe
|
|
|
161
183
|
|
|
162
184
|
// Comparison — same package across registries
|
|
163
185
|
const comparison = await stats.compare('express');
|
|
164
|
-
// → { package: 'express', registries: { npm: {...}, pypi: {...} }, fetchedAt: '...' }
|
|
165
186
|
await stats.compare('express', ['npm', 'pypi']); // specific registries only
|
|
166
187
|
|
|
167
188
|
// Caching (5 min TTL, in-memory)
|
|
@@ -169,80 +190,41 @@ const cache = createCache();
|
|
|
169
190
|
await stats('npm', 'express', { cache }); // fetches
|
|
170
191
|
await stats('npm', 'express', { cache }); // cache hit
|
|
171
192
|
```
|
|
172
|
-
|
|
173
|
-
## Support technique pour les registres
|
|
174
|
-
|
|
175
|
-
| Registre. | Format du paquet. | Séries temporelles. | Données disponibles. |
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
"N'hésitez pas à nous contacter si vous avez des questions."
|
|
195
|
-
"Nous nous engageons à fournir un excellent service."
|
|
196
|
-
"Votre satisfaction est notre priorité." | "Please provide the text you would like me to translate." | "The company is committed to providing high-quality products and services."
|
|
197
|
-
|
|
198
|
-
"We are looking for a motivated and experienced candidate."
|
|
199
|
-
|
|
200
|
-
"The meeting will take place on Tuesday at 2:00 PM."
|
|
201
|
-
|
|
202
|
-
"Please submit your application by the end of the week."
|
|
203
|
-
|
|
204
|
-
"For more information, please contact us."
|
|
205
|
-
----------------
|
|
206
|
-
"L'entreprise s'engage à fournir des produits et services de haute qualité."
|
|
207
|
-
|
|
208
|
-
"Nous recherchons un candidat motivé et expérimenté."
|
|
209
|
-
|
|
210
|
-
"La réunion aura lieu mardi à 14h00."
|
|
211
|
-
|
|
212
|
-
"Veuillez soumettre votre candidature avant la fin de la semaine."
|
|
213
|
-
|
|
214
|
-
"Pour plus d'informations, veuillez nous contacter." |
|
|
215
|
-
| `npm` | `express`, `@scope/pkg` | Oui (549 jours). | dernier jour, dernière semaine, dernier mois. |
|
|
216
|
-
| `pypi` | `requests` | Oui (180 jours). | dernier jour, dernière semaine, dernier mois, total. |
|
|
217
|
-
| `nuget` | `Newtonsoft.Json` | No | total |
|
|
218
|
-
| `vscode` | `publisher.extension` | No | total (installations), évaluation, tendances. |
|
|
219
|
-
| `docker` | `namespace/repo` | No | total (nombre de tirages), étoiles. |
|
|
220
|
-
|
|
221
|
-
## Fiabilité intégrée
|
|
222
|
-
|
|
223
|
-
- Nouvelle tentative automatique avec un délai exponentiel en cas d'erreurs 429/5xx.
|
|
224
|
-
- Respect des en-têtes "Retry-After".
|
|
225
|
-
- Limitation de la concurrence pour les requêtes groupées.
|
|
226
|
-
- Cache TTL optionnel (extensible – possibilité d'utiliser votre propre backend Redis ou fichier via l'interface "StatsCache").
|
|
227
|
-
|
|
228
|
-
## Serveur d'API REST
|
|
229
|
-
|
|
230
|
-
Fonctionnez en tant que microservice ou intégrez-le à votre propre serveur :
|
|
231
|
-
|
|
193
|
+
|
|
194
|
+
## Support technique pour les registres
|
|
195
|
+
|
|
196
|
+
| Registre. | Format du paquet. | Séries temporelles. | Données disponibles. |
|
|
197
|
+
|----------|---------------|-------------|----------------|
|
|
198
|
+
| `npm` | `express`, `@scope/pkg` | Oui (549 jours). | dernier jour, dernière semaine, dernier mois. |
|
|
199
|
+
| `pypi` | `requests` | Oui (180 jours). | dernier jour, dernière semaine, dernier mois, total. |
|
|
200
|
+
| `nuget` | `Newtonsoft.Json` | No | total |
|
|
201
|
+
| `vscode` | `publisher.extension` | No | total (installations), évaluation, tendances. |
|
|
202
|
+
| `docker` | `namespace/repo` | No | total (nombre de tirages), étoiles. |
|
|
203
|
+
|
|
204
|
+
## Fiabilité intégrée
|
|
205
|
+
|
|
206
|
+
- Nouvelle tentative automatique avec un délai exponentiel en cas d'erreurs 429/5xx.
|
|
207
|
+
- Respect des en-têtes "Retry-After".
|
|
208
|
+
- Limitation de la concurrence pour les requêtes groupées.
|
|
209
|
+
- Cache TTL optionnel (extensible – possibilité d'utiliser votre propre backend Redis ou fichier via l'interface "StatsCache").
|
|
210
|
+
|
|
211
|
+
## Serveur d'API REST
|
|
212
|
+
|
|
213
|
+
Fonctionnez en tant que microservice ou intégrez-le à votre propre serveur :
|
|
214
|
+
|
|
232
215
|
```bash
|
|
233
|
-
# CLI
|
|
234
216
|
registry-stats serve --port 3000
|
|
235
217
|
```
|
|
236
|
-
|
|
218
|
+
|
|
237
219
|
```
|
|
238
220
|
GET /stats/:package # all registries
|
|
239
221
|
GET /stats/:registry/:package # single registry
|
|
240
222
|
GET /compare/:package?registries=npm,pypi
|
|
241
223
|
GET /range/:registry/:package?start=YYYY-MM-DD&end=YYYY-MM-DD&format=json|csv|chart
|
|
242
224
|
```
|
|
243
|
-
|
|
244
|
-
Utilisation par programmation pour les serveurs personnalisés ou les environnements sans serveur :
|
|
245
|
-
|
|
225
|
+
|
|
226
|
+
Utilisation par programmation pour les serveurs personnalisés ou les environnements sans serveur :
|
|
227
|
+
|
|
246
228
|
```typescript
|
|
247
229
|
import { createHandler, serve } from '@mcptoolshop/registry-stats';
|
|
248
230
|
|
|
@@ -254,9 +236,9 @@ import { createServer } from 'node:http';
|
|
|
254
236
|
const handler = createHandler();
|
|
255
237
|
createServer(handler).listen(3000);
|
|
256
238
|
```
|
|
257
|
-
|
|
258
|
-
## Registres personnalisés
|
|
259
|
-
|
|
239
|
+
|
|
240
|
+
## Registres personnalisés
|
|
241
|
+
|
|
260
242
|
```typescript
|
|
261
243
|
import { registerProvider, type RegistryProvider } from '@mcptoolshop/registry-stats';
|
|
262
244
|
|
|
@@ -277,19 +259,59 @@ const cargo: RegistryProvider = {
|
|
|
277
259
|
registerProvider(cargo);
|
|
278
260
|
await stats('cargo', 'serde');
|
|
279
261
|
```
|
|
262
|
+
|
|
263
|
+
## Structure du dépôt
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
registry-stats/
|
|
267
|
+
├── src/ # TypeScript engine (published to npm)
|
|
268
|
+
├── site/ # Astro dashboard + landing page (deployed to GitHub Pages)
|
|
269
|
+
├── desktop/ # WinUI 3 desktop app (.NET 10 MAUI)
|
|
270
|
+
└── test/ # Library tests (vitest)
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Développement
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
# Engine
|
|
277
|
+
npm install && npm run build && npm test
|
|
280
278
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
Les pages de documentation et la page d'accueil se trouvent dans le répertoire `site/`.
|
|
284
|
-
|
|
285
|
-
- Développement : `npm run site:dev`
|
|
286
|
-
- Construction : `npm run site:build`
|
|
287
|
-
- Aperçu : `npm run site:preview`
|
|
288
|
-
|
|
289
|
-
## Licence
|
|
290
|
-
|
|
291
|
-
MIT.
|
|
279
|
+
# Dashboard (dev server)
|
|
280
|
+
npm run site:dev
|
|
292
281
|
|
|
282
|
+
# Dashboard (production build)
|
|
283
|
+
npm run site:build
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Sécurité et portée des données
|
|
287
|
+
|
|
288
|
+
| Aspect | Détail |
|
|
289
|
+
|--------|--------|
|
|
290
|
+
| **Data touched** | Statistiques de téléchargement publiques provenant de npm, PyPI, NuGet, VS Code Marketplace, Docker Hub. Cache en mémoire (facultatif). |
|
|
291
|
+
| **Data NOT touched** | Aucune télémétrie. Aucune analyse. Aucun stockage d'informations d'identification. Aucune donnée utilisateur. Aucune écriture de fichiers. |
|
|
292
|
+
| **Permissions** | Lecture : API publiques des registres via HTTPS. Écriture : uniquement vers la sortie standard/erreur standard. |
|
|
293
|
+
| **Network** | Sorties HTTPS vers les API publiques des registres. Serveur REST localhost facultatif. |
|
|
294
|
+
| **Telemetry** | Aucune donnée collectée ou envoyée. |
|
|
295
|
+
|
|
296
|
+
Consultez le fichier [SECURITY.md](SECURITY.md) pour signaler les vulnérabilités.
|
|
297
|
+
|
|
298
|
+
## Tableau de bord
|
|
299
|
+
|
|
300
|
+
| Catégorie | Score |
|
|
301
|
+
|----------|-------|
|
|
302
|
+
| A. Sécurité | 10 |
|
|
303
|
+
| B. Gestion des erreurs | 10 |
|
|
304
|
+
| C. Documentation pour les administrateurs | 10 |
|
|
305
|
+
| D. Bonnes pratiques de déploiement | 10 |
|
|
306
|
+
| E. Identité (facultatif) | 10 |
|
|
307
|
+
| **Overall** | **50/50** |
|
|
308
|
+
|
|
309
|
+
> Audit complet : [SHIP_GATE.md](SHIP_GATE.md) · [SCORECARD.md](SCORECARD.md)
|
|
310
|
+
|
|
311
|
+
## Licence
|
|
312
|
+
|
|
313
|
+
MIT.
|
|
314
|
+
|
|
293
315
|
---
|
|
294
|
-
|
|
295
|
-
Construit par <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a>.
|
|
316
|
+
|
|
317
|
+
Construit par <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a>.
|