Skip to content

@adonia/devtools API

Canonical inventory of every public subpath and TypeScript export in @adonia/devtools.

@adonia/devtools/commands

Export Kind Source Summary
ADONIA_COMMANDS constant packages/devtools/src/commands.ts:34 Every Ace command this package ships, in §3 command-table order.
getCommand function packages/devtools/src/commands.ts:52 Resolve one command class from its metadata; null when unknown.
getMetaData function packages/devtools/src/commands.ts:47 Serialized metadata for every command, as Ace’s kernel expects.

@adonia/devtools/configure

Export Kind Source Summary
configure function packages/devtools/src/configure.ts:47 Configure hook invoked by node ace add @adonia/core / node ace configure @adonia/core.
configureAdoniaApp function packages/devtools/src/install/engine.ts:182 Run TECH_SPEC §3 steps 1–7 against the app at appRoot (absolute path) and return the step 9 report. Requires a tsconfig.json at the app root (every v7 app has one) — the assembler’s code transformer parses the patched TypeScript files through it.
ConfigureAdoniaAppOptions type-only interface packages/devtools/src/install/engine.ts:86 Optional plugin manifests consumed during installation.
DevtoolsPluginManifest type-only interface packages/devtools/src/plugin_manifest.ts:8 Manifest fields consumed by devtools at install and doctor registration time.
pluginMigrationDirectories function packages/devtools/src/plugin_manifest.ts:39 Validate and flatten plugin migration directories in manifest order.
PluginMigrationDirectory type-only interface packages/devtools/src/plugin_manifest.ts:18 One validated migration directory paired with its owning plugin.
registeredPluginMigrationSources function packages/devtools/src/plugin_migration_registry.ts:17 Migration sources registered by the running host application’s panels.
registerPluginDoctorChecks function packages/devtools/src/plugin_manifest.ts:26 Pull and register every doctor check exposed by plugin manifests.
registerPluginMigrationSources function packages/devtools/src/plugin_migration_registry.ts:7 Replace the migration sources discovered from the host’s attached panels.

@adonia/devtools/doctor

Export Kind Source Summary
CheckFinding type-only interface packages/devtools/src/doctor/types.ts:107 A check paired with its verdict.
CheckResult type-only interface packages/devtools/src/doctor/types.ts:27 What one check concluded.
CheckStatus type-only type packages/devtools/src/doctor/types.ts:24 Verdict of a single check.
createDoctorContext function packages/devtools/src/doctor/context.ts:79 Assemble the context for the app rooted at appRoot (an absolute path).
CreateDoctorContextOptions type-only interface packages/devtools/src/doctor/context.ts:67 Optional live services supplied by a booted Ace command.
DevtoolsPluginManifest type-only interface packages/devtools/src/plugin_manifest.ts:8 Manifest fields consumed by devtools at install and doctor registration time.
DOCTOR_CHECKS constant packages/devtools/src/doctor/registry.ts:49 Live, report-ordered view of every registered doctor check.
DoctorCheck type-only interface packages/devtools/src/doctor/types.ts:98 One diagnosis adonia:doctor performs.
DoctorContext type-only interface packages/devtools/src/doctor/types.ts:54 Read-only view of the application under diagnosis.
DoctorDatabaseInspector type-only interface packages/devtools/src/doctor/types.ts:41 Live database state available only when the command runs in a booted app.
DoctorReport type-only interface packages/devtools/src/doctor/types.ts:114 Everything one adonia:doctor run concluded.
NewestFile type-only interface packages/devtools/src/doctor/types.ts:90 Newest file of a directory tree — see DoctorContext.newest.
registerDoctorCheck function packages/devtools/src/doctor/registry.ts:57 Register a plugin-provided doctor check.
registerPluginDoctorChecks function packages/devtools/src/plugin_manifest.ts:26 Pull and register every doctor check exposed by plugin manifests.
renderDoctorReport function packages/devtools/src/doctor/report.ts:28 Render the grouped report as plain lines, ready for the ace logger.
runDoctor function packages/devtools/src/doctor/registry.ts:90 Run the checks against context and aggregate their verdicts.
RunDoctorOptions type-only interface packages/devtools/src/doctor/registry.ts:68 Options accepted by runDoctor.

@adonia/devtools/hooks

Export Kind Source Summary
AdoniaHookRegistryLike type-only interface packages/devtools/src/hooks.ts:149 The hook-registry subset the regen handlers need, typed STRUCTURALLY rather than against @adonisjs/assembler/types: pnpm peer-variant splits give the host app and this package different assembler instances, and the assembler’s hook types are nominal (classes with private fields), so a hook typed against our own instance is not assignable in the host app’s adonisrc.ts without a cast. Structural types are instance-agnostic — the app’s Hooks object satisfies them by shape.
AdoniaInitHook type-only interface packages/devtools/src/hooks.ts:187 The assembler init-hook object shape (DefineHook with an inline run), structurally typed: assignable to the hooks.init element type of ANY host app’s assembler instance. The third contract parameter (indexGenerator) is intentionally unlisted — an unused trailing parameter the hook never receives by name.
AdoniaInitHookParentLike type-only interface packages/devtools/src/hooks.ts:167 The parent-instance subset the hook consumes (assembler DevServer / TestRunner / Bundler), structural for the same reason as AdoniaHookRegistryLike. ui is absent on the Bundler.
buildManifest function packages/devtools/src/codegen/model.ts:263 Builds manifest.json (TECH_SPEC §14). Panels contribute the reverse mapping: a panel’s registry keys are intersected with the resources that actually exist, so a stale registration never invents a slug.
buildResourceTypes function packages/devtools/src/codegen/model.ts:224 Builds the descriptor.d.ts type model (TECH_SPEC §14).
CELL_TS_TYPES constant packages/devtools/src/codegen/type_map.ts:140 Cell registry key → TS type for EXPLICIT table() columns (§8.1), which have no originating field to consult. Derived columns bypass this table and reuse their field’s own type, which is strictly more precise (a select derived to a badge keeps its literal union).
CodegenException class packages/devtools/src/codegen/errors.ts:23 Thrown when resource indexing fails (TECH_SPEC §14, the codegen contract).
CodegenManifest type-only interface packages/devtools/src/codegen/model.ts:120 manifest.json (TECH_SPEC §14) — consumed by adonia:doctor and the docs generator.
ColumnShape type-only interface packages/devtools/src/codegen/protocol.ts:93 One column of an explicit table() declaration (TECH_SPEC §8.1). Read structurally off the column instance (key plus the type getter, or a toDescriptor() result).
EvaluationBatch type-only interface packages/devtools/src/codegen/evaluator.ts:36 Result of one resource batch: extracted shapes and failures, both by file.
FIELD_TS_TYPES constant packages/devtools/src/codegen/type_map.ts:95 The derivation table (TECH_SPEC §7.3 normative type keys, §11.1 value mapping). Keys are field static type values; add one row per new field type. Everything absent falls back to UNKNOWN_TS_TYPE.
FieldShape type-only interface packages/devtools/src/codegen/protocol.ts:52 One field extracted from an evaluated schema tree (TECH_SPEC §7.2).
FieldTsTypeRule type-only type packages/devtools/src/codegen/type_map.ts:36 A row of the derivation table: renders the TS type of a field’s state value, WITHOUT nullability (which formStateType layers on from nullable()/required()).
fieldValueType function packages/devtools/src/codegen/type_map.ts:158 The field’s state value type, before nullability. Unknown static type values resolve to UNKNOWN_TS_TYPE.
formStateType function packages/devtools/src/codegen/type_map.ts:179 Renders a field’s FormState member type: its value type widened with | null when isNullableState holds. unknown already admits null, so it is never widened.
generateResourceRegistry function packages/devtools/src/codegen/generate.ts:266 Scan, evaluate, validate, and emit every §14 artifact.
GenerateResourceRegistryOptions type-only interface packages/devtools/src/codegen/generate.ts:53 Options accepted by generateResourceRegistry.
GenerationResult type-only interface packages/devtools/src/codegen/generate.ts:77 Outcome of a successful generateResourceRegistry call.
INDEX_COLUMN_CAP constant packages/devtools/src/codegen/model.ts:36 Maximum number of derived columns when no field is marked visibleOn('index') — mirrors core’s INDEX_COLUMN_CAP (TECH_SPEC §7.5 “the first N scalar fields”). Duplicated rather than imported: devtools cannot depend on @adonia/core (core depends on devtools). The derives the same columns as core test in codegen_types.spec.ts locks the two together.
indexAdoniaResources function packages/devtools/src/hooks.ts:208 Create the Adonia resource-indexing init hook (TECH_SPEC §14).
IndexAdoniaResourcesOptions type-only interface packages/devtools/src/hooks.ts:106 Options accepted by indexAdoniaResources.
IndexedResource type-only interface packages/devtools/src/codegen/model.ts:42 A resource shape paired with the specifier the registry imports it by.
isNullableState function packages/devtools/src/codegen/type_map.ts:170 Whether a field’s state may hold null.
ManifestPanel type-only interface packages/devtools/src/codegen/model.ts:99 One panels[] entry of manifest.json (TECH_SPEC §5.1).
ManifestResource type-only interface packages/devtools/src/codegen/model.ts:78 One resources[] entry of manifest.json.
ModuleFailure type-only interface packages/devtools/src/codegen/evaluator.ts:28 A module whose evaluation failed (isolated per-module).
namespaceFor function packages/devtools/src/codegen/model.ts:191 Picks the generated namespace name for a resource: the class name minus a trailing Resource (PostResourcePost, matching the §14 example), falling back to the slug when that leaves nothing.
PanelBatch type-only interface packages/devtools/src/codegen/evaluator.ts:42 Result of one panel batch (TECH_SPEC §5.1).
PanelShape type-only interface packages/devtools/src/codegen/protocol.ts:135 A panel module that evaluated successfully (TECH_SPEC §5.1).
PROTOCOL_VERSION constant packages/devtools/src/codegen/model.ts:26 Protocol version stamped into manifest.json (docs/protocol/v1.md, frozen). Consumers (adonia:doctor, the docs generator) hard-fail on a mismatch, exactly like the client does with the page envelope.
RegistryEntry type-only interface packages/devtools/src/codegen/emitter.ts:20 One registry row: a resource slug and the specifier of its lazy import.
renderDescriptorTypes function packages/devtools/src/codegen/emitter.ts:118 Render .adonisjs/adonia/descriptor.d.ts (TECH_SPEC §14): one AdoniaGen.<Namespace> block per resource, holding the Row shape of index pages (protocol §6) and the FormState shape of create/edit pages (protocol §7).
renderManifest function packages/devtools/src/codegen/emitter.ts:164 Render .adonisjs/adonia/manifest.json (TECH_SPEC §14).
renderResourceRegistry function packages/devtools/src/codegen/emitter.ts:69 Render the registry file contents for entries (any order in, sorted out). Pure: same input always produces the same string.
resolveRowColumns function packages/devtools/src/codegen/model.ts:164 Resolves a resource’s index columns (TECH_SPEC §7.5).
ResourceEvaluator class packages/devtools/src/codegen/evaluator.ts:86 Long-lived evaluation worker manager. Not part of the adonisrc hook contract itself — use indexAdoniaResources for that — but exported so codegen internals can be unit-tested against plain fixture modules.
ResourceShape type-only interface packages/devtools/src/codegen/protocol.ts:107 A resource module that evaluated successfully (TECH_SPEC §6/§14).
ResourceTypes type-only interface packages/devtools/src/codegen/model.ts:64 The generated AdoniaGen.<Namespace> block of one resource.
RowColumn type-only interface packages/devtools/src/codegen/model.ts:147 One row of a generated Row interface: the column key plus the field it was derived from (null for explicit table() columns, which have no originating field).
TypeMember type-only interface packages/devtools/src/codegen/model.ts:56 One key: type member of a generated interface.
UNKNOWN_CELL_TS_TYPE constant packages/devtools/src/codegen/type_map.ts:45 Type emitted for row cells whose cell registry key the table does not know. Same rationale as UNKNOWN_TS_TYPE.
UNKNOWN_TS_TYPE constant packages/devtools/src/codegen/type_map.ts:39 Type emitted for field types the table does not know (see module doc).
WorkerCrashError class packages/devtools/src/codegen/evaluator.ts:52 Rejected from the evaluate methods when the worker died (or could not be spawned) twice in a row for the same batch — module-level failures are data (EvaluationBatch.failures), never this error.
workerExecArgv function packages/devtools/src/codegen/loader.ts:47 Computes the execArgv for the codegen evaluation worker of the app rooted at appRoot: base (default process.execArgv) plus --import <ts-exec entry> when no TypeScript loader is already present and @poppinss/ts-exec resolves from the app root. Unresolvable (plain JavaScript apps, or apps on another toolchain) leaves base untouched — the worker’s native type-stripping fallback still covers plain-module resources.

@adonia/devtools/plugin-migrations

Export Kind Source Summary
registeredPluginMigrationSources function packages/devtools/src/plugin_migration_registry.ts:17 Migration sources registered by the running host application’s panels.
registerPluginMigrationSources function packages/devtools/src/plugin_migration_registry.ts:7 Replace the migration sources discovered from the host’s attached panels.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close