@golemio/pid 5.1.0-dev.2166894491 → 5.1.0-dev.2166906515
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/dist/output-gateway/pid/service/helpers/HeadsignFormatter.d.ts +3 -0
- package/dist/output-gateway/pid/service/helpers/HeadsignFormatter.js +10 -0
- package/dist/output-gateway/pid/service/helpers/HeadsignFormatter.js.map +1 -0
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.d.ts +1 -1
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js +3 -2
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HeadsignFormatter = void 0;
|
|
4
|
+
class HeadsignFormatter {
|
|
5
|
+
static format(headsign) {
|
|
6
|
+
return headsign.replace("✈", "").trim();
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.HeadsignFormatter = HeadsignFormatter;
|
|
10
|
+
//# sourceMappingURL=HeadsignFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeadsignFormatter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/helpers/HeadsignFormatter.ts"],"names":[],"mappings":";;;AAAA,MAAa,iBAAiB;IACnB,MAAM,CAAC,MAAM,CAAC,QAAgB;QACjC,OAAO,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC5C,CAAC;CACJ;AAJD,8CAIC"}
|
package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { GTFSRouteTypeEnum } from "../../../../helpers/RouteTypeEnums";
|
|
1
2
|
import { IDepartureWithPosition, IV4TransferDepartureOutputDto } from "../..";
|
|
2
3
|
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
3
|
-
import { GTFSRouteTypeEnum } from "../../../../helpers/RouteTypeEnums";
|
|
4
4
|
export declare class TransferDepartureCacheTransformation extends AbstractTransformation<IDepartureWithPosition, IV4TransferDepartureOutputDto> {
|
|
5
5
|
name: string;
|
|
6
6
|
transformArray: (data: IDepartureWithPosition[]) => IV4TransferDepartureOutputDto[];
|
package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js
CHANGED
|
@@ -7,11 +7,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.TransferDepartureCacheTransformation = void 0;
|
|
10
|
+
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
|
|
10
11
|
const DepartureCalculator_1 = require("../../../shared/DepartureCalculator");
|
|
11
12
|
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
12
13
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
14
|
+
const HeadsignFormatter_1 = require("../helpers/HeadsignFormatter");
|
|
13
15
|
const PlatformCodeResolver_1 = require("../helpers/PlatformCodeResolver");
|
|
14
|
-
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
|
|
15
16
|
let TransferDepartureCacheTransformation = class TransferDepartureCacheTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|
|
@@ -54,7 +55,7 @@ let TransferDepartureCacheTransformation = class TransferDepartureCacheTransform
|
|
|
54
55
|
platform_code: PlatformCodeResolver_1.PlatformCodeResolver.determinePlatformCode(data),
|
|
55
56
|
},
|
|
56
57
|
trip: {
|
|
57
|
-
headsign: departure.trip_headsign,
|
|
58
|
+
headsign: HeadsignFormatter_1.HeadsignFormatter.format(departure.trip_headsign),
|
|
58
59
|
id: departure.trip_id,
|
|
59
60
|
is_wheelchair_accessible: departure.is_wheelchair_accessible ?? null,
|
|
60
61
|
},
|
package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferDepartureCacheTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.ts"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"TransferDepartureCacheTransformation.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uEAA4D;AAE5D,6EAAqE;AACrE,6GAA0G;AAC1G,iEAAgE;AAChE,oEAAiE;AACjE,0EAAuE;AAGhE,IAAM,oCAAoC,GAA1C,MAAM,oCAAqC,SAAQ,+CAGzD;IAHM;;QAII,SAAI,GAAG,sCAAsC,CAAC;QAE9C,mBAAc,GAAG,CAAC,IAA8B,EAAmC,EAAE;YACxF,MAAM,UAAU,GAA+C,IAAI,GAAG,EAAE,CAAC;YACzE,MAAM,GAAG,GAAoC,EAAE,CAAC;YAEhD,KAAK,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC;gBACnD,IAAI,SAAS,CAAC,UAAU,KAAK,kCAAiB,CAAC,KAAK,EAAE,CAAC;oBACnD,MAAM,wBAAwB,GAAG,GAAG,SAAS,CAAC,gBAAgB,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;oBACtF,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;oBACrD,IAAI,GAAG,EAAE,CAAC;wBACN,IAAI,GAAG,CAAC,mBAAmB,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;4BAC9C,SAAS;wBACb,CA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