diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c210093ae..92eeb4706 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,6 +30,24 @@ jobs: - name: Docker Data Task Test run: docker run cloudtak-data:latest npm test + hooks: + runs-on: ubuntu-latest + if: github.event.pull_request.draft == false + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{github.event.pull_request.head.sha || github.sha}} + + - name: Docker Hooks Task Build + run: docker buildx build ./tasks/hooks -t cloudtak-hooks + + - name: Docker Hooks Task Lint + run: docker run cloudtak-hooks:latest npm run lint + + - name: Docker Data Task Test + run: docker run cloudtak-hooks:latest npm test + pmtiles: runs-on: ubuntu-latest if: github.event.pull_request.draft == false diff --git a/tasks/hooks/src/adaptors/arcgis.ts b/tasks/hooks/src/adaptors/arcgis.ts index 497b7e5ef..ad7953bd2 100644 --- a/tasks/hooks/src/adaptors/arcgis.ts +++ b/tasks/hooks/src/adaptors/arcgis.ts @@ -1,6 +1,5 @@ import { Geometry, Point, Polyline, Polygon } from 'arcgis-rest-api'; import { geojsonToArcGIS } from '@terraformer/arcgis' -// @ts-expect-error Default export behavior import proj4 from 'proj4'; export default async function arcgis(data: any): Promise { @@ -58,10 +57,14 @@ export default async function arcgis(data: any): Promise { let geom = geojsonToArcGIS(data.feat.geometry) as Polyline; console.error(geom); + + geometry = geom; } else if (data.feat.geometry.type === 'Polygon') { let geom = geojsonToArcGIS(data.feat.geometry) as Polygon; console.error(geom); + + geometry = geom; } else { throw new Error(`Incompatible Geometry: ${data.feat.geometry.type}`); }