Home / File/ placeholder.png.ts — astro Source File

placeholder.png.ts — astro Source File

Architecture documentation for placeholder.png.ts, a typescript file in the astro codebase. 2 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  525cffe2_df41_1948_cd7c_959695780304["placeholder.png.ts"]
  e16a223b_37f3_6b25_1ee1_2b7bcb9d9415["node:fs"]
  525cffe2_df41_1948_cd7c_959695780304 --> e16a223b_37f3_6b25_1ee1_2b7bcb9d9415
  f16d8c76_2866_6150_bd14_0347b59abfe9["astro"]
  525cffe2_df41_1948_cd7c_959695780304 --> f16d8c76_2866_6150_bd14_0347b59abfe9
  style 525cffe2_df41_1948_cd7c_959695780304 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { promises as fs } from 'node:fs';

import type { APIRoute } from 'astro';

export const GET: APIRoute = async function get(ctx) {
	try {
		// Image is in the public domain. Sourced from
		// https://en.wikipedia.org/wiki/File:Portrait_placeholder.png
		const buffer = await fs.readFile('./test/fixtures/non-html-pages/src/images/placeholder.png');
		// NOTE: SSG only so not Content-Type needed
		return new Response(buffer.buffer);
	} catch (error: unknown) {
		throw new Error(`Something went wrong in placeholder.png route!: ${error as string}`);
	}
};

Subdomains

Functions

Dependencies

  • astro
  • node:fs

Frequently Asked Questions

What does placeholder.png.ts do?
placeholder.png.ts is a source file in the astro codebase, written in typescript. It belongs to the IntegrationAdapters domain, SsrAdapters subdomain.
What functions are defined in placeholder.png.ts?
placeholder.png.ts defines 1 function(s): GET.
What does placeholder.png.ts depend on?
placeholder.png.ts imports 2 module(s): astro, node:fs.
Where is placeholder.png.ts in the architecture?
placeholder.png.ts is located at packages/astro/test/fixtures/non-html-pages/src/pages/placeholder.png.ts (domain: IntegrationAdapters, subdomain: SsrAdapters, directory: packages/astro/test/fixtures/non-html-pages/src/pages).

Analyze Your Own Codebase

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

Try Supermodel Free