Skip to content

Commit

Permalink
Update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Dec 9, 2024
1 parent e385a16 commit 048780b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
9 changes: 4 additions & 5 deletions task.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand All @@ -27,7 +26,7 @@ export default class Task extends ETL {
async control(): Promise<void> {
await this.env(InputSchema);

const features: Feature[] = [];
const features: Static<typeof InputFeature>[] = [];

const res = await fetch('https://www.cotrip.org/api/graphql', {
method: 'POST',
Expand Down Expand Up @@ -163,7 +162,7 @@ export default class Task extends ETL {
})
}

const fc: FeatureCollection = {
const fc: Static<typeof InputFeatureCollection> = {
type: 'FeatureCollection',
features: features
}
Expand Down

0 comments on commit 048780b

Please sign in to comment.