Home / Function/ validateSupportKind() — astro Function Reference

validateSupportKind() — astro Function Reference

Architecture documentation for the validateSupportKind() function in features-validation.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  594e5c25_43a2_cf6f_9a26_b095b502935e["validateSupportKind()"]
  66c4596f_b3a5_daf2_22c7_dc5b1ad0471c["features-validation.ts"]
  594e5c25_43a2_cf6f_9a26_b095b502935e -->|defined in| 66c4596f_b3a5_daf2_22c7_dc5b1ad0471c
  782abf1b_a9f1_b386_64da_ed1e69f93e5c["validateSupportedFeatures()"]
  782abf1b_a9f1_b386_64da_ed1e69f93e5c -->|calls| 594e5c25_43a2_cf6f_9a26_b095b502935e
  776d02cb_d33f_41c9_de23_3928158b4cd2["unwrapSupportKind()"]
  594e5c25_43a2_cf6f_9a26_b095b502935e -->|calls| 776d02cb_d33f_41c9_de23_3928158b4cd2
  078c9575_73c9_52c3_be82_d9560210ca6e["getSupportMessage()"]
  594e5c25_43a2_cf6f_9a26_b095b502935e -->|calls| 078c9575_73c9_52c3_be82_d9560210ca6e
  600fbf94_63ab_051e_b302_eef1d58df218["getSupportMessageSuppression()"]
  594e5c25_43a2_cf6f_9a26_b095b502935e -->|calls| 600fbf94_63ab_051e_b302_eef1d58df218
  ba9c512e_0aa9_11ba_c951_9d1d2512b2ed["logFeatureSupport()"]
  594e5c25_43a2_cf6f_9a26_b095b502935e -->|calls| ba9c512e_0aa9_11ba_c951_9d1d2512b2ed
  style 594e5c25_43a2_cf6f_9a26_b095b502935e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/integrations/features-validation.ts lines 115–138

function validateSupportKind(
	supportKind: AdapterSupport,
	adapterName: string,
	logger: Logger,
	featureName: string,
	hasCorrectConfig: () => boolean,
): boolean {
	const supportValue = unwrapSupportKind(supportKind);
	const message = getSupportMessage(supportKind);
	const suppress = getSupportMessageSuppression(supportKind);

	if (!supportValue) {
		return false;
	}

	if (supportValue === AdapterFeatureStability.STABLE) {
		return true;
	} else if (hasCorrectConfig()) {
		// If the user has the relevant configuration, but the adapter doesn't support it, warn the user
		logFeatureSupport(adapterName, logger, featureName, supportValue, message, suppress);
	}

	return false;
}

Domain

Subdomains

Frequently Asked Questions

What does validateSupportKind() do?
validateSupportKind() is a function in the astro codebase, defined in packages/astro/src/integrations/features-validation.ts.
Where is validateSupportKind() defined?
validateSupportKind() is defined in packages/astro/src/integrations/features-validation.ts at line 115.
What does validateSupportKind() call?
validateSupportKind() calls 4 function(s): getSupportMessage, getSupportMessageSuppression, logFeatureSupport, unwrapSupportKind.
What calls validateSupportKind()?
validateSupportKind() is called by 1 function(s): validateSupportedFeatures.

Analyze Your Own Codebase

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

Try Supermodel Free