Skip to content
This repository was archived by the owner on Apr 28, 2026. It is now read-only.

Commit 18a9e6b

Browse files
committed
fix build errors
1 parent f3d0963 commit 18a9e6b

101 files changed

Lines changed: 1240 additions & 989 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/supported-packages/ajv.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: ajv
2+
title: "ajv"
33
---
44

55
# ajv
@@ -40,11 +40,13 @@ What happens **after** calling this function:
4040

4141
**Condition:** data fails validation against the JSON schema
4242

43-
**Returns:** false (errors are stored in ajv.errors property)
43+
**Returns:**
44+
45+
false (errors are stored in ajv.errors property)
4446

4547
**Required Handling:**
4648

47-
Caller MUST check the return value of validate() and handle the false case. When validate() returns false, ajv.errors contains validation error details. Without checking the return value, invalid data will pass through, leading to data corruption, business logic errors, or security vulnerabilities. Use pattern: if (!ajv.validate(schema, data)) { console.error(ajv.errors); }
49+
Caller MUST check the return value of validate() and handle the false case. When validate() returns false, ajv.errors contains validation error details. Without checking the return value, invalid data will pass through, leading to data corruption, business logic errors, or security vulnerabilities. Use pattern: if (!ajv.validate(schema, data)) console.error(ajv.errors);
4850

4951

5052
📖 [Source](https://ajv.js.org/guide/getting-started.html#basic-data-validation)
@@ -68,11 +70,11 @@ What happens **after** calling this function:
6870

6971
**Condition:** schema is invalid or malformed
7072

71-
**Throws:** `Error (schema compilation error)`
73+
**Throws:** Error (schema compilation error)
7274

7375
**Required Handling:**
7476

75-
Caller MUST wrap compile() in try-catch when working with untrusted schemas. Invalid schemas cause compilation errors that crash the application. Use pattern: try { const validate = ajv.compile(schema); } catch (error) { /* handle */ }
77+
Caller MUST wrap compile() in try-catch when working with untrusted schemas. Invalid schemas cause compilation errors that crash the application. Use pattern: try const validate = ajv.compile(schema); catch (error) /* handle */
7678

7779

7880
📖 [Source](https://ajv.js.org/guide/getting-started.html#basic-data-validation)
@@ -96,11 +98,13 @@ What happens **after** calling this function:
9698

9799
**Condition:** schema is invalid according to meta-schema
98100

99-
**Returns:** false (errors are stored in ajv.errors property)
101+
**Returns:**
102+
103+
false (errors are stored in ajv.errors property)
100104

101105
**Required Handling:**
102106

103-
Caller MUST check the return value to determine if schema is valid. Without checking, invalid schemas may be used, causing unexpected validation behavior. Use pattern: if (!ajv.validateSchema(schema)) { console.error(ajv.errors); }
107+
Caller MUST check the return value to determine if schema is valid. Without checking, invalid schemas may be used, causing unexpected validation behavior. Use pattern: if (!ajv.validateSchema(schema)) console.error(ajv.errors);
104108

105109

106110
📖 [Source](https://ajv.js.org/api.html#validateschema-schema-object-boolean)

docs/supported-packages/anthropic-ai-sdk.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: @anthropic-ai/sdk
2+
title: "@anthropic-ai/sdk"
33
---
44

55
# @anthropic-ai/sdk
@@ -40,7 +40,7 @@ What happens **after** calling this function:
4040

4141
**Condition:** messages.create() called without try-catch or .catch() handler
4242

43-
**Throws:** `APIError with error.status and error.message`
43+
**Throws:** APIError with error.status and error.message
4444

4545
**Required Handling:**
4646

@@ -79,7 +79,7 @@ What happens **after** calling this function:
7979

8080
**Condition:** messages.stream() called without try-catch or .catch() handler
8181

82-
**Throws:** `APIError, can occur mid-stream after initial 200 response`
82+
**Throws:** APIError, can occur mid-stream after initial 200 response
8383

8484
**Required Handling:**
8585

docs/supported-packages/archiver.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: archiver
2+
title: "archiver"
33
---
44

55
# archiver
@@ -40,11 +40,11 @@ What happens **after** calling this function:
4040

4141
**Condition:** archiver instance created without error event handler
4242

43-
**Throws:** `Emits 'error' event that crashes process if not handled`
43+
**Throws:** Emits 'error' event that crashes process if not handled
4444

4545
**Required Handling:**
4646

47-
Caller MUST attach error event handler immediately after creating archiver instance. Without error handler, unhandled 'error' events crash the entire Node.js process. CRITICAL: This is the #1 production bug (70% of codebases). Always add: archive.on('error', (error) => { handle_error(error); })
47+
Caller MUST attach error event handler immediately after creating archiver instance. Without error handler, unhandled 'error' events crash the entire Node.js process. CRITICAL: This is the #1 production bug (70% of codebases). Always add: archive.on('error', (error) = handle_error(error); )
4848

4949

5050
📖 [Source](https://github.com/archiverjs/node-archiver/issues/181)
@@ -53,11 +53,11 @@ Caller MUST attach error event handler immediately after creating archiver insta
5353

5454
**Condition:** archiver instance created without warning event handler
5555

56-
**Throws:** `Emits 'warning' event for non-blocking errors (ENOENT, file access failures)`
56+
**Throws:** Emits 'warning' event for non-blocking errors (ENOENT, file access failures)
5757

5858
**Required Handling:**
5959

60-
Caller MUST attach warning event handler to catch non-blocking errors. Without warning handler, file access errors (ENOENT) go unnoticed, resulting in incomplete archives and silent data loss. CRITICAL: This is production bug #2 (80% of codebases). Always add: archive.on('warning', (err) => { if (err.code !== 'ENOENT') throw err; })
60+
Caller MUST attach warning event handler to catch non-blocking errors. Without warning handler, file access errors (ENOENT) go unnoticed, resulting in incomplete archives and silent data loss. CRITICAL: This is production bug #2 (80% of codebases). Always add: archive.on('warning', (err) = if (err.code !== 'ENOENT') throw err; )
6161

6262

6363
📖 [Source](https://www.npmjs.com/package/archiver)
@@ -66,7 +66,7 @@ Caller MUST attach warning event handler to catch non-blocking errors. Without w
6666

6767
**Condition:** Compression fails during archive creation
6868

69-
**Throws:** `Emits 'error' event with Error object`
69+
**Throws:** Emits 'error' event with Error object
7070

7171
**Required Handling:**
7272

@@ -79,7 +79,7 @@ Caller MUST handle compression errors via error event handler. Common causes: ou
7979

8080
**Condition:** File or directory is missing or inaccessible (ENOENT, EACCES)
8181

82-
**Throws:** `Emits 'warning' event for non-blocking errors like ENOENT`
82+
**Throws:** Emits 'warning' event for non-blocking errors like ENOENT
8383

8484
**Required Handling:**
8585

@@ -92,7 +92,7 @@ Caller MUST handle warning events to detect missing or inaccessible files. Warni
9292

9393
**Condition:** Archive operations performed but finalize() never called
9494

95-
**Throws:** `Process exits silently with code 0 when event loop empties`
95+
**Throws:** Process exits silently with code 0 when event loop empties
9696

9797
**Required Handling:**
9898

@@ -107,31 +107,31 @@ Known gotchas and sharp edges:
107107

108108
**⚠️ WARNING - no-error-handler**
109109

110-
CRITICAL (70% of codebases): No error event handler attached. Any compression error, write failure, or file access error results in an unhandled error that crashes the process. ALWAYS attach error handler BEFORE calling finalize() or appending files: archive.on('error', (err) => { console.error('Archive error:', err); throw err; });
110+
CRITICAL (70% of codebases): No error event handler attached. Any compression error, write failure, or file access error results in an unhandled error that crashes the process. ALWAYS attach error handler BEFORE calling finalize() or appending files: archive.on('error', (err) = console.error('Archive error:', err); throw err; );
111111

112112

113113
📖 [Source](https://github.com/archiverjs/node-archiver/issues/181)
114114

115115
**⚠️ WARNING - no-warning-handler**
116116

117-
CRITICAL (80% of codebases): No warning event handler attached. File access errors (ENOENT) are silently ignored, resulting in incomplete archives. ALWAYS attach warning handler: archive.on('warning', (err) => {
118-
if (err.code === 'ENOENT') { console.warn('File not found:', err); }
119-
else { throw err; }
120-
});
117+
CRITICAL (80% of codebases): No warning event handler attached. File access errors (ENOENT) are silently ignored, resulting in incomplete archives. ALWAYS attach warning handler: archive.on('warning', (err) =
118+
if (err.code === 'ENOENT') console.warn('File not found:', err);
119+
else throw err;
120+
);
121121

122122

123123
📖 [Source](https://www.npmjs.com/package/archiver)
124124

125125
**⚠️ WARNING - read-stream-errors**
126126

127-
COMMON (50% of codebases): Read stream errors when using append() don't automatically trigger archiver error or warning events. MUST attach error handlers to individual read streams: const stream = fs.createReadStream('file.txt'); stream.on('error', (err) => { archive.emit('error', err); }); archive.append(stream, { name: 'file.txt' });
127+
COMMON (50% of codebases): Read stream errors when using append() don't automatically trigger archiver error or warning events. MUST attach error handlers to individual read streams: const stream = fs.createReadStream('file.txt'); stream.on('error', (err) = archive.emit('error', err); ); archive.append(stream, name: 'file.txt' );
128128

129129

130130
📖 [Source](https://github.com/archiverjs/node-archiver/issues/321)
131131

132132
**⚠️ WARNING - incomplete-archives**
133133

134-
COMMON (40% of codebases): Only awaiting finalize() promise without waiting for 'close' event on output stream. With large file counts (100+), finalize() promise resolves before all files are written, resulting in corrupt/incomplete archives. MUST wait for both finalize() AND output stream 'close' event: await archive.finalize(); await new Promise(resolve => output.on('close', resolve));
134+
COMMON (40% of codebases): Only awaiting finalize() promise without waiting for 'close' event on output stream. With large file counts (100+), finalize() promise resolves before all files are written, resulting in corrupt/incomplete archives. MUST wait for both finalize() AND output stream 'close' event: await archive.finalize(); await new Promise(resolve = output.on('close', resolve));
135135

136136

137137
📖 [Source](https://github.com/archiverjs/node-archiver/issues/476)

docs/supported-packages/aws-sdk-client-s3.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: @aws-sdk/client-s3
2+
title: "@aws-sdk/client-s3"
33
---
44

55
# @aws-sdk/client-s3
@@ -40,7 +40,7 @@ What happens **after** calling this function:
4040

4141
**Condition:** s3Client.send() called with object operation commands without try-catch
4242

43-
**Throws:** `NoSuchKey (404), AccessDenied (403), NoSuchBucket (404), network errors`
43+
**Throws:** NoSuchKey (404), AccessDenied (403), NoSuchBucket (404), network errors
4444

4545
**Required Handling:**
4646

@@ -53,7 +53,7 @@ MUST wrap await s3Client.send() in try-catch block when using GetObjectCommand,
5353

5454
**Condition:** s3Client.send() called with multipart commands without try-catch
5555

56-
**Throws:** `NoSuchUpload (404), EntityTooSmall (400), InvalidPart (400)`
56+
**Throws:** NoSuchUpload (404), EntityTooSmall (400), InvalidPart (400)
5757

5858
**Required Handling:**
5959

@@ -66,7 +66,7 @@ MUST wrap multipart upload operations in try-catch block. Catch block MUST call
6666

6767
**Condition:** s3Client.send() called with bucket operations without try-catch
6868

69-
**Throws:** `BucketAlreadyExists (409), BucketNotEmpty (409), NoSuchBucket (404)`
69+
**Throws:** BucketAlreadyExists (409), BucketNotEmpty (409), NoSuchBucket (404)
7070

7171
**Required Handling:**
7272

@@ -79,7 +79,7 @@ MUST wrap bucket operations in try-catch block. Handle BucketAlreadyExists/Bucke
7979

8080
**Condition:** s3Client.send() called with list operations without try-catch
8181

82-
**Throws:** `NoSuchBucket (404), AccessDenied (403), InvalidArgument (400)`
82+
**Throws:** NoSuchBucket (404), AccessDenied (403), InvalidArgument (400)
8383

8484
**Required Handling:**
8585

@@ -109,7 +109,7 @@ What happens **after** calling this function:
109109

110110
**Required Handling:**
111111

112-
CONSIDER configuring retry settings: new S3Client({ region, maxAttempts: 3, retryMode: 'adaptive' }). Adaptive mode adjusts retry attempts based on throttling signals from AWS.
112+
CONSIDER configuring retry settings: new S3Client( region, maxAttempts: 3, retryMode: 'adaptive' ). Adaptive mode adjusts retry attempts based on throttling signals from AWS.
113113

114114

115115
📖 [Source](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/error-handling.html)
@@ -120,7 +120,7 @@ CONSIDER configuring retry settings: new S3Client({ region, maxAttempts: 3, retr
120120

121121
**Required Handling:**
122122

123-
SHOULD explicitly set region: new S3Client({ region: 'us-east-1' }) or use environment variable with fallback.
123+
SHOULD explicitly set region: new S3Client( region: 'us-east-1' ) or use environment variable with fallback.
124124

125125

126126
📖 [Source](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/)

docs/supported-packages/axios-retry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: axios-retry
2+
title: "axios-retry"
33
---
44

55
# axios-retry

docs/supported-packages/azure-storage-blob.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: @azure/storage-blob
2+
title: "@azure/storage-blob"
33
---
44

55
# @azure/storage-blob

docs/supported-packages/bcrypt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: bcrypt
2+
title: "bcrypt"
33
---
44

55
# bcrypt

docs/supported-packages/bcryptjs.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: bcryptjs
2+
title: "bcryptjs"
33
---
44

55
# bcryptjs
@@ -40,7 +40,7 @@ What happens **after** calling this function:
4040

4141
**Condition:** password is not a string or Buffer, or salt is invalid type
4242

43-
**Throws:** `Error: Illegal arguments: [actual_type], [actual_type]`
43+
**Throws:** Error: Illegal arguments: [actual_type], [actual_type]
4444

4545
**Required Handling:**
4646

@@ -53,7 +53,7 @@ Caller MUST wrap bcrypt.hash() in try-catch block or use .catch() handler. Type
5353

5454
**Condition:** salt parameter is not a string, number, or valid salt format
5555

56-
**Throws:** `Error: Invalid salt version or Illegal arguments`
56+
**Throws:** Error: Invalid salt version or Illegal arguments
5757

5858
**Required Handling:**
5959

@@ -64,13 +64,13 @@ Caller MUST handle errors from invalid salt parameter. Use genSalt() to generate
6464

6565
**🔴 ERROR - hash-rounds-out-of-range**
6666

67-
**Condition:** salt rounds < 4 or > 31
67+
**Condition:** salt rounds 4 or 31
6868

69-
**Throws:** `Error: Rounds out of range (4-31)`
69+
**Throws:** Error: Rounds out of range (4-31)
7070

7171
**Required Handling:**
7272

73-
Caller MUST validate salt rounds are between 4 and 31. Production systems should use rounds >= 12 for adequate security.
73+
Caller MUST validate salt rounds are between 4 and 31. Production systems should use rounds = 12 for adequate security.
7474

7575

7676
📖 [Source](https://github.com/kelektiv/node.bcrypt.js/issues/898)
@@ -79,7 +79,7 @@ Caller MUST validate salt rounds are between 4 and 31. Production systems should
7979

8080
**Condition:** internal hashing operation fails
8181

82-
**Throws:** `Error`
82+
**Throws:** Error
8383

8484
**Required Handling:**
8585

@@ -101,7 +101,7 @@ Passwords longer than 72 bytes (UTF-8 encoded) are silently truncated. This is a
101101

102102
**⚠️ WARNING - low-salt-rounds**
103103

104-
Using salt rounds < 12 provides inadequate protection against modern hardware attacks. Recommended minimum is 12 for 2026 (increases over time).
104+
Using salt rounds 12 provides inadequate protection against modern hardware attacks. Recommended minimum is 12 for 2026 (increases over time).
105105

106106

107107
📖 [Source](https://github.com/kelektiv/node.bcrypt.js/issues/437)
@@ -125,7 +125,7 @@ What happens **after** calling this function:
125125

126126
**Condition:** password or hash parameter is not a string
127127

128-
**Throws:** `Error: Illegal arguments: [actual_type], [actual_type]`
128+
**Throws:** Error: Illegal arguments: [actual_type], [actual_type]
129129

130130
**Required Handling:**
131131

@@ -138,11 +138,11 @@ Caller MUST wrap bcrypt.compare() in try-catch or use .catch() handler. Type err
138138

139139
**Condition:** hash parameter is not a valid bcrypt hash format
140140

141-
**Throws:** `Error: Invalid hash provided or hash is not a valid bcrypt hash`
141+
**Throws:** Error: Invalid hash provided or hash is not a valid bcrypt hash
142142

143143
**Required Handling:**
144144

145-
Caller MUST handle errors from malformed hash values. Database corruption, string truncation (VARCHAR < 60), or encoding issues can cause invalid hashes. This is the #1 production authentication bug.
145+
Caller MUST handle errors from malformed hash values. Database corruption, string truncation (VARCHAR 60), or encoding issues can cause invalid hashes. This is the #1 production authentication bug.
146146

147147

148148
📖 [Source](https://github.com/kelektiv/node.bcrypt.js/issues/1037)
@@ -151,7 +151,7 @@ Caller MUST handle errors from malformed hash values. Database corruption, strin
151151

152152
**Condition:** internal comparison operation fails
153153

154-
**Throws:** `Error`
154+
**Throws:** Error
155155

156156
**Required Handling:**
157157

@@ -195,9 +195,9 @@ What happens **after** calling this function:
195195

196196
**🔴 ERROR - gensalt-invalid-rounds**
197197

198-
**Condition:** rounds parameter < 4 or > 31
198+
**Condition:** rounds parameter 4 or 31
199199

200-
**Throws:** `Error: Rounds out of range (4-31)`
200+
**Throws:** Error: Rounds out of range (4-31)
201201

202202
**Required Handling:**
203203

@@ -210,7 +210,7 @@ Caller MUST wrap genSalt() in try-catch or use .catch() handler when rounds para
210210

211211
**Condition:** rounds parameter is not a number
212212

213-
**Throws:** `Error: Illegal arguments: [actual_type]`
213+
**Throws:** Error: Illegal arguments: [actual_type]
214214

215215
**Required Handling:**
216216

@@ -223,7 +223,7 @@ Caller MUST validate rounds is a number. Common error when reading from environm
223223

224224
**Condition:** random number generator fails (browser context without setRandomFallback)
225225

226-
**Throws:** `Error: Secure random number generator not available`
226+
**Throws:** Error: Secure random number generator not available
227227

228228
**Required Handling:**
229229

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "body-parser"
3+
---
4+
5+
# body-parser
6+
7+
Contract documentation coming soon.
8+

0 commit comments

Comments
 (0)