feat: add project-aware agent workspace
Generic Container CI/CD / test-build-publish (push) Successful in 2m9s
Frontend CI/CD / build-test-publish-and-deploy (push) Successful in 2m39s

This commit is contained in:
2026-10-22 18:52:18 +08:00
parent c6a0e74e72
commit 2d8506fea0
191 changed files with 12373 additions and 3556 deletions
+8 -5
View File
@@ -282,30 +282,33 @@ export function createWaterNetworkSources(): Record<
VectorSourceSpecification
>;
export function createWaterNetworkSources(
sourceIds: readonly GeoServerWaterNetworkSourceId[]
sourceIds: readonly GeoServerWaterNetworkSourceId[],
workspace?: string
): Partial<Record<GeoServerWaterNetworkSourceId, VectorSourceSpecification>>;
export function createWaterNetworkSources(
sourceIds: readonly GeoServerWaterNetworkSourceId[] = GEOSERVER_WATER_NETWORK_SOURCE_IDS
sourceIds: readonly GeoServerWaterNetworkSourceId[] = GEOSERVER_WATER_NETWORK_SOURCE_IDS,
workspace = GEOSERVER_WORKSPACE
) {
return Object.fromEntries(
SUPPLY_LAYER_CATALOG.flatMap((layer) =>
layer.available &&
layer.sourceLayer !== undefined &&
sourceIds.includes(layer.id as GeoServerWaterNetworkSourceId)
? [[layer.id, createGeoServerVectorSource(layer.sourceLayer)] as const]
? [[layer.id, createGeoServerVectorSource(layer.sourceLayer, workspace)] as const]
: []
)
) as Partial<Record<GeoServerWaterNetworkSourceId, VectorSourceSpecification>>;
}
function createGeoServerVectorSource(
sourceLayer: (typeof SOURCE_LAYERS)[keyof typeof SOURCE_LAYERS]
sourceLayer: (typeof SOURCE_LAYERS)[keyof typeof SOURCE_LAYERS],
workspace: string
): VectorSourceSpecification {
return {
type: "vector",
promoteId: "id",
tiles: [
`${MAP_URL}/gwc/service/wmts/rest/${GEOSERVER_WORKSPACE}:${sourceLayer}/WebMercatorQuad/{z}/{y}/{x}?format=application/vnd.mapbox-vector-tile`
`${MAP_URL}/gwc/service/wmts/rest/${workspace}:${sourceLayer}/WebMercatorQuad/{z}/{y}/{x}?format=application/vnd.mapbox-vector-tile`
],
minzoom: 0,
maxzoom: 24