UTTORI ASM ยท IN DEVELOPMENT
Node loader API
Integrate node loader api through supported Uttori ASM APIs.
Discovery reads only cwd/uttori-asm.config.json. An absent discovered file means empty
configuration. An absent explicit file is an error. Validation does not execute plugins, fetch
$schema, read a base image, or build entry points. Its result retains nested input values.
Target, architecture, and include paths use host overrides, then configuration, then defaults.
With no explicit target, exactly one registered target is selected automatically. Zero or multiple
targets require a choice. Architecture defaults to that target's default architecture. Include
paths default to ["./"], become absolute, and are deduplicated.
Configuration plugin paths and packages resolve from the configuration directory. Host/default
modules resolve from cwd. Empty or absent configuration plugins allow the host's default plugin
list. Explicit pluginModules append. Exact bundled-plugin matches bypass module resolution.
activateBundledPlugins appends otherwise unused bundled entries. Plugin options merge shallowly:
configured values, module-specifier overrides, then plugin-ID overrides. Unknown override keys fail.
Target options are the target owner's merged options when it provides createOptions. The
assembler invokes that hook later. Use JSON-compatible option values and treat nested input as shared.
NodePluginLoader owns one active environment. An unchanged normalized snapshot reuses its handle.
Replacement disposes it before activating the new environment. A failure during configuration or
module resolution preserves the current environment. A failure after replacement begins does not.
The cache does not track module file contents, logger identity, or bundled plugin object identity.
Node's import cache remains in effect. This API is not a module hot-reloader.
The convenience loadProjectEnvironment shares a loader per absolute cwd. Any current handle's
disposal releases that shared environment. Handles are not reference-counted. An old disposed handle
does not evict its replacement. Use separate loader instances for independent lifetimes.
See project configuration for user settings and plugin authoring for the runnable plugin example.