Discovers RPC-configured resources and builds configuration warnings.
Type discovery and reachability analysis are handled by Ash.Info.Manifest.Generator.Reachability.
This module provides AshTypescript-specific functionality:
get_rpc_resources/1- Gets RPC-configured resources from domainsbuild_rpc_warnings/3- Builds formatted warning message for misconfigured resourcesfind_resources_missing_from_rpc_config/1- Finds resources with extension but not configured
Summary
Functions
Builds a formatted warning message for resources that may be misconfigured.
Discovers embedded resources from RPC resources by scanning reachable resources.
Finds resources with the AshTypescript.Resource extension that are not configured in any typescript_rpc block.
Finds all Ash resources used as struct arguments in RPC actions.
Gets all RPC resources configured in the given OTP application.
Functions
Builds a formatted warning message for resources that may be misconfigured.
The 1-arity version generates its own spec for resource discovery.
The 3-arity version accepts pre-computed resource_lookup and rpc_resources
to avoid redundant spec generation.
Returns a formatted warning string, or nil if no warnings are needed.
Discovers embedded resources from RPC resources by scanning reachable resources.
Parameters
otp_app- The OTP application name
Returns
A list of embedded resource modules referenced by RPC resources.
Finds resources with the AshTypescript.Resource extension that are not configured in any typescript_rpc block.
Parameters
otp_app- The OTP application name
Returns
A list of non-embedded resource modules with the extension but not configured for RPC.
Finds all Ash resources used as struct arguments in RPC actions.
Scans all RPC actions for arguments whose resolved type points to an embedded resource or struct with instance_of pointing to an Ash resource.
Parameters
otp_app- The OTP application name
Returns
A list of unique Ash resource modules used as struct arguments in RPC actions.
Gets all RPC resources configured in the given OTP application.
Parameters
otp_app- The OTP application name
Returns
A list of unique resource modules that are configured as RPC resources in any domain.