1
0
Fork 0

Update booru and log

Also see if NPM specifiers work?
This commit is contained in:
Sam Therapy 2023-10-09 17:17:58 +02:00
parent b3f8e72932
commit 86d1e04602
Signed by: sam
GPG Key ID: 4D8B07C18F31ACBD
4 changed files with 43 additions and 22 deletions

View File

@ -4,7 +4,6 @@
},
"imports": {
"booru/": "https://deno.land/x/booru@v3.0.1/",
"hono/": "https://deno.land/x/hono@v3.4.1/"
"booru/": "https://deno.land/x/booru@v3.0.2/",
}
}

View File

@ -1,5 +1,27 @@
{
"version": "2",
"version": "3",
"packages": {
"specifiers": {
"npm:fast-xml-parser": "npm:fast-xml-parser@4.2.7",
"npm:hono": "npm:hono@3.7.5"
},
"npm": {
"fast-xml-parser@4.2.7": {
"integrity": "sha512-J8r6BriSLO1uj2miOk1NW0YVm8AGOOu3Si2HQp/cSmo6EA4m3fcwu2WKjJ4RK9wMLBtg69y1kS8baDiQBR41Ig==",
"dependencies": {
"strnum": "strnum@1.0.5"
}
},
"hono@3.7.5": {
"integrity": "sha512-ZaaqAul84HHLXZKwwfH+eMInidwvRj9IdyOoI5Ze0v+WUOAAtQruml3QaUUWkOuI2Myt6IZAiUqkYklLK77k4g==",
"dependencies": {}
},
"strnum@1.0.5": {
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==",
"dependencies": {}
}
}
},
"remote": {
"https://deno.land/x/booru@v3.0.0/src/Constants.ts": "582282889c2ae634765f969b334c9ca535161fbd153ddf61b8edd3d6e685cb89",
"https://deno.land/x/booru@v3.0.0/src/Utils.ts": "f84b4d692ba25f190051f4f16e85d306b95542741a2a49b1381917510b52b581",
@ -29,6 +51,20 @@
"https://deno.land/x/booru@v3.0.1/src/structures/Site.ts": "b896cff9805db0edabf8648cdaefef6cdd7eb952271ce2f287ae4859d0b581ae",
"https://deno.land/x/booru@v3.0.1/src/structures/SiteApi.ts": "2dfeae2bfc9c484a513db9c9b00d851713ef9fdffed2bde0ce028cd96ba283e0",
"https://deno.land/x/booru@v3.0.1/src/structures/SiteInfo.ts": "e1e928d77ce50bbe54a15d0d71bec69502c86f8a582c28c46fc784bc5e1559c4",
"https://deno.land/x/booru@v3.0.2/src/Constants.ts": "582282889c2ae634765f969b334c9ca535161fbd153ddf61b8edd3d6e685cb89",
"https://deno.land/x/booru@v3.0.2/src/Utils.ts": "f84b4d692ba25f190051f4f16e85d306b95542741a2a49b1381917510b52b581",
"https://deno.land/x/booru@v3.0.2/src/boorus/Booru.ts": "aec290e2ab66dd2c7c7fddea0fe428eea0a12766fa857d7ead6998a905516494",
"https://deno.land/x/booru@v3.0.2/src/boorus/Derpibooru.ts": "45c9fba6204c7a4febf00cbcb21c9ebde27f5c3c6201fd9ef08318c6d4fa7ddb",
"https://deno.land/x/booru@v3.0.2/src/boorus/XmlBooru.ts": "a8f731bbe9074ab45aa0d5767d093cfaa7a24f8334e50d43f1df09a1beeca016",
"https://deno.land/x/booru@v3.0.2/src/index.ts": "6054f6e8ab0ac95db23eb9505b8c3c749553b4d1238f273a9a2763a7c002edfc",
"https://deno.land/x/booru@v3.0.2/src/sites.json": "c142a5fcef102f49202b8874ecfb3da6deab2e8b0342be7b3fc681cc7b20f872",
"https://deno.land/x/booru@v3.0.2/src/structures/InternalSearchParameters.ts": "a854c9dd1a7bf83251905fda2f3f9f41fecab7698b5383d650580191121aa0d7",
"https://deno.land/x/booru@v3.0.2/src/structures/Post.ts": "2dc2b94ebbc3f33c5429b9ac6a257346744d885cf548a85a06a05dce7bf5036c",
"https://deno.land/x/booru@v3.0.2/src/structures/SearchParameters.ts": "b465c8a50b24471b5dcf2b48815426d1eb78e82395d6551d587b21f64879fbff",
"https://deno.land/x/booru@v3.0.2/src/structures/SearchResults.ts": "832fc6c97d796a7ede7e25ccca846d8377e298a57f7ab7f7ff4fa5873f99e2a4",
"https://deno.land/x/booru@v3.0.2/src/structures/Site.ts": "b896cff9805db0edabf8648cdaefef6cdd7eb952271ce2f287ae4859d0b581ae",
"https://deno.land/x/booru@v3.0.2/src/structures/SiteApi.ts": "2dfeae2bfc9c484a513db9c9b00d851713ef9fdffed2bde0ce028cd96ba283e0",
"https://deno.land/x/booru@v3.0.2/src/structures/SiteInfo.ts": "e1e928d77ce50bbe54a15d0d71bec69502c86f8a582c28c46fc784bc5e1559c4",
"https://deno.land/x/hono@v3.4.1/client/client.ts": "7a819af2aa9aabc746add4d01715fa37f83676fdf1b63fba1bbcd655b2d066a5",
"https://deno.land/x/hono@v3.4.1/client/index.ts": "3ff4cf246f3543f827a85a2c84d66a025ac350ee927613629bda47e854bfb7ba",
"https://deno.land/x/hono@v3.4.1/client/utils.ts": "053273c002963b549d38268a1b423ac8ca211a8028bdab1ed0b781a62aa5e661",
@ -62,22 +98,5 @@
"https://esm.sh/fast-xml-parser@4.2.7": "9a6bc1e5a315d2557caca288f8e65ac1084070e467b0fd95e7742dc3585bee11",
"https://esm.sh/v130/fast-xml-parser@4.2.7/denonext/fast-xml-parser.mjs": "b1a0d3ee8a4577587506d4157fce5d7ecfcd405e69452e3fc9c339318793fb8e",
"https://esm.sh/v130/strnum@1.0.5/denonext/strnum.mjs": "1ffef4adec2f74139e36a2bfed8381880541396fe1c315779fb22e081b17468b"
},
"npm": {
"specifiers": {
"fast-xml-parser": "fast-xml-parser@4.2.7"
},
"packages": {
"fast-xml-parser@4.2.7": {
"integrity": "sha512-J8r6BriSLO1uj2miOk1NW0YVm8AGOOu3Si2HQp/cSmo6EA4m3fcwu2WKjJ4RK9wMLBtg69y1kS8baDiQBR41Ig==",
"dependencies": {
"strnum": "strnum@1.0.5"
}
},
"strnum@1.0.5": {
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==",
"dependencies": {}
}
}
}
}

View File

@ -1,5 +1,5 @@
import * as booru from "booru/src/index.ts"
import { Context } from "hono/mod.ts"
import { Context } from "npm:hono"
import ContentType from "./contentType.ts"
import { SearchQuery } from "./types.ts"

View File

@ -1,9 +1,12 @@
import { Hono } from "hono/mod.ts"
import { Hono } from "npm:hono"
import { logger } from 'npm:hono/logger'
import { SearchQuery } from "./helpers/types.ts"
import Search from "./helpers/search.ts"
const app = new Hono()
app.use('*', logger())
app.onError((err, c) => {
console.error(err)
return c.json({ error: err.message }, 500)