From 048780b48da674f0ead9d69ca857b4bf34923b60 Mon Sep 17 00:00:00 2001 From: ingalls Date: Sun, 8 Dec 2024 19:14:01 -0700 Subject: [PATCH] Update CHANGELOG --- CHANGELOG.md | 4 ++++ package.json | 3 +-- task.ts | 9 ++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d4c7c3..3fae9c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ ## Version History +### v1.4.1 + +- :rocket: Remove GeoJSON in favour of `InputFeature` type + ### v1.4.0 - :rocket: Update to latest ETL diff --git a/package.json b/package.json index 008ccd8..7497131 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ }, "dependencies": { "@sinclair/typebox": "^0.34.0", - "@tak-ps/etl": "^6.4.0", - "@types/geojson": "^7946.0.10" + "@tak-ps/etl": "^6.4.0" } } diff --git a/task.ts b/task.ts index 71301a4..22bb647 100644 --- a/task.ts +++ b/task.ts @@ -1,7 +1,6 @@ -import { Type, TSchema } from '@sinclair/typebox'; -import { FeatureCollection, Feature } from 'geojson'; +import { Type, TSchema, Static } from '@sinclair/typebox'; import type { Event } from '@tak-ps/etl'; -import ETL, { SchemaType, handler as internal, local } from '@tak-ps/etl'; +import ETL, { InputFeature, InputFeatureCollection, SchemaType, handler as internal, local } from '@tak-ps/etl'; import { fetch } from '@tak-ps/etl'; const InputSchema = Type.Object({ @@ -27,7 +26,7 @@ export default class Task extends ETL { async control(): Promise { await this.env(InputSchema); - const features: Feature[] = []; + const features: Static[] = []; const res = await fetch('https://www.cotrip.org/api/graphql', { method: 'POST', @@ -163,7 +162,7 @@ export default class Task extends ETL { }) } - const fc: FeatureCollection = { + const fc: Static = { type: 'FeatureCollection', features: features }