Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

docs(server): name TREK_PHOTON_URL in the services config and the alternates limit of the TREK Valhalla

Maurice0426ce7f0129
diff --git a/server/src/nest/app-config/tokens.ts b/server/src/nest/app-config/tokens.ts
index bc3ac7f8f..e8671a8f0 100644
--- a/server/src/nest/app-config/tokens.ts
+++ b/server/src/nest/app-config/tokens.ts
@@ -32,8 +32,9 @@ export const transitConfig = registerAs('transit', () => BOOT_DERIVERS.transit(p
/** KitineraryExtractorService's binary probe (KITINERARY_EXTRACTOR_PATH, then PATH). */
export const kitineraryConfig = registerAs('kitinerary', () => BOOT_DERIVERS.kitinerary(process.env));
/**
- * The installation identity towards the liketrek services and their Valhalla
- * (TREK_SERVICES, TREK_SERVICES_KEY, TREK_SERVICES_HOSTS, TREK_VALHALLA_URL).
+ * The installation identity towards the liketrek services, their Photon and
+ * their Valhalla (TREK_SERVICES, TREK_SERVICES_KEY, TREK_SERVICES_HOSTS,
+ * TREK_PHOTON_URL, TREK_VALHALLA_URL).
*/
export const servicesConfig = registerAs('services', () => BOOT_DERIVERS.services(process.env));
diff --git a/shared/src/routing-relay/routing-relay.schema.ts b/shared/src/routing-relay/routing-relay.schema.ts
index 7844db65c..544e59495 100644
--- a/shared/src/routing-relay/routing-relay.schema.ts
+++ b/shared/src/routing-relay/routing-relay.schema.ts
@@ -22,7 +22,12 @@ export const VALHALLA_RELAY_MAX_LOCATIONS = 20;
export const VALHALLA_RELAY_MAX_TRACE_POINTS = 4000;
/** Points one height question may carry: the planner asks 500 at a time. */
export const VALHALLA_RELAY_MAX_HEIGHT_POINTS = 1000;
-/** Alternate ways one route may ask for besides its own. */
+/**
+ * Alternate ways one route may ask for besides its own. Valhalla answers a
+ * larger ask with as many as its `service_limits.max_alternates` allows rather
+ * than refusing it, so the hike ways and leg variants, which ask for three,
+ * need that limit at three or more on the TREK Valhalla to get all of them.
+ */
export const VALHALLA_RELAY_MAX_ALTERNATES = 5;
const point = z.object({