Standalone Spark DSL module for building a unified app-wide Ash.Info.Manifest.
When the same resource appears in multiple domains' typescript_rpc blocks
with different RPC actions, this module ensures all actions are merged into
a single unified spec rather than each domain overwriting the previous one.
Usage
defmodule MyApp.AshTypescriptManifest do
use AshTypescript.Manifest, otp_app: :my_app
endScoped manifests (testing)
When :domains is supplied, the manifest is built from exactly those domains
instead of walking Ash.Info.domains(otp_app). This lets tests build an
inline manifest from a freshly-defined domain without touching global state.
defmodule TestManifest do
use AshTypescript.Manifest,
otp_app: :ash_typescript,
domains: [MyTest.InlineDomain]
endOptions
:domains- Explicit list of domain modules to build the manifest from. When nil, walksAsh.Info.domains(otp_app). The default value isnil.:extensions(list of module that adoptsSpark.Dsl.Extension) - A list of DSL extensions to add to theSpark.Dsl:otp_app(atom/0) - The otp_app to use for any application configurable options:fragments(list ofmodule/0) - Fragments to include in theSpark.Dsl. See the fragments guide for more.
Summary
Functions
Runs every manifest verifier against manifest_module's persisted DSL state.
Convenience wrapper for tests: compiles a one-shot inline manifest module
scoped to domains, then runs all manifest verifiers against it.
Functions
Runs every manifest verifier against manifest_module's persisted DSL state.
Returns :ok when all verifiers pass, or {:error, formatted_message}
aggregating every failure.
Used by tests to drive the same verifier code path that compile-time runs.
Convenience wrapper for tests: compiles a one-shot inline manifest module
scoped to domains, then runs all manifest verifiers against it.
Returns :ok or {:error, formatted_message} — same shape as run_verifiers/1.
The generated module name is deterministic from the domains list (via
:erlang.phash2/1), so repeated calls with the same arguments reuse the same
compiled module instead of triggering a redefinition warning. Each unique
call creates one real AshTypescript.Manifest-using module at runtime —
which means field-selector reads (Spark.Dsl.Extension.get_persisted/3)
resolve against that module's persisted state, exactly like the production
path does.