Home / Function/ withTakingALongTimeMsg() — astro Function Reference

withTakingALongTimeMsg() — astro Function Reference

Architecture documentation for the withTakingALongTimeMsg() function in hooks.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  abd6cd08_7e8c_a784_d208_389cab686b34["withTakingALongTimeMsg()"]
  19f4084c_157f_a15d_f001_5d8088b75dee["hooks.ts"]
  abd6cd08_7e8c_a784_d208_389cab686b34 -->|defined in| 19f4084c_157f_a15d_f001_5d8088b75dee
  1e1ca282_3771_2cb3_ede6_ff5ab0d382fa["runHookInternal()"]
  1e1ca282_3771_2cb3_ede6_ff5ab0d382fa -->|calls| abd6cd08_7e8c_a784_d208_389cab686b34
  style abd6cd08_7e8c_a784_d208_389cab686b34 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/integrations/hooks.ts lines 40–71

async function withTakingALongTimeMsg<T>({
	name,
	hookName,
	hookFn,
	logger,
	integrationLogger,
}: {
	name: string;
	hookName: keyof BaseIntegrationHooks;
	hookFn: () => T | Promise<T>;
	logger: Logger;
	integrationLogger: AstroIntegrationLogger;
}): Promise<T> {
	const timeout = setTimeout(() => {
		logger.info(
			'build',
			`Waiting for integration ${colors.bold(JSON.stringify(name))}, hook ${colors.bold(
				JSON.stringify(hookName),
			)}...`,
		);
	}, 3000);
	try {
		return await hookFn();
	} catch (err) {
		integrationLogger.error(
			`An unhandled error occurred while running the ${colors.bold(JSON.stringify(hookName))} hook`,
		);
		throw err;
	} finally {
		clearTimeout(timeout);
	}
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does withTakingALongTimeMsg() do?
withTakingALongTimeMsg() is a function in the astro codebase, defined in packages/astro/src/integrations/hooks.ts.
Where is withTakingALongTimeMsg() defined?
withTakingALongTimeMsg() is defined in packages/astro/src/integrations/hooks.ts at line 40.
What calls withTakingALongTimeMsg()?
withTakingALongTimeMsg() is called by 1 function(s): runHookInternal.

Analyze Your Own Codebase

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

Try Supermodel Free