limitforge 8.0.0 → 8.0.1
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.md +12 -9
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# LimitForge
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/limitforge)
|
|
4
|
-
[](https://github.com/Anivesh91/LimitForge/actions)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
[](https://nodejs.org)
|
|
7
7
|
|
|
@@ -78,16 +78,16 @@ app.post(
|
|
|
78
78
|
// 4. Native Prometheus Scrape Endpoint (Zero External Dependencies)
|
|
79
79
|
app.get('/metrics', createPrometheusExporter());
|
|
80
80
|
|
|
81
|
-
app.listen(3000, () => console.log('
|
|
81
|
+
app.listen(3000, () => console.log('LimitForge listening on http://localhost:3000'));
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
Start Redis before running this example. Once the server is running, stopping Redis demonstrates the configured fallback behavior; start it again to observe recovery.
|
|
85
85
|
|
|
86
86
|
---
|
|
87
87
|
|
|
88
|
-
## What's New in
|
|
88
|
+
## What's New in LimitForge v7 (Observability & Performance)
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
LimitForge v7 answers the core production question: **"What is LimitForge doing in production, and how can developers observe its health and performance?"**
|
|
91
91
|
|
|
92
92
|
* **Zero-Dependency Native Prometheus Exposition (`/metrics`)**:
|
|
93
93
|
- Exposes metrics adhering strictly to the Prometheus text exposition format (v0.0.4) without requiring `prom-client` or any third-party runtime package.
|
|
@@ -110,9 +110,9 @@ RateShield v7 answers the core production question: **"What is RateShield doing
|
|
|
110
110
|
|
|
111
111
|
---
|
|
112
112
|
|
|
113
|
-
## What's New in
|
|
113
|
+
## What's New in LimitForge v6
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
LimitForge v6 solves the most critical operational failure mode of distributed rate limiting: **What happens when Redis or the central store becomes unavailable, slow, or network-partitioned?**
|
|
116
116
|
|
|
117
117
|
* **Store Timeout Guard (`timeoutMs`, `withTimeout`, `StoreTimeoutError`)**:
|
|
118
118
|
- Enforces bounded operation latency on all store calls.
|
|
@@ -146,7 +146,7 @@ RateShield v6 solves the most critical operational failure mode of distributed r
|
|
|
146
146
|
|
|
147
147
|
```mermaid
|
|
148
148
|
flowchart TD
|
|
149
|
-
Req([Incoming HTTP Request]) --> Limiter[
|
|
149
|
+
Req([Incoming HTTP Request]) --> Limiter[LimitForge Middleware]
|
|
150
150
|
Limiter --> BreakerCheck{Circuit Breaker State?}
|
|
151
151
|
|
|
152
152
|
BreakerCheck -->|"CLOSED (Normal)"| RunPrimary[Call primaryStore with timeoutMs Guard]
|
|
@@ -272,7 +272,7 @@ docker-compose -f examples/observability-stack/docker-compose.yml up -d
|
|
|
272
272
|
node examples/observability-stack/simulate-traffic.js
|
|
273
273
|
```
|
|
274
274
|
Automated end-to-end observability stack featuring:
|
|
275
|
-
- **
|
|
275
|
+
- **LimitForge Express App**: `http://localhost:3000` with ResilientStore and `/metrics`.
|
|
276
276
|
- **Prometheus Scraper**: `http://localhost:9090` evaluating production alerting rules.
|
|
277
277
|
- **Grafana Dashboard**: `http://localhost:3001` (admin / admin) with live throughput, block rate, latency, and breaker state.
|
|
278
278
|
- **Live Chaos Injection**: Real-time store failure (`POST /api/chaos/break-store`), degraded memory fallback, circuit tripping, and canary probe recovery (`POST /api/chaos/heal-store`).
|
|
@@ -438,7 +438,7 @@ npm test
|
|
|
438
438
|
- **ResilientStore Outage Observability**: Automatically increments `smartrate_store_errors_total{store="redis"}` and records span exceptions when primary store operations fail or time out during fallback.
|
|
439
439
|
- **OpenTelemetry Standard Semantic Conventions**: Enriches spans with `ratelimit.allowed`, `ratelimit.remaining`, `ratelimit.reset`, `ratelimit.algorithm`, `ratelimit.store`, and `ratelimit.degraded`. Creates child spans via `startSpan('smartrate.consume')` when tracer is configured.
|
|
440
440
|
- **Production Grafana & Prometheus Assets**: Full Alertmanager rules (`assets/alerts/prometheus-rules.yml`) and pre-built Grafana dashboard (`assets/dashboards/smartrate-grafana-dashboard.json`).
|
|
441
|
-
- **Production Observability Stack**: Complete Docker Compose setup with Prometheus, Grafana, Redis, and
|
|
441
|
+
- **Production Observability Stack**: Complete Docker Compose setup with Prometheus, Grafana, Redis, and LimitForge, paired with an automated multi-stage traffic simulator (`examples/observability-stack/`).
|
|
442
442
|
- **Security & Identity Hardening**: Defensive clamping of client identifiers to 256 characters (`MAX_IDENTIFIER_LENGTH = 256`) and optional cryptographic SHA-256 hashing (`hashClientIdentifier: true`) to mask raw API tokens in Redis storage.
|
|
443
443
|
- **Nanosecond Benchmarks**: Realistic, empirical overhead measurement (`npm run benchmark`) using `process.hrtime.bigint()`.
|
|
444
444
|
* **v8.0.0 (Release & Production Hardening)**:
|
|
@@ -450,6 +450,9 @@ npm test
|
|
|
450
450
|
- **Smart Redis-Backed Demo**: Live Express demo auto-detects `REDIS_URL` for distributed rate limiting with graceful fallback to `MemoryStore` and `/api/status` healthcheck.
|
|
451
451
|
- **Deployment Security Hardening**: Bound Redis to `127.0.0.1:6379`, parameterized Grafana admin secrets, and authenticated chaos failure injection endpoints.
|
|
452
452
|
- **GitHub Actions CI/CD Pipeline**: Multi-version test matrix (Node.js 18, 20, 22) with live Redis service container.
|
|
453
|
+
* **v8.0.1 (Repository & Branding Synchronization)**:
|
|
454
|
+
- **Synchronized Repository URLs**: Updated official repository, issues, and homepage metadata to `LimitForge`.
|
|
455
|
+
- **Documentation & Demo Alignment**: Fully unified all examples, observability dashboards, and benchmark banners under the LimitForge identity.
|
|
453
456
|
|
|
454
457
|
---
|
|
455
458
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "limitforge",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "Production-ready distributed rate limiting and resilience middleware for Express.js supporting Redis Lua, Token Bucket, Sliding Window, Circuit Breakers, and Prometheus metrics",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
"license": "MIT",
|
|
60
60
|
"repository": {
|
|
61
61
|
"type": "git",
|
|
62
|
-
"url": "git+https://github.com/Anivesh91/
|
|
62
|
+
"url": "git+https://github.com/Anivesh91/LimitForge.git"
|
|
63
63
|
},
|
|
64
64
|
"bugs": {
|
|
65
|
-
"url": "https://github.com/Anivesh91/
|
|
65
|
+
"url": "https://github.com/Anivesh91/LimitForge/issues"
|
|
66
66
|
},
|
|
67
|
-
"homepage": "https://github.com/Anivesh91/
|
|
67
|
+
"homepage": "https://github.com/Anivesh91/LimitForge#readme",
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"express": "^4.21.2 || ^5.0.0",
|
|
70
70
|
"redis": ">=4.0.0"
|