@produtype/core 0.66.0 → 0.67.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.
|
@@ -161,7 +161,19 @@ async function detectSecurity(ctx) {
|
|
|
161
161
|
(0, detectContext_1.hasDep)(ctx, 'next-rate-limit') ||
|
|
162
162
|
(0, detectContext_1.hasDep)(ctx, 'django-ratelimit') ||
|
|
163
163
|
(0, detectContext_1.hasDep)(ctx, 'slowapi');
|
|
164
|
-
|
|
164
|
+
/**
|
|
165
|
+
* Throttling by what the protocol says, not by what the variable is called.
|
|
166
|
+
*
|
|
167
|
+
* `/rate_?limit/i` matched `rateLimitEnabled: z.boolean().optional()` — a field in
|
|
168
|
+
* a zod schema for a form where dokploy's *users* configure limits on their own API
|
|
169
|
+
* keys. The application has no limiter and no 429 anywhere in its source, and the
|
|
170
|
+
* report said it was throttled. The word was there; the thing was not.
|
|
171
|
+
*
|
|
172
|
+
* `429`, `Retry-After` and `TooManyRequests` stay because nobody chose them: they
|
|
173
|
+
* are what HTTP calls this, and a hand-rolled limiter that writes one of them is
|
|
174
|
+
* really limiting something. The package and its binding cover the rest.
|
|
175
|
+
*/
|
|
176
|
+
const rateLimitSignals = await (0, textSearch_1.searchInFiles)(ctx.root, source, [/Retry-After/i, /\b429\b/, /TooManyRequests/i], 20);
|
|
165
177
|
const rateLimit = rateLimitDep || rateLimitSignals.length > 0;
|
|
166
178
|
/**
|
|
167
179
|
* Rate limiting where the brute force happens.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@produtype/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.67.0",
|
|
4
4
|
"description": "Deterministic CLI and library that analyzes a web application repository and reports how far it is from production-ready for the kind of product it is meant to be.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|