ConstThe base profile object (Files manifest, or inline themes/layers properties).
Base URL for resolving relative file paths.
Identifier used for logging and the enriched profile metadata.
Opaque cache token appended to every fetched URL, percent-encoded by
the caller. NOT necessarily a date: nominally a content fingerprint, so that the token
changes when the profile changes and only then. Defaults to Date.now().
Optional fetch configuration (headers, strictContentType).
When true (debug mode), ignores profile.bundleFile and loads the
modular cascade — section edits in a deployed profile are picked up without a rebuild.
The enriched profile record with resolved themes, mapping, and layer configs.
Fetches the themes file or returns the inline themes from the profile.
The profile object.
Base URL for resolving the themes file path.
Opaque cache token appended to fetch URLs. Not necessarily a date.
Optional fetch configuration.
The themes record, or null if unavailable.
Fetches the layers index file defined in profile.Files.layersFile.
The profile object.
Base URL for resolving the layers file path.
Opaque cache token appended to fetch URLs. Not necessarily a date.
Optional fetch configuration.
The layers file record, or null if no layersFile is defined.
Fetches an optional section file referenced in profile.Files (e.g. basemapsFile, uiFile).
Returns null when the file is not declared, or when it fails to load — a failure that is
then recorded in the profile load report (profile-load-report.ts).
The profile object.
Key in profile.Files pointing to the section file name.
Base URL for resolving the file path.
Opaque cache token appended to fetch URLs. Not necessarily a date.
Optional fetch configuration.
The section record, or null if unavailable.
Fetches every plugin config file declared in Files.modules (profile
layout v2) and returns the resulting bag { moduleId: config }.
Files are fetched in parallel; a missing or invalid file logs a warning, is recorded in
the profile load report, and is skipped (the module simply has no file-based config).
The profile object.
Base URL for resolving plugin config file paths.
Opaque cache token appended to fetch URLs. Not necessarily a date.
Optional fetch configuration.
The module config bag, or null when Files.modules is absent/empty.
Fetches individual layer configuration files for each layer reference. Supports inline configs generated from template expansion (no HTTP fetch).
Array of layer references with optional configFile or inlineConfig.
Base URL for resolving layer config file paths.
Opaque cache token appended to fetch URLs. Not necessarily a date.
Optional fetch configuration.
Array of layer config results with resolved config objects and layer directories.
Loads and hydrates a profile from a pre-built bundle file, replacing the ~19-request cascade with a single HTTP fetch.
Called automatically by loadModularProfile() when profile.bundleFile is set.
The bundle must have been generated at build time by scripts/lib/bundle-profiles.cjs.
The base profile object (already loaded from profile.json).
Base URL for resolving the bundle file path.
Identifier used for logging and metadata.
Filename of the bundle (e.g. "profile-bundle.json").
Opaque cache token appended to the bundle URL, and handed to the cascade if the bundle fails to load.
Optional fetch configuration.
The enriched profile record, equivalent to the result of loadModularProfile().
Records every resource the profile DECLARES that the bundle does not carry.
The bundle compiler skips a declared file it cannot read, without a word
(scripts/lib/bundle-profiles.cjs), and _processBundle merges whatever is there — so on
the production path a missing section was not even an error. The cascade records its
failures where they happen; this is the bundle path's equivalent.
The base profile (profile.json), which declares the files.
The bundle payload.
The layers after template expansion.
The bundle's layer configurations, by layer id.
The profile's base URL, for the reported URLs.
Assembles the enriched profile from an already-fetched bundle payload.
Shared assembly tail for both load paths: spreads section-file data into the profile, merges the plugin-config bag, validates, then expands layer templates.
Assembles the final enriched profile from all fetched sub-resources.
⚠️ The keys it sets are exactly: basePath, _profileId, themes, mapping, layers
(plus the spread of the base profile). Notably NOT taxonomy and NOT icons — readers
expecting either on the active profile get undefined, silently. That was bug C-8
(AddPOI category lists, fixed 16/07): consume the capability
(GeoLeaf.Taxonomy.getLayerCategories) or the offline seam
(CacheStorage.loadProfileConfig, which hydrates icons from Files.modules.taxonomy).
Adding a key here means feeding it too — declaring one the loader never populates is
precisely how the sprite went uncached for months (C-7).
Each layer is its config file plus two keys of its layers.json entry: layerManagerId
and, when the entry sets one, label, which overrides the config's. An entry whose config
could not be obtained (none declared, or a failed fetch) is returned as the layer itself.
Object containing the base profile, themes, mapping, layersSource, and layersConfigs.
The enriched profile record with resolved layers, themes, mapping, and metadata.
Validates a loaded profile object against minimum structural requirements. Logs warnings for each violation — non-blocking, does not throw.
Checks: required id, map.bounds recommended, Files keys are strings,
layers is an array if present.
The raw profile object to validate.
Identifier used in warning messages.
Determines whether a profile uses the modular format (has Files object or version ≥ 1.2).
The profile object to inspect.
true if the profile is modular, false otherwise.
Loads and hydrates a modular GeoLeaf profile by fetching the themes, layers, basemaps, ui, features and mapping files, the per-module files, and the individual layer configs.
⚠️ Taxonomy is NOT one of them: it is a module since the removal of 11/07/2026 and travels through
Files.modules.taxonomylike any other plugin block. The manifest has no dedicated taxonomy path entry any more, and never had an icons one; icons live under the taxonomy module's ownicons.spriteUrl. The retired manifest key is a banned token inextracted-features.guard.test.js— deliberately not spelled out here.