minotor 11.3.0 → 11.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- # [11.3.0](https://github.com/aubryio/minotor/compare/v11.2.3...v11.3.0) (2026-07-21)
1
+ # [11.4.0](https://github.com/aubryio/minotor/compare/v11.3.0...v11.4.0) (2026-07-24)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * support for virtual transfers ([#73](https://github.com/aubryio/minotor/issues/73)) ([295ff24](https://github.com/aubryio/minotor/commit/295ff248c935e0fb7bdeddad802cbffb1142b0cb))
6
+ * support service_ids in transfers.txt. ([d8e5fbd](https://github.com/aubryio/minotor/commit/d8e5fbd1fe99968aebc103ff8d51b98389322437))
package/dist/cli.mjs CHANGED
@@ -20422,10 +20422,12 @@ const processStopToStopTransfer = (transferEntry, fromStop, toStop, transfers) =
20422
20422
  /**
20423
20423
  * Parses the transfers.txt file from a GTFS feed.
20424
20424
  *
20425
- * @param stopsStream The readable stream containing the stops data.
20426
- * @return A mapping of stop IDs to corresponding stop details.
20425
+ * @param transfersStream The readable stream containing the transfers data.
20426
+ * @param stopsMap The parsed GTFS stops indexed by their source IDs.
20427
+ * @param activeServiceIds The service IDs active for the requested date.
20428
+ * @returns Parsed stop transfers, trip continuations, and guaranteed trip transfers.
20427
20429
  */
20428
- const parseTransfers = (transfersStream, stopsMap) => __awaiter(void 0, void 0, void 0, function* () {
20430
+ const parseTransfers = (transfersStream, stopsMap, activeServiceIds) => __awaiter(void 0, void 0, void 0, function* () {
20429
20431
  var _a, e_1, _b, _c;
20430
20432
  const transfers = new Map();
20431
20433
  const tripContinuations = [];
@@ -20439,6 +20441,10 @@ const parseTransfers = (transfersStream, stopsMap) => __awaiter(void 0, void 0,
20439
20441
  _d = false;
20440
20442
  const rawLine = _c;
20441
20443
  const transferEntry = rawLine;
20444
+ if (transferEntry.service_id &&
20445
+ !activeServiceIds.has(transferEntry.service_id)) {
20446
+ continue;
20447
+ }
20442
20448
  if (transferEntry.transfer_type === 3 ||
20443
20449
  transferEntry.transfer_type === 5) {
20444
20450
  continue;
@@ -21016,7 +21022,7 @@ class GtfsParser {
21016
21022
  log.info(`Parsing ${TRANSFERS_FILE}`);
21017
21023
  const transfersStart = performance.now();
21018
21024
  const transfersStream = yield zip.stream(TRANSFERS_FILE);
21019
- const { transfers: parsedTransfers, tripContinuations: parsedTripContinuations, guaranteedTripTransfers: parsedGuaranteedTripTransfers, } = yield parseTransfers(transfersStream, parsedStops);
21025
+ const { transfers: parsedTransfers, tripContinuations: parsedTripContinuations, guaranteedTripTransfers: parsedGuaranteedTripTransfers, } = yield parseTransfers(transfersStream, parsedStops, activeServiceIds);
21020
21026
  transfers = parsedTransfers;
21021
21027
  tripContinuationsList = parsedTripContinuations;
21022
21028
  guaranteedTripTransfersList = parsedGuaranteedTripTransfers;