MCPcopy Create free account
hub / github.com/dyoshikawa/rulesync / validateFileSize

Function validateFileSize

src/lib/fetch.ts:71–77  ·  view source on GitHub ↗

* Validate file size against maximum limit * @throws {GitHubClientError} If file size exceeds limit

(relativePath: string, size: number)

Source from the content-addressed store, hash-verified

69 * @throws {GitHubClientError} If file size exceeds limit
70 */
71function validateFileSize(relativePath: string, size: number): void {
72 if (size > MAX_FILE_SIZE) {
73 throw new GitHubClientError(
74 `File "${relativePath}" exceeds maximum size limit (${(size / 1024 / 1024).toFixed(2)}MB > ${MAX_FILE_SIZE / 1024 / 1024}MB)`,
75 );
76 }
77}
78
79/**
80 * Result of feature conversion

Callers 2

fetchFilesFunction · 0.85
fetchAndConvertToolFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…