@produtype/core 0.67.0 → 0.68.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.
|
@@ -173,7 +173,30 @@ async function detectSecurity(ctx) {
|
|
|
173
173
|
* are what HTTP calls this, and a hand-rolled limiter that writes one of them is
|
|
174
174
|
* really limiting something. The package and its binding cover the rest.
|
|
175
175
|
*/
|
|
176
|
-
|
|
176
|
+
/**
|
|
177
|
+
* Issuing the refusal, not receiving one.
|
|
178
|
+
*
|
|
179
|
+
* `\b429\b` matched both directions. nocodb's webhook invoker handles a 429 coming
|
|
180
|
+
* back from somebody else's server — that is this project being throttled, the
|
|
181
|
+
* opposite of this project throttling — and it was one of the lines behind "rate
|
|
182
|
+
* limiting is in place somewhere". Its login has no throttle at all: the global
|
|
183
|
+
* guard is an id extractor, and the rest of the matches are migrations, a SQL
|
|
184
|
+
* client and mock fixtures.
|
|
185
|
+
*
|
|
186
|
+
* `res.status(429)` and `throw new TooManyRequestsError` are a server refusing a
|
|
187
|
+
* caller. `if (response.status === 429)` is a client being refused. HTTP names the
|
|
188
|
+
* number; the direction is in the shape around it.
|
|
189
|
+
*/
|
|
190
|
+
const rateLimitSignals = await (0, textSearch_1.searchInFiles)(ctx.root, source, [
|
|
191
|
+
/\.status\(\s*429/,
|
|
192
|
+
/status(?:Code)?\s*[:=]\s*429/,
|
|
193
|
+
/sendStatus\(\s*429/,
|
|
194
|
+
/throw new \w*TooManyRequests/,
|
|
195
|
+
/abort\(\s*429/,
|
|
196
|
+
/HTTPException\(\s*429/,
|
|
197
|
+
/['"`]Retry-After['"`]\s*[,:]/i,
|
|
198
|
+
/setHeader\(\s*['"`]Retry-After/i,
|
|
199
|
+
], 20);
|
|
177
200
|
const rateLimit = rateLimitDep || rateLimitSignals.length > 0;
|
|
178
201
|
/**
|
|
179
202
|
* 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.68.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": {
|