From 9c79b6f06341cbedd295bfeea6041baec216afbd Mon Sep 17 00:00:00 2001 From: m1sk9 Date: Thu, 15 Feb 2024 02:09:49 +0900 Subject: [PATCH 1/2] feat: add `/rules` and `/rules-ja` endpoint --- README.md | 2 ++ main.ts | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b2f7a55..bd49209 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ with [Deno Deploy](https://deno.com/deploy). | `/x` | Pulsate X | | `/youtube` | Pulsate YouTube | | `/community` | Pulsate Community (GitHub Org Discussion) | +| `/rules` | Pulsate Code of Conduct | +| `/rules-ja` | Pulsate Code of Conduct (Japanese) | - When redirecting, a status code of [`302`](https://developer.mozilla.org/ja/docs/Web/HTTP/Status/302) is returned diff --git a/main.ts b/main.ts index 49cb4b9..52a30d6 100644 --- a/main.ts +++ b/main.ts @@ -4,7 +4,7 @@ import { logger, poweredBy } from 'hono/middleware'; const app = new Hono(); app.use('*', logger(), poweredBy()); -// todo: faviconを提供する +// TODO: add favicon // app.all('/favicon.ico', serveStatic('./public/favicon.ico')); app.get('/', (c) => { @@ -31,4 +31,20 @@ app.get('/community', (c) => { return c.redirect('https://github.com/orgs/pulsate-dev/discussions', 302); }); +// TODO: replace pulsate.dev/code-of-conduct +app.get('/rules', (c) => { + return c.redirect( + 'https://github.com/pulsate-dev/.github/blob/main/CODE_OF_CONDUCT.md', + 302, + ); +}); + +// TODO: replace pulsate.dev/code-of-conduct-ja +app.get('/rules-ja', (c) => { + return c.redirect( + 'https://github.com/pulsate-dev/.github/blob/main/CODE_OF_CONDUCT_JA.md', + 302, + ); +}); + Deno.serve(app.fetch); From 3a8e76d560871644c8dc4c3d919b66cf93fb6424 Mon Sep 17 00:00:00 2001 From: m1sk9 Date: Thu, 15 Feb 2024 02:11:53 +0900 Subject: [PATCH 2/2] deps: bump hono v4.0.2 Deno's design philosophy forces us to update manually... --- deno.json | 4 +-- deno.lock | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 92 insertions(+), 3 deletions(-) diff --git a/deno.json b/deno.json index dc1091f..f94b6e8 100644 --- a/deno.json +++ b/deno.json @@ -13,7 +13,7 @@ "semiColons": true }, "imports": { - "hono/mod": "https://deno.land/x/hono@v3.7.6/mod.ts", - "hono/middleware": "https://deno.land/x/hono@v3.7.6/middleware.ts" + "hono/mod": "https://deno.land/x/hono@v4.0.2/mod.ts", + "hono/middleware": "https://deno.land/x/hono@v4.0.2/middleware.ts" } } diff --git a/deno.lock b/deno.lock index 1981c63..6e21d50 100644 --- a/deno.lock +++ b/deno.lock @@ -60,6 +60,95 @@ "https://deno.land/x/hono@v3.7.6/utils/types.ts": "cbd6f37aa04dc920ca200883695dc92e634e4013485f64a02b7c67443c7f6ad0", "https://deno.land/x/hono@v3.7.6/utils/url.ts": "5fc3307ef3cb2e6f34ec2a03e3d7f2126c6a9f5f0eab677222df3f0e40bd7567", "https://deno.land/x/hono@v3.7.6/validator/index.ts": "6c986e8b91dcf857ecc8164a506ae8eea8665792a4ff7215471df669c632ae7c", - "https://deno.land/x/hono@v3.7.6/validator/validator.ts": "afa5e52495e0996fbba61996736fab5c486590d72d376f809e9f9ff4e0c463e9" + "https://deno.land/x/hono@v3.7.6/validator/validator.ts": "afa5e52495e0996fbba61996736fab5c486590d72d376f809e9f9ff4e0c463e9", + "https://deno.land/x/hono@v4.0.2/adapter/deno/serve-static.ts": "dc857afc2c2bac7668d2625e2d2970acd1affc46d5ffbe0db163412f5cee708f", + "https://deno.land/x/hono@v4.0.2/adapter/deno/ssg.ts": "49d73dd0d351fc52a54bfc8094096aff957f5a955a3eb976844ed8d88903bc0f", + "https://deno.land/x/hono@v4.0.2/client/client.ts": "9aa632e0df3bb1e10081a29577117c92b65f27252c56d2474ddba2113f584848", + "https://deno.land/x/hono@v4.0.2/client/index.ts": "30def535310a37bede261f1b23d11a9758983b8e9d60a6c56309cee5f6746ab2", + "https://deno.land/x/hono@v4.0.2/client/utils.ts": "b61b11614aa976e4b6f829642528bd78bf8d19a72aa57426e40eb21507a69c0a", + "https://deno.land/x/hono@v4.0.2/compose.ts": "37d6e33b7db80e4c43a0629b12fd3a1e3406e7d9e62a4bfad4b30426ea7ae4f1", + "https://deno.land/x/hono@v4.0.2/context.ts": "164a047af74eea44c4e2b8fb9eb7a27c82fc44fe6ea4bc864bf1d23f8f5e3598", + "https://deno.land/x/hono@v4.0.2/helper.ts": "a8df0b65838177e7e0ab30fc496cde22c9b6aab237725797b1bdec332971470b", + "https://deno.land/x/hono@v4.0.2/helper/accepts/accepts.ts": "46330f2ff384b266ab2227f7943366c09d752c9b58e2908e7b7726548e8954d3", + "https://deno.land/x/hono@v4.0.2/helper/accepts/index.ts": "88a18cb5f7b15ec2bd515b6fbf5a2a8b5f77d1edbd6f7e1632afe5d755b2cf50", + "https://deno.land/x/hono@v4.0.2/helper/adapter/index.ts": "5a4ca736487a2a8303bdac9fff710eae38e6f39ed70eb171eed78e5f64da84df", + "https://deno.land/x/hono@v4.0.2/helper/cookie/index.ts": "9adc57af5723f16d52ec1162838ac3c77dc2c8b9e216762e7c68106c7468cc77", + "https://deno.land/x/hono@v4.0.2/helper/css/common.ts": "596f3e777c11a73be52585c2140e80f8ad87f1ef3c483514480e11fb7394e986", + "https://deno.land/x/hono@v4.0.2/helper/css/index.ts": "f91b6c473f033c420077554bcc8c11635194e3ee49c974c22bbacf2b3449b63c", + "https://deno.land/x/hono@v4.0.2/helper/dev/index.ts": "39309b1ea098feaf03dd564ad23290d11e0aa495f3dd64400b3affcf79937f72", + "https://deno.land/x/hono@v4.0.2/helper/factory/index.ts": "da87032bd93785827448e5d1369c90f6d453cdd12ded597d4ca4051e3309e468", + "https://deno.land/x/hono@v4.0.2/helper/html/index.ts": "b98a9a44a3d50526f82b450231888f1c0904291d535c18d26c0e93dce32004cc", + "https://deno.land/x/hono@v4.0.2/helper/ssg/index.ts": "18cc879553c9883d97585cd5798359c69efbbed823ddbedf57817b32dcefae57", + "https://deno.land/x/hono@v4.0.2/helper/ssg/utils.ts": "90ff5f2f9a57e7cf2f76362ce0b2179677f46390ddf0cce0f5c2023db179d847", + "https://deno.land/x/hono@v4.0.2/helper/streaming/index.ts": "e4955c04cb5fe4d65abec256ff3f598c87958a1cfd9eece1d6de1b56d16c7723", + "https://deno.land/x/hono@v4.0.2/helper/streaming/sse.ts": "c6268c340f04fa677c7dadfd4beb96cd847048db4894c1204bb33fdbfc86e21f", + "https://deno.land/x/hono@v4.0.2/helper/streaming/stream.ts": "bb8eee53fadf62fb9c4b4f3ffa2f23ee21bf2337121a6811a5fe18bbbcbe6564", + "https://deno.land/x/hono@v4.0.2/helper/streaming/text.ts": "df8e941f8f1605b8ee74e7176fc013716203a6961c7b69dc304f5826dfb2383c", + "https://deno.land/x/hono@v4.0.2/helper/testing/index.ts": "bc49c049aa0d6426417e3d1a2f52a471a09edb1fb8610b7545eae1968e7d7874", + "https://deno.land/x/hono@v4.0.2/hono-base.ts": "d110b1f564958f95bbc2be2c7fea522938f948ccec63830d1197beec11cdc338", + "https://deno.land/x/hono@v4.0.2/hono.ts": "23edd0140bf0bd5a68c14ae96e5856a5cec6b844277e853b91025e91ea74f416", + "https://deno.land/x/hono@v4.0.2/http-exception.ts": "0dc357bbf1510f59cdfc35aad569df97e5652f7406f0693437fe140383d8d9c0", + "https://deno.land/x/hono@v4.0.2/jsx/base.ts": "a744e48717677dfe665163ba95b71a7d0d96fbd569ea447aa0bc4195e1aa91fd", + "https://deno.land/x/hono@v4.0.2/jsx/components.ts": "c4013a09b0de879cb4253457808017cdc6ae76961c0b7a4827b87e560538a895", + "https://deno.land/x/hono@v4.0.2/jsx/constants.ts": "03dbf805f4d07e3b34ab05ac84f3c0cb4fbafb2096fba7789a5f6226ca6f21ad", + "https://deno.land/x/hono@v4.0.2/jsx/context.ts": "2b7a86e6b35da171fab27aa05f09748bb3eba64b26c037ea1da655c07e8f6bc1", + "https://deno.land/x/hono@v4.0.2/jsx/dom/components.ts": "733da654edb3d4c178a4479649fac2c64e79069e37e848add0c3a49f90e7f2d7", + "https://deno.land/x/hono@v4.0.2/jsx/dom/context.ts": "39cd1108f0933934075fd88ef98139b0f29cce35b5d30d5fed2231daaa19c208", + "https://deno.land/x/hono@v4.0.2/jsx/dom/css.ts": "476699080c11fa16230e3fd59b6faf551e5d771c2998b4bf03368b3bc1f5a0e0", + "https://deno.land/x/hono@v4.0.2/jsx/dom/jsx-dev-runtime.ts": "266a61edb91f596f8581218c2afb253449fa700e069298b5a3e96ee064a57183", + "https://deno.land/x/hono@v4.0.2/jsx/dom/jsx-runtime.ts": "6a50a65306771a9000030f494d92a5fdeeb055112e0126234b2fd9179de1d4f5", + "https://deno.land/x/hono@v4.0.2/jsx/dom/render.ts": "46b6cbf176aae20d8bac1af7f87934e5a6b07b1422667851661906418ce86fa5", + "https://deno.land/x/hono@v4.0.2/jsx/hooks/index.ts": "aa5bf89ca6f27b000858da32098c3a107dd0a59ba0efce69b3256b21c34ae46f", + "https://deno.land/x/hono@v4.0.2/jsx/index.ts": "7ff75df12923a67c2fc4c2d06afc6db66ae95f854f091f6aa614b3e13f7d6ba8", + "https://deno.land/x/hono@v4.0.2/jsx/streaming.ts": "7f2255d54a69e98121dc02820be8832a880d224ce07f9d472f2a287d3906bb42", + "https://deno.land/x/hono@v4.0.2/jsx/types.ts": "880971bd1e0704a6fba6b786ca596cbe23fc06e36c506f42ea17f84f9879f278", + "https://deno.land/x/hono@v4.0.2/jsx/utils.ts": "7b9d84ce478c66a5f4709dc3a873ac7104ba3427597683221827abec2761da0e", + "https://deno.land/x/hono@v4.0.2/middleware.ts": "782368901c77bf77410aa5bebbaba5ac9dfaae519a4d3d2753180a45e8b1c62f", + "https://deno.land/x/hono@v4.0.2/middleware/basic-auth/index.ts": "cb9c6397f291612e2fa2f678e1cd85d427cf4395838d558a9fa2c99727f20fb0", + "https://deno.land/x/hono@v4.0.2/middleware/bearer-auth/index.ts": "1bfe631db1661cd342a2220614af5e21455ebea11b8c3ed5f6df7ef8d02b9a54", + "https://deno.land/x/hono@v4.0.2/middleware/cache/index.ts": "1294ca78a78d0ec279b8b8728837120458eeb429d774715777a412f190950312", + "https://deno.land/x/hono@v4.0.2/middleware/compress/index.ts": "98c403a5fe7e9c5f5d776350b422b0a125fb34696851b8b14f825b9b7b06f2ac", + "https://deno.land/x/hono@v4.0.2/middleware/cors/index.ts": "69e208e2bfd6345f14892e59ea817818373b3ebd74163177d687cd47ddbe1f6c", + "https://deno.land/x/hono@v4.0.2/middleware/csrf/index.ts": "077bb0ce299d79d0d232cb9e462aaa4eaa901164f1310f74a7630f7e6cfe74e8", + "https://deno.land/x/hono@v4.0.2/middleware/etag/index.ts": "3392aabea4d02dfec51455c5919bff9aad76538b9fde375dd542fbc3f389dd3a", + "https://deno.land/x/hono@v4.0.2/middleware/jsx-renderer/index.ts": "07d5e2a15887c34b0b581a3c8babb428ec9dcff9a11877e4ab20ae7db8902ad6", + "https://deno.land/x/hono@v4.0.2/middleware/jwt/index.ts": "6b34740ff079f92873ee586bb6bf495edd4095ba2b99828ddd850d2de079acd0", + "https://deno.land/x/hono@v4.0.2/middleware/logger/index.ts": "4baf9217b61f5e9e937c3e4e6cd87508c83603fcee77c33edba0a6ae2cc41ccd", + "https://deno.land/x/hono@v4.0.2/middleware/powered-by/index.ts": "6faba0cf042278d60b317b690640bb0b58747690cf280fa09024424c5174e66d", + "https://deno.land/x/hono@v4.0.2/middleware/pretty-json/index.ts": "2216ce4c9910be009fecac63367c3626b46137d4cf7cb9a82913e501104b4a88", + "https://deno.land/x/hono@v4.0.2/middleware/secure-headers/index.ts": "24cf3544002e882972842800bce223738b32c9c84bef7f74892e994819765f84", + "https://deno.land/x/hono@v4.0.2/middleware/timing/index.ts": "241702aa10ab66cc832e8b556c57c236f3bf338a8817d802cb142eae0f852582", + "https://deno.land/x/hono@v4.0.2/mod.ts": "90114a97be9111b348129ad0143e764a64921f60dd03b8f3da529db98a0d3a82", + "https://deno.land/x/hono@v4.0.2/request.ts": "9c8061eaf4373aa122a77d1aa8e888397425bc5d78bc17c87a2c861375c4f0b3", + "https://deno.land/x/hono@v4.0.2/router.ts": "880316f561918fc197481755aac2165fdbe2f530b925c5357a9f98d6e2cc85c7", + "https://deno.land/x/hono@v4.0.2/router/linear-router/index.ts": "8a2a7144c50b1f4a92d9ee99c2c396716af144c868e10608255f969695efccd0", + "https://deno.land/x/hono@v4.0.2/router/linear-router/router.ts": "9f8b82c2ba63aebafa58e2e0256490d34d254ebbe8a57ca9ce3ba23709bece3a", + "https://deno.land/x/hono@v4.0.2/router/pattern-router/index.ts": "304a66c50e243872037ed41c7dd79ed0c89d815e17e172e7ad7cdc4bc07d3383", + "https://deno.land/x/hono@v4.0.2/router/pattern-router/router.ts": "e42b3c45545da9120f4ac9cb333eed6f230ed5cee3fa52949d2c577a37517046", + "https://deno.land/x/hono@v4.0.2/router/reg-exp-router/index.ts": "52755829213941756159b7a963097bafde5cc4fc22b13b1c7c9184dc0512d1db", + "https://deno.land/x/hono@v4.0.2/router/reg-exp-router/node.ts": "5b3fb80411db04c65df066e69fedb2c8c0844753c2633d703336de84d569252c", + "https://deno.land/x/hono@v4.0.2/router/reg-exp-router/router.ts": "512c43528739b12aff7c1f45b94a5459505ca88a47140a7d6abe0180cfc1ad00", + "https://deno.land/x/hono@v4.0.2/router/reg-exp-router/trie.ts": "852ce7207e6701e47fa30889a0d2b8bfcd56d8862c97e7bc9831e0a64bd8835f", + "https://deno.land/x/hono@v4.0.2/router/smart-router/index.ts": "74f9b4fe15ea535900f2b9b048581915f12fe94e531dd2b0032f5610e61c3bef", + "https://deno.land/x/hono@v4.0.2/router/smart-router/router.ts": "f1848a2a1eefa316a11853ae12e749552747771fb8a11fe713ae04ea6461140b", + "https://deno.land/x/hono@v4.0.2/router/trie-router/index.ts": "3eb75e7f71ba81801631b30de6b1f5cefb2c7239c03797e2b2cbab5085911b41", + "https://deno.land/x/hono@v4.0.2/router/trie-router/node.ts": "04d2eac912cc367b95545ce10d889134fc37be74ca729a7f0772970f37b29d11", + "https://deno.land/x/hono@v4.0.2/router/trie-router/router.ts": "54ced78d35676302c8fcdda4204f7bdf5a7cc907fbf9967c75674b1e394f830d", + "https://deno.land/x/hono@v4.0.2/utils/body.ts": "1c7013f83bbef8216b3d862111efd5a183eaa29e86decf9a7eec6cdf25757e93", + "https://deno.land/x/hono@v4.0.2/utils/buffer.ts": "9066a973e64498cb262c7e932f47eed525a51677b17f90893862b7279dc0773e", + "https://deno.land/x/hono@v4.0.2/utils/cookie.ts": "a8d61878bc6eb338d17758e2b5b47512ac1ced8d824fd4ff7b637b091cc7b28f", + "https://deno.land/x/hono@v4.0.2/utils/crypto.ts": "bda0e141bbe46d3a4a20f8fbcb6380d473b617123d9fdfa93e4499410b537acc", + "https://deno.land/x/hono@v4.0.2/utils/encode.ts": "311dfdfae7eb0b6345e9680f7ebbb3a692e872ed964e2029aca38567af8d1f33", + "https://deno.land/x/hono@v4.0.2/utils/filepath.ts": "77b01ccb799dcd3ed60ac2e9726e0b786b47f33308533b5ff9b6430ba8e9299c", + "https://deno.land/x/hono@v4.0.2/utils/handler.ts": "2940f60d3fdae3df1ebde7f88c0f703c64bb1311c2c0a60f97e80a57b5690393", + "https://deno.land/x/hono@v4.0.2/utils/html.ts": "6ea4f6bf41587a51607dff7a6d2865ef4d5001e4203b07e5c8a45b63a098e871", + "https://deno.land/x/hono@v4.0.2/utils/jwt/index.ts": "5e4b82a42eb3603351dfce726cd781ca41cb57437395409d227131aec348d2d5", + "https://deno.land/x/hono@v4.0.2/utils/jwt/jwt.ts": "02ff7bbf1298ffcc7a40266842f8eac44b6c136453e32d4441e24d0cbfba3a95", + "https://deno.land/x/hono@v4.0.2/utils/jwt/types.ts": "1dd79fce49dcaf54511d9bca88f5ae508cef577225aa581c811b248dc9c7a121", + "https://deno.land/x/hono@v4.0.2/utils/mime.ts": "1e5db0919d2127995ec466dfd1ee637c3d63084f516ccbd3c6906ccf0d3f3c46", + "https://deno.land/x/hono@v4.0.2/utils/stream.ts": "fe5f539a79c476e6af39e2549fa06054ad3c7ff3cbfa2c4c752e879cdd3365d5", + "https://deno.land/x/hono@v4.0.2/utils/url.ts": "d9d307a495e7dfc6e916fbcfa74c2d8d23e8e685bddc5e6ebc9c0f784345a01a", + "https://deno.land/x/hono@v4.0.2/validator/index.ts": "6c986e8b91dcf857ecc8164a506ae8eea8665792a4ff7215471df669c632ae7c", + "https://deno.land/x/hono@v4.0.2/validator/validator.ts": "1a7b524292662e5219fd61a9872c2586aa23a2328800211a8fdc268b089f75f1" } }