Merge branch 'feat/optional-catalog-sources' into refactor/route-imagery-sources

# Conflicts:
#	CHANGELOG.md
#	docs/CURRENT-STATE.md
This commit is contained in:
Sameh Khamis committed 2026-10-09 17:50:12 -07:00
commit 3b840ebdf3
6 files changed
+52 -8

No files matched your search

+5 -1
View File
@@ -5,7 +5,11 @@ import * as picking from '../../data/pickRegistry.js';
import * as input from '../../data/inputOwnership.js';
import * as render from '../../renderGovernor.js';
/** Inject providers, or use Mapillary only when its source is supplied. */
/**
* Inject providers, or use Mapillary only when its source is supplied.
* An explicit provider list replaces the default; unused sources.mapillary is
* neither constructed nor validated, including when the list is empty.
*/
export function createApplicationStreetLevel({
surface,
sources = {},
+17
View File
@@ -82,3 +82,20 @@ test('standalone defaults allow exact replacements and explicit removal, and rej
/Unknown source/,
);
});
test('empty Street Level uses the shared unavailable lifecycle without initialization', async (t) => {
const actual = catalog({}, t);
const manager = new LayerLifecycle({});
manager.register(actual.get('street-level'));
assert.equal(await manager.setEnabled('street-level', true), false);
assert.equal(manager.layers.get('street-level').initialized, false);
const row = manager.getAll()[0];
assert.equal(row.stats.status, 'unavailable');
assert.equal(row.stats.error, 'No street-level imagery providers configured');
assert.equal(await manager.setEnabled('street-level', false), true);
const configured = catalog(createStandaloneLayerSources(), t);
assert.equal(
configured.get('street-level').getSourceAvailability().available,
true,
);
});