Home / Function/ cliServerLogSetup() — astro Function Reference

cliServerLogSetup() — astro Function Reference

Architecture documentation for the cliServerLogSetup() function in test-utils.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  c8ca0177_94cb_19a3_041c_d860410db478["cliServerLogSetup()"]
  0a624eac_945e_c9e8_c9de_3feb9de2dd15["test-utils.js"]
  c8ca0177_94cb_19a3_041c_d860410db478 -->|defined in| 0a624eac_945e_c9e8_c9de_3feb9de2dd15
  059d6180_e8b9_fe3d_9d0c_6c7c63b89996["cli()"]
  c8ca0177_94cb_19a3_041c_d860410db478 -->|calls| 059d6180_e8b9_fe3d_9d0c_6c7c63b89996
  cbc6852f_92c6_77b8_9bb5_323cfbe7e2fe["parseCliDevStart()"]
  c8ca0177_94cb_19a3_041c_d860410db478 -->|calls| cbc6852f_92c6_77b8_9bb5_323cfbe7e2fe
  style c8ca0177_94cb_19a3_041c_d860410db478 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/test/test-utils.js lines 383–392

export async function cliServerLogSetup(flags = [], cmd = 'dev') {
	const { proc } = cli(cmd, ...flags);

	const { messages } = await parseCliDevStart(proc);

	const local = messages.find((msg) => msg.includes('Local'))?.replace(/Local\s*/g, '');
	const network = messages.find((msg) => msg.includes('Network'))?.replace(/Network\s*/g, '');

	return { local, network };
}

Subdomains

Frequently Asked Questions

What does cliServerLogSetup() do?
cliServerLogSetup() is a function in the astro codebase, defined in packages/astro/test/test-utils.js.
Where is cliServerLogSetup() defined?
cliServerLogSetup() is defined in packages/astro/test/test-utils.js at line 383.
What does cliServerLogSetup() call?
cliServerLogSetup() calls 2 function(s): cli, parseCliDevStart.

Analyze Your Own Codebase

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

Try Supermodel Free