Skip to content

Commit 9644b52

Browse files
committed
feat(api): publish the validation, http-protect and net references — Wave 5
Closes the Hardening & validation group, the fourth Tier 2 section on /api/ and the last unblocked wave. All three packages were doc-blocked and released first, so the generator had real prose to copy: 101 new pages, every one of them yielding a summary. validation@1.1.0 7 pages 1 root + 6 symbols + 0 members http-protect@3.0.1 39 pages 1 root + 6 symbols + 32 members net@3.0.2 55 pages 1 root + 34 symbols + 20 members sitemap-api.xml 274 -> 323, which is exactly the 3 roots plus 46 symbols; the 52 member pages carry sitemap: false and stay index, follow per the W0-12 decision. All 14 packages now report 100% summary coverage. 18 nav files / 525 entries / 0 duplicates — +3 files and +46 entries, matching the new symbol pages one for one. Three more Pages Functions, 14 in total. Every figure above was pre-measured against a local build before each release, so generation confirmed rather than discovered — the practice Wave 4 recommended, now used for a whole wave. The one number that moved was validation's page count, 6 to 7, because exporting Ctor gave it a page. net is the first package here that could never be generated at all. The Buffer failure was recorded as fixed by Wave 0's `types: ['node']`; it was not, and the claim survived five waves because it had been verified against core and rpc, neither of which references Buffer. The real fix was four imports in net itself. http-protect is the first package to ship through the collision-suffix stripper: its exported Response collides with the global Response from @types/node, so api-extractor named it Response_2 and, without 197898c, six pages would have shipped under a name the package does not export. Verified on the built page — title, breadcrumb and sidebar all read Response, and the sentence that used to lose its words to an unresolvable {@link} is intact. Blurbs rewritten for net and http-protect, which api-packages.js asks for when a wave ships: "Fast binary network address checker" and "HTTP DDoS protection middleware" both described the packages more narrowly than what the references now document. validation's was already accurate and is unchanged. Also refreshes src/org/api/index.md's dateModified, stale because the collapsible groups landed in 49f4c90 after pageDates.json was last generated. Worth distinguishing from the §8 gap: this instance is the fixable kind, since the page file itself changed. The structural one still stands — this wave also added a whole group to that page through api-packages.js, which no regeneration can date. All four checks pass; 1,598 pages crawled with 0 broken links.
1 parent 49f4c90 commit 9644b52

112 files changed

Lines changed: 7015 additions & 6 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// GENERATED by scripts/build-api-docs.js — do not edit by hand.
2+
// Cloudflare Pages Function — /api/http-protect/*
3+
// Resolves retired @imqueue/http-protect version URLs onto the kept version trees.
4+
// See lib/api-redirects.js for the policy and why this is not in _redirects.
5+
import { handleApiRequest } from "../../../lib/api-handler.js";
6+
7+
export const onRequest = handleApiRequest;

functions/api/net/[[path]].js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// GENERATED by scripts/build-api-docs.js — do not edit by hand.
2+
// Cloudflare Pages Function — /api/net/*
3+
// Resolves retired @imqueue/net version URLs onto the kept version trees.
4+
// See lib/api-redirects.js for the policy and why this is not in _redirects.
5+
import { handleApiRequest } from "../../../lib/api-handler.js";
6+
7+
export const onRequest = handleApiRequest;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// GENERATED by scripts/build-api-docs.js — do not edit by hand.
2+
// Cloudflare Pages Function — /api/validation/*
3+
// Resolves retired @imqueue/validation version URLs onto the kept version trees.
4+
// See lib/api-redirects.js for the policy and why this is not in _redirects.
5+
import { handleApiRequest } from "../../../lib/api-handler.js";
6+
7+
export const onRequest = handleApiRequest;

lib/api-renames.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// Keys and values are <pkg>/<version-segment>/<page-basename>, i.e. the /api/
1010
// path with no leading or trailing slash.
1111
export const RENAMED_API_PAGES = new Map([
12+
["http-protect/latest/http-protect.response_2", "http-protect/latest/http-protect.response"], // Interface
1213
["pg-cache/latest/pg-cache.classdecorator_2", "pg-cache/latest/pg-cache.classdecorator"], // TypeAlias
1314
["pg-cache/latest/pg-cache.methoddecorator_2", "pg-cache/latest/pg-cache.methoddecorator"], // TypeAlias
1415
]);

lib/api-versions.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ export const API_VERSIONS = {
1414
"dd-trace": { "latest": "3.1.0", "archives": [] },
1515
"graphql-dependency": { "latest": "3.1.0", "archives": [] },
1616
"type-graphql-dependency": { "latest": "3.0.3", "archives": [] },
17+
"net": { "latest": "3.0.2", "archives": [] },
18+
"http-protect": { "latest": "3.0.1", "archives": [] },
19+
"validation": { "latest": "1.1.0", "archives": [] },
1720
"job": { "latest": "3.0.3", "archives": [] }
1821
};

scripts/lib/api-packages.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,21 +225,23 @@ const PACKAGES = [
225225
tier: 2,
226226
group: 'Hardening & validation',
227227
tags: [],
228-
blurb: 'Fast binary network address checker with IPv4 and IPv6 support.',
228+
blurb: 'CIDR membership testing for IPv4 and IPv6 — sorted binary ranges '
229+
+ 'searched in O(log n) rather than one comparison per network.',
229230
cliId: 'net',
230231
latestOnly: true,
231-
status: 'planned',
232+
status: 'shipped',
232233
wave: 5,
233234
},
234235
{
235236
name: 'http-protect',
236237
tier: 2,
237238
group: 'Hardening & validation',
238239
tags: [],
239-
blurb: 'HTTP DDoS protection middleware.',
240+
blurb: 'Per-IP rate limiting and banning for express-like servers, backed by '
241+
+ 'Redis so every process sees one view of a client.',
240242
cliId: 'http-protect',
241243
latestOnly: true,
242-
status: 'planned',
244+
status: 'shipped',
243245
wave: 5,
244246
},
245247
{
@@ -250,7 +252,7 @@ const PACKAGES = [
250252
blurb: 'Zod-backed field- and method-level validation via native (TC39) decorators.',
251253
cliId: null,
252254
latestOnly: true,
253-
status: 'planned',
255+
status: 'shipped',
254256
wave: 5,
255257
},
256258

src/_data/apiVersions.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@
4545
"latest": "3.0.3",
4646
"archives": []
4747
},
48+
"net": {
49+
"latest": "3.0.2",
50+
"archives": []
51+
},
52+
"http-protect": {
53+
"latest": "3.0.1",
54+
"archives": []
55+
},
56+
"validation": {
57+
"latest": "1.1.0",
58+
"archives": []
59+
},
4860
"job": {
4961
"latest": "3.0.3",
5062
"archives": []

src/_data/pageDates.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"src/org/api/index.md": {
3131
"published": "2026-07-19T22:58:50+02:00",
32-
"modified": "2026-07-31T21:35:26+02:00"
32+
"modified": "2026-08-01T09:07:05+02:00"
3333
},
3434
"src/org/blog/authors.html": {
3535
"published": "2026-07-22T04:09:43+02:00",
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: "HttpProtect.(constructor) · @imqueue/http-protect"
3+
description: "Resolves every threshold, parses the exempt networks and connects to Redis."
4+
apiCrumbs: [{"name":"API reference","url":"/api/"},{"name":"@imqueue/http-protect","url":"/api/http-protect/latest/"},{"name":"HttpProtect","url":"/api/http-protect/latest/http-protect.httpprotect/"},{"name":"(constructor)","url":"/api/http-protect/latest/http-protect.httpprotect._constructor_/"}]
5+
sitemap: false
6+
---
7+
8+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
9+
10+
# HttpProtect.(constructor)
11+
12+
Resolves every threshold, parses the exempt networks and connects to Redis.
13+
14+
**Signature:**
15+
16+
```typescript
17+
constructor(options?: HttpProtectOptions | undefined);
18+
```
19+
20+
## Parameters
21+
22+
<table><thead><tr><th>
23+
24+
Parameter
25+
26+
27+
</th><th>
28+
29+
Type
30+
31+
32+
</th><th>
33+
34+
Description
35+
36+
37+
</th></tr></thead>
38+
<tbody><tr><td>
39+
40+
options
41+
42+
43+
</td><td>
44+
45+
[HttpProtectOptions](/api/http-protect/latest/http-protect.httpprotectoptions/) \| undefined
46+
47+
48+
</td><td>
49+
50+
_(Optional)_ configuration; every field is optional, and omitting the object entirely gives default thresholds against `localhost:6379`
51+
52+
53+
</td></tr>
54+
</tbody></table>
55+
56+
## Exceptions
57+
58+
TypeError if any [HttpProtectOptions.safeNetworks](/api/http-protect/latest/http-protect.httpprotectoptions.safenetworks/) entry is not valid CIDR — including a bare address with no prefix length.
59+
60+
## Remarks
61+
62+
Connects immediately unless [HttpProtectOptions.redis](/api/http-protect/latest/http-protect.httpprotectoptions.redis/) is supplied, so this is not a cheap object to build in a process that has no Redis.
63+
64+
## Example
65+
66+
67+
```typescript
68+
const protect = new HttpProtect({
69+
redis: existingClient,
70+
ttl: 60,
71+
maxRequests: 600,
72+
banLimit: 10000,
73+
safeNetworks: ['10.0.0.0/8', '203.0.113.7/32'],
74+
});
75+
```
76+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: "HttpProtect.banLimit property · @imqueue/http-protect"
3+
description: "The resolved ban threshold, from HttpProtectOptions.banLimit, HTTP_PROTECT_BAN_LIMIT, or 1000."
4+
apiCrumbs: [{"name":"API reference","url":"/api/"},{"name":"@imqueue/http-protect","url":"/api/http-protect/latest/"},{"name":"HttpProtect","url":"/api/http-protect/latest/http-protect.httpprotect/"},{"name":"banLimit","url":"/api/http-protect/latest/http-protect.httpprotect.banlimit/"}]
5+
sitemap: false
6+
---
7+
8+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
9+
10+
# HttpProtect.banLimit property
11+
12+
The resolved ban threshold, from [HttpProtectOptions.banLimit](/api/http-protect/latest/http-protect.httpprotectoptions.banlimit/)<!-- -->, `HTTP_PROTECT_BAN_LIMIT`<!-- -->, or 1000.
13+
14+
**Signature:**
15+
16+
```typescript
17+
readonly banLimit: number;
18+
```

0 commit comments

Comments
 (0)