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 (PostResource → Post, 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. |