From 1eaf9df9b49a22242023c6b1ab13e159b7332aef Mon Sep 17 00:00:00 2001 From: Marc Harter Date: Mon, 10 Mar 2025 12:43:11 -0700 Subject: [PATCH 1/5] WIP --- index.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/index.ts b/index.ts index 52fe863..8e11943 100644 --- a/index.ts +++ b/index.ts @@ -1,5 +1,4 @@ import {serve} from "@hono/node-server" -import {serveStatic} from "@hono/node-server/serve-static" import {ErrorHandler, Handler, Hono, NotFoundHandler} from "hono" import {bodyLimit} from "hono/body-limit" import {cors} from "hono/cors" @@ -50,12 +49,10 @@ export class Ogre { app.onError(this.serverError()) app.options("/", this.heartbeat()) - app.use(cors(), bodyLimit({maxSize: this.limit})) app.get("/", this.index()) + app.use(cors(), bodyLimit({maxSize: this.limit})) app.post("/convert", this.convert()) app.post("/convertJson", this.convertJson()) - - app.use("*", serveStatic({root: "./public"})) } start(): void { @@ -71,7 +68,7 @@ export class Ogre { return c.json({error: true, message: er.message}, 500) } - private heartbeat = (): Handler => () => new Response() + private heartbeat = (): Handler => async (c) => c.body(null, 204) private index = (): Handler => async (c) => c.html(index) @@ -100,7 +97,7 @@ export class Ogre { if (rfc7946 != null) opts.options.push("-lco", "RFC7946=YES") c.header( - "Content-Type", + "content-type", forcePlainText != null ? "text/plain; charset=utf-8" : "application/json; charset=utf-8", From 7694c1aacd132a79b26647e658b75082de6da5ed Mon Sep 17 00:00:00 2001 From: Marc Harter Date: Mon, 10 Mar 2025 12:46:53 -0700 Subject: [PATCH 2/5] WIP --- index.ts | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 8e11943..030730a 100644 --- a/index.ts +++ b/index.ts @@ -68,7 +68,7 @@ export class Ogre { return c.json({error: true, message: er.message}, 500) } - private heartbeat = (): Handler => async (c) => c.body(null, 204) + private heartbeat = (): Handler => async (c) => c.text("") private index = (): Handler => async (c) => c.html(index) diff --git a/package.json b/package.json index d576666..9e6d246 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ogre", - "version": "5.0.1", + "version": "5.0.2-rc.1", "description": "ogr2ogr web client", "keywords": [ "ogr2ogr", From 514f4549d7964c1be68ef2bf6741e522aa32eb80 Mon Sep 17 00:00:00 2001 From: Marc Harter Date: Mon, 10 Mar 2025 13:16:14 -0700 Subject: [PATCH 3/5] WIP --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9e6d246..b42ac92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ogre", - "version": "5.0.2-rc.1", + "version": "5.0.2", "description": "ogr2ogr web client", "keywords": [ "ogr2ogr", From d3426d33010c654c454292f2edcc9f3d03fc2edc Mon Sep 17 00:00:00 2001 From: Marc Harter Date: Mon, 10 Mar 2025 13:28:03 -0700 Subject: [PATCH 4/5] WIP --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 030730a..060f8c1 100644 --- a/index.ts +++ b/index.ts @@ -68,7 +68,7 @@ export class Ogre { return c.json({error: true, message: er.message}, 500) } - private heartbeat = (): Handler => async (c) => c.text("") + private heartbeat = (): Handler => async (c) => c.text("OK") private index = (): Handler => async (c) => c.html(index) From 446df5b5cbf3fc11e52132b789d4b56061f5abb5 Mon Sep 17 00:00:00 2001 From: Marc Harter Date: Mon, 10 Mar 2025 13:50:09 -0700 Subject: [PATCH 5/5] WIP --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 060f8c1..d8d567f 100644 --- a/index.ts +++ b/index.ts @@ -68,7 +68,7 @@ export class Ogre { return c.json({error: true, message: er.message}, 500) } - private heartbeat = (): Handler => async (c) => c.text("OK") + private heartbeat = (): Handler => async () => new Response() private index = (): Handler => async (c) => c.html(index)