Skip to content

Commit

Permalink
Merge branch 'main' into deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
davwheat committed Feb 16, 2024
2 parents 6ceb7a5 + da73461 commit c9c1073
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 30 deletions.
2 changes: 1 addition & 1 deletion cf-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@types/uuid": "^9.0.8",
"prettier": "^3.2.5",
"typescript": "^5.3.3",
"wrangler": "^3.28.1"
"wrangler": "^3.28.3"
},
"dependencies": {
"@cfworker/json-schema": "^1.12.8",
Expand Down
30 changes: 15 additions & 15 deletions cf-workers/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ __metadata:
languageName: node
linkType: hard

"@cloudflare/kv-asset-handler@npm:^0.2.0":
version: 0.2.0
resolution: "@cloudflare/kv-asset-handler@npm:0.2.0"
"@cloudflare/kv-asset-handler@npm:0.3.1":
version: 0.3.1
resolution: "@cloudflare/kv-asset-handler@npm:0.3.1"
dependencies:
mime: "npm:^3.0.0"
checksum: 10/56affbe5afdcfcf0860e7b9c826b3156210f1286791e702320b0ee378e540ed3e2d7ecdd55928e404475d4469433a47ca255889374b88992b481499a6d30b84b
checksum: 10/4238acf8ecaf61ab2350f686e2a0e4b011b14fe9a657960063c0064557a7c42f39f1c3db4ff01516697466f583b08ac34b16c319f6556385aac3108cc388a23d
languageName: node
linkType: hard

Expand Down Expand Up @@ -519,7 +519,7 @@ __metadata:
prettier: "npm:^3.2.5"
typescript: "npm:^5.3.3"
uuid: "npm:^9.0.1"
wrangler: "npm:^3.28.1"
wrangler: "npm:^3.28.3"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -1091,9 +1091,9 @@ __metadata:
languageName: node
linkType: hard

"miniflare@npm:3.20240129.1":
version: 3.20240129.1
resolution: "miniflare@npm:3.20240129.1"
"miniflare@npm:3.20240129.3":
version: 3.20240129.3
resolution: "miniflare@npm:3.20240129.3"
dependencies:
"@cspotcode/source-map-support": "npm:0.8.1"
acorn: "npm:^8.8.0"
Expand All @@ -1109,7 +1109,7 @@ __metadata:
zod: "npm:^3.20.6"
bin:
miniflare: bootstrap.js
checksum: 10/960dc83ce9bd7ea4acc59426e29e72a9fe5f690f692c7b6aacf745690dc5e648ce16deedf26237d98ce6fd4895f0959c6709bb22cccd9080b9c9e236d1f35db4
checksum: 10/83b0c4b6d2b832602e145574cda347bdbca490f511cd69fd79d0480a0e8d86ffe469adc5028de7578a08186f467b7c8d58471d52ffe18e6ea009c610027d57b8
languageName: node
linkType: hard

Expand Down Expand Up @@ -1757,18 +1757,18 @@ __metadata:
languageName: node
linkType: hard

"wrangler@npm:^3.28.1":
version: 3.28.1
resolution: "wrangler@npm:3.28.1"
"wrangler@npm:^3.28.3":
version: 3.28.3
resolution: "wrangler@npm:3.28.3"
dependencies:
"@cloudflare/kv-asset-handler": "npm:^0.2.0"
"@cloudflare/kv-asset-handler": "npm:0.3.1"
"@esbuild-plugins/node-globals-polyfill": "npm:^0.2.3"
"@esbuild-plugins/node-modules-polyfill": "npm:^0.2.2"
blake3-wasm: "npm:^2.1.5"
chokidar: "npm:^3.5.3"
esbuild: "npm:0.17.19"
fsevents: "npm:~2.3.2"
miniflare: "npm:3.20240129.1"
miniflare: "npm:3.20240129.3"
nanoid: "npm:^3.3.3"
path-to-regexp: "npm:^6.2.0"
resolve: "npm:^1.22.8"
Expand All @@ -1787,7 +1787,7 @@ __metadata:
bin:
wrangler: bin/wrangler.js
wrangler2: bin/wrangler.js
checksum: 10/b8899d76dd15a6de762ac4216727937816c208213e6ec0a698463704969101c51fa80805c54d4e58db8fa74e7c67dbe5b65e0f7d4d6ea57a5667e20b7e560e63
checksum: 10/e295c156656e09070248bfa03cfda0c429dd8af4af7e28b5dbe26412da8dc589e0b24c4aa52aa8587939ae19a06c6d22c8ffa26d4ed4bf9c9c88f1ea7fa2b5f0
languageName: node
linkType: hard

Expand Down
22 changes: 11 additions & 11 deletions src/announcement-data/systems/stations/AmeyCelia.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export default class AmeyCelia extends AmeyPhil {
'London Midland',
'London Midland City',
'London Midland Express',
'London Northwestern Railway',
'London Overground',
'London Transport Buses',
'London Underground',
Expand Down Expand Up @@ -191,6 +192,8 @@ export default class AmeyCelia extends AmeyPhil {
'Wales and West Weymouth Sand and Cycle Explorer',
'West Anglia',
'West Anglia Great Northern Railways',
'West Midlands Railway',
'West Midlands Trains',
'White Rose',
'Yorkshire Pullman',
],
Expand All @@ -210,17 +213,14 @@ export default class AmeyCelia extends AmeyPhil {
'Island Line',
'LTS Rail',
'Merseyside Electrics',
// 'London North Western Railway',
'Network Southeast',
'North London Railways',
'South Central Trains',
// 'South Western Railway',
'steam special',
'Wessex',
'Virgin Trains the Sussex Scot',
'West Anglia Great Northern Railway',
'West Coast Railway Company',
// 'West Midlands Railway',
],
}
}
Expand Down Expand Up @@ -3164,14 +3164,14 @@ export default class AmeyCelia extends AmeyPhil {
return this.ALL_AVAILABLE_TOCS.find(t => t?.toLowerCase() === tocName?.toLowerCase()) ?? ''

// West Midlands Trains
// case 'LM':
// // https://www.westmidlandsrailway.co.uk/media/3657/download?inline
// const lnwr = ['EUS', 'CRE', 'BDM', 'SAA', 'MKC', 'TRI', 'LIV', 'NMP']
// if (lnwr.includes(originCrs) || lnwr.includes(destinationCrs)) {
// return 'london north western railway'
// } else {
// return 'west midlands railway'
// }
case 'LM':
// https://www.westmidlandsrailway.co.uk/media/3657/download?inline
const lnwr = ['EUS', 'CRE', 'BDM', 'SAA', 'MKC', 'TRI', 'LIV', 'NMP']
if (lnwr.includes(originCrs) || lnwr.includes(destinationCrs)) {
return 'london northwestern railway'
} else {
return 'west midlands railway'
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/announcement-data/systems/stations/AmeyPhil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ export default class AmeyPhil extends StationAnnouncementSystem {
'First Transpennine',
'intercity charter train',
'international',
'London North Western Railway',
'London Northwestern Railway',
'mainline',
'North London Railways',
'North Western Trains',
Expand Down Expand Up @@ -3617,7 +3617,7 @@ export default class AmeyPhil extends StationAnnouncementSystem {
// https://www.westmidlandsrailway.co.uk/media/3657/download?inline
const lnwr = ['EUS', 'CRE', 'BDM', 'SAA', 'MKC', 'TRI', 'LIV', 'NMP']
if (lnwr.includes(originCrs) || lnwr.includes(destinationCrs)) {
return 'london north western railway'
return 'london northwestern railway'
} else {
return 'west midlands railway'
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/AmeyLiveTrainAnnouncements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ export function LiveTrainAnnouncements<SystemKeys extends string>({
return null
}

return [s.label.toLowerCase(), s.value]
// Remove CRS from end of label
return [s.label.toLowerCase().replace(/ ([A-Z0-9]{3})$/i, ''), s.value]
})
.filter(x => x) as [string, string][],
),
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit c9c1073

Please sign in to comment.