Home / File/ hash.ts — astro Source File

hash.ts — astro Source File

Architecture documentation for hash.ts, a typescript file in the astro codebase. 1 imports, 0 dependents.

File typescript CoreAstro RoutingSystem 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  ce2cd5e2_f997_1016_d280_848b3751eed5["hash.ts"]
  349a6247_7703_ff13_e2b6_d319130ff2f9["node:crypto"]
  ce2cd5e2_f997_1016_d280_848b3751eed5 --> 349a6247_7703_ff13_e2b6_d319130ff2f9
  style ce2cd5e2_f997_1016_d280_848b3751eed5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import crypto from 'node:crypto';

export async function POST({ request }: { request: Request }) {
	const hash = crypto.createHash('sha256');

    const iterable = request.body as unknown as AsyncIterable<Uint8Array>;
    for await (const chunk of iterable) {
        hash.update(chunk);
    }

	return new Response(hash.digest(), {
		headers: {
			'Content-Type': 'application/octet-stream'
		}
	});
}

Domain

Subdomains

Functions

Dependencies

  • node:crypto

Frequently Asked Questions

What does hash.ts do?
hash.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RoutingSystem subdomain.
What functions are defined in hash.ts?
hash.ts defines 1 function(s): POST.
What does hash.ts depend on?
hash.ts imports 1 module(s): node:crypto.
Where is hash.ts in the architecture?
hash.ts is located at packages/integrations/node/test/fixtures/api-route/src/pages/hash.ts (domain: CoreAstro, subdomain: RoutingSystem, directory: packages/integrations/node/test/fixtures/api-route/src/pages).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free