Skip to content

Commit 099d2fa

Browse files
committed
feat(api): add @dafthunk/utils package and refactor GeoJSON handling in web and api components
1 parent 338f248 commit 099d2fa

21 files changed

Lines changed: 1217 additions & 1657 deletions

apps/api/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@
4747
"@cf-wasm/resvg": "^0.1.24",
4848
"@cloudflare/ai-utils": "^1.0.1",
4949
"@dafthunk/types": "workspace:*",
50+
"@dafthunk/utils": "workspace:*",
5051
"@hono-rate-limiter/cloudflare": "^0.2.2",
5152
"@hono/oauth-providers": "^0.7.1",
5253
"@hono/zod-validator": "^0.5.0",
54+
"@resvg/resvg-wasm": "^2.6.2",
5355
"@sendgrid/mail": "^8.1.5",
5456
"@turf/helpers": "^7.2.0",
5557
"@turf/turf": "^7.2.0",

apps/api/src/nodes/cloudflare-node-registry.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ import { FeatureCollectionNode } from "./geo/feature-collection-node";
6060
import { FeatureNode } from "./geo/feature-node";
6161
import { FlattenNode } from "./geo/flatten-node";
6262
import { FlipNode } from "./geo/flip-node";
63-
import { GeoJsonGeometryNode } from "./geo/geojson-geometry-node";
63+
import { GeoJsonNode } from "./geo/geojson-node";
64+
import { GeoJsonToSvgNode } from "./geo/geojson-to-svg-node";
6465
import { GeometryCollectionNode } from "./geo/geometry-collection-node";
6566
import { GreatCircleNode } from "./geo/great-circle-node";
6667
import { IntersectNode } from "./geo/intersect-node";
@@ -93,6 +94,7 @@ import { PolygonSmoothNode } from "./geo/polygon-smooth-node";
9394
import { PolygonTangentsNode } from "./geo/polygon-tangents-node";
9495
import { PolygonToLineNode } from "./geo/polygon-to-line-node";
9596
import { PolygonizeNode } from "./geo/polygonize-node";
97+
import { SvgToPngNode } from "./image/svg-to-png-node";
9698
import { RewindNode } from "./geo/rewind-node";
9799
import { RhumbBearingNode } from "./geo/rhumb-bearing-node";
98100
import { RhumbDestinationNode } from "./geo/rhumb-destination-node";
@@ -102,7 +104,6 @@ import { SectorNode } from "./geo/sector-node";
102104
import { ShortestPathNode } from "./geo/shortest-path-node";
103105
import { SimplifyNode } from "./geo/simplify-node";
104106
import { SquareNode } from "./geo/square-node";
105-
import { ToGeoJsonNode } from "./geo/to-geojson-node";
106107
import { TransformRotateNode } from "./geo/transform-rotate-node";
107108
import { TransformScaleNode } from "./geo/transform-scale-node";
108109
import { TransformTranslateNode } from "./geo/transform-translate-node";
@@ -434,7 +435,8 @@ export class CloudflareNodeRegistry extends BaseNodeRegistry {
434435
this.registerImplementation(FlattenNode);
435436
this.registerImplementation(FlipNode);
436437
this.registerImplementation(GeometryCollectionNode);
437-
this.registerImplementation(GeoJsonGeometryNode);
438+
this.registerImplementation(GeoJsonNode);
439+
this.registerImplementation(GeoJsonToSvgNode);
438440
this.registerImplementation(GreatCircleNode);
439441
this.registerImplementation(IntersectNode);
440442
this.registerImplementation(KinksNode);
@@ -466,6 +468,7 @@ export class CloudflareNodeRegistry extends BaseNodeRegistry {
466468
this.registerImplementation(PolygonTangentsNode);
467469
this.registerImplementation(PolygonToLineNode);
468470
this.registerImplementation(PolygonizeNode);
471+
this.registerImplementation(SvgToPngNode);
469472
this.registerImplementation(RewindNode);
470473
this.registerImplementation(RhumbBearingNode);
471474
this.registerImplementation(RhumbDestinationNode);
@@ -475,7 +478,6 @@ export class CloudflareNodeRegistry extends BaseNodeRegistry {
475478
this.registerImplementation(ShortestPathNode);
476479
this.registerImplementation(SimplifyNode);
477480
this.registerImplementation(SquareNode);
478-
this.registerImplementation(ToGeoJsonNode);
479481
this.registerImplementation(TransformRotateNode);
480482
this.registerImplementation(TransformScaleNode);
481483
this.registerImplementation(TransformTranslateNode);

apps/api/src/nodes/geo/geojson-geometry-node.test.ts

Lines changed: 0 additions & 311 deletions
This file was deleted.

0 commit comments

Comments
 (0)