MCPcopy Create free account
hub / github.com/cursor/community-plugins / transform

Function transform

apps/cursor/src/lib/plugins/scan.ts:337–348  ·  view source on GitHub ↗
(chunk: Buffer, _encoding, callback)

Source from the content-addressed store, hash-verified

335 let downloaded = 0;
336 return new Transform({
337 transform(chunk: Buffer, _encoding, callback) {
338 downloaded += chunk.length;
339 if (downloaded > REPO_ARCHIVE_MAX_BYTES) {
340 callback(
341 new UnscannableRepoError(
342 `Repository archive exceeded the ${REPO_ARCHIVE_MAX_BYTES}-byte scan limit.`,
343 ),
344 );
345 return;
346 }
347 callback(null, chunk);
348 },
349 final(callback) {
350 logInfo(tag, "GitHub archive download complete", { downloaded });
351 callback();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected