GeoLeaf Core API - v3.19.0
    Preparing search index...

    Function bootWithPreset

    • Loads the configuration, composes the preset's capabilities and hands over to the ModuleRegistry. Resolves once every module's init() has run, or once the boot has failed — never with a throw.

      A failure is never silent: the configuration, the profile and the registry each report theirs through app/boot-failure.ts (geoleaf:boot:failed, and the failure screen in the #gl-loader veil unless a host cancels the event), and a watchdog reports a boot that stops progressing. Declared profile resources that failed while a map can still show hold the reveal on a screen that names them. A module that throws is judged by what depends on it: in the interface chain (ui, or a module ui depends on) the boot fails and names it; anywhere else it is isolated — geoleaf:module:failed, the modules that depend on it skipped, and the reveal held on a screen that names it.

      The reveal — and geoleaf:app:ready — always follows the last module's init(): a themed profile reveals when theme-engine has applied its theme; a profile without any theme is revealed here, once registry.init() has returned.

      Returns early — before any signal — when the namespace is unusable, when GeoLeaf.loadConfig is missing, or on a second boot call while an application is mounted — after its unmount (app/mount.ts), a boot runs again. A beforeBoot hook that rejects aborts the boot: geoleaf:boot:aborted, and the veil is hidden for the host. So does a host that destroys the boot's map while the boot runs: a module failing on that map aborts the boot the same way, with reason: "destroyed", instead of failing it.

      A caller that ends the boot before it completes (run) stops it at its next checkpoint: after the configuration, after the profile, after beforeBoot, between two modules, and once the registry returns. Nothing more is signalled for it.

      Parameters

      • preset: PresetManifest

        The active preset manifest (the capabilities this bundle embarks).

      • ctx: BootContext

        The boot collaborators (see BootContext).

      • Optionaloptions: BootOptions

        Caller options. config / configUrl decide where the configuration comes from (see _resolveConfigSource); absent, the historical path is used. watchdogMs sets the watchdog (default 45 s, 0 disables it). maplibregl hands the engine over (installed on globalThis.maplibregl).

      • Optionalrun: BootRun

        Lets the caller end this boot before it completes (see BootRun).

      Returns Promise<void>