mirror of
https://github.com/kennethnym/aris.git
synced 2026-02-02 05:01:17 +00:00
Add @aris/data-source-tfl package
TfL data source for tube, overground, and Elizabeth line alerts. - Fetches line statuses and filters to minor/major delays and closures - Sorts alerts by severity, then by proximity to user location - Caches station data after first fetch - Uses arktype for API response validation - Supports API injection for testing Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
21
README.md
21
README.md
@@ -6,10 +6,25 @@ To install dependencies:
|
||||
bun install
|
||||
```
|
||||
|
||||
To run:
|
||||
## Packages
|
||||
|
||||
### @aris/data-source-tfl
|
||||
|
||||
TfL (Transport for London) data source for tube, overground, and Elizabeth line alerts.
|
||||
|
||||
#### Testing
|
||||
|
||||
```bash
|
||||
bun run index.ts
|
||||
cd packages/aris-data-source-tfl
|
||||
bun run test
|
||||
```
|
||||
|
||||
This project was created using `bun init` in bun v1.3.6. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
|
||||
#### Fixtures
|
||||
|
||||
Tests use fixture data from real TfL API responses stored in `fixtures/tfl-responses.json`.
|
||||
|
||||
To refresh fixtures:
|
||||
|
||||
```bash
|
||||
bun run fetch-fixtures
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user