Home / File/ info.ts — astro Source File

info.ts — astro Source File

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

File typescript CoreAstro RenderingEngine 3 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  30f72813_7d64_af56_dffe_39978e8ee7fa["info.ts"]
  d3861967_b647_84d2_ff48_15013353bd56["../core/logger/core.js"]
  30f72813_7d64_af56_dffe_39978e8ee7fa --> d3861967_b647_84d2_ff48_15013353bd56
  9eb8242b_fdf4_2f0a_cd20_f5365a0c228e["../domain/command.js"]
  30f72813_7d64_af56_dffe_39978e8ee7fa --> 9eb8242b_fdf4_2f0a_cd20_f5365a0c228e
  f458772b_5926_6ea0_4412_a27162311db0["../definitions.js"]
  30f72813_7d64_af56_dffe_39978e8ee7fa --> f458772b_5926_6ea0_4412_a27162311db0
  style 30f72813_7d64_af56_dffe_39978e8ee7fa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { Logger } from '../../../core/logger/core.js';
import { defineCommand } from '../../domain/command.js';
import type { Clipboard, DebugInfoFormatter, DebugInfoProvider } from '../definitions.js';

interface Options {
	debugInfoProvider: DebugInfoProvider;
	getDebugInfoFormatter: (options: { pretty: boolean }) => DebugInfoFormatter;
	logger: Logger;
	clipboard: Clipboard;
}

export const infoCommand = defineCommand({
	help: {
		commandName: 'astro info',
		tables: {
			Flags: [
				['--help (-h)', 'See all available flags.'],
				['--copy', 'Force copy of the output.'],
			],
		},
		description:
			'Reports useful information about your current Astro environment. Useful for providing information when opening an issue.',
	},
	async run({ debugInfoProvider, getDebugInfoFormatter, logger, clipboard }: Options) {
		const debugInfo = await debugInfoProvider.get();
		logger.info('SKIP_FORMAT', getDebugInfoFormatter({ pretty: true }).format(debugInfo));
		await clipboard.copy(getDebugInfoFormatter({ pretty: false }).format(debugInfo));
	},
});

Domain

Subdomains

Types

Dependencies

  • ../core/logger/core.js
  • ../definitions.js
  • ../domain/command.js

Frequently Asked Questions

What does info.ts do?
info.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What functions are defined in info.ts?
info.ts defines 2 function(s): DebugInfoFormatter, infoCommand.run.
What does info.ts depend on?
info.ts imports 3 module(s): ../core/logger/core.js, ../definitions.js, ../domain/command.js.
Where is info.ts in the architecture?
info.ts is located at packages/astro/src/cli/info/core/info.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/cli/info/core).

Analyze Your Own Codebase

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

Try Supermodel Free