Skip to content

Commit

Permalink
fixes dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasfroeller committed Sep 30, 2024
1 parent 649f5b5 commit 04e87b6
Show file tree
Hide file tree
Showing 6 changed files with 407 additions and 904 deletions.
Binary file modified bun.lockb
Binary file not shown.
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@
},
"dependencies": {
"@apollo/client": "^3.11.8",
"@bogeychan/elysia-logger": "^0.0.20",
"@bogeychan/elysia-logger": "^0.1.4",
"@elysiajs/bearer": "^1.1.2",
"@elysiajs/cors": "^1.0.2",
"@elysiajs/html": "^1.0.2",
"@elysiajs/cors": "^1.1.1",
"@elysiajs/html": "^1.1.1",
"@elysiajs/jwt": "^1.1.1",
"@elysiajs/static": "^1.0.2",
"@elysiajs/swagger": "^1.0.2",
"@octokit/graphql-schema": "^14.47.1",
"drizzle-orm": "^0.30.9",
"elysia": "^1.1.16",
"@elysiajs/static": "^1.1.1",
"@elysiajs/swagger": "^1.1.3",
"@octokit/graphql-schema": "^15.25.0",
"drizzle-orm": "^0.33.0",
"elysia": "^1.1.17",
"graphql": "^16.9.0",
"octokit": "^3.1.2",
"pg": "^8.11.5"
"octokit": "^4.0.2",
"pg": "^8.13.0"
},
"devDependencies": {
"@biomejs/biome": "^1.6.1",
"@octokit/types": "^12.6.0",
"@biomejs/biome": "^1.9.2",
"@octokit/types": "^13.6.0",
"@types/html-validator": "^5.0.6",
"@types/pg": "^8.11.5",
"bun-types": "^1.0.33",
"drizzle-kit": "^0.20.17",
"@types/pg": "^8.11.10",
"bun-types": "^1.1.29",
"drizzle-kit": "^0.24.2",
"html-validator": "^6.0.1"
},
"module": "src/index.js",
Expand Down
5 changes: 2 additions & 3 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ for (const path of ROOT_PATHS) {
}
export const API_FORWARD_ROUTES = new Elysia({ prefix: "" });
for (const path of API_PATHS) {
API_FORWARD_ROUTES.get(path, ({ set }) => {
set.status = 308;
set.redirect = `/${path}/${SWAGGER_PATH}`;
API_FORWARD_ROUTES.get(path, ({ redirect }) => {
return redirect(`/${path}/${SWAGGER_PATH}`);
});
}
23 changes: 5 additions & 18 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Elysia } from "elysia"; // https://elysiajs.com/introduction.html
import { cors } from "@elysiajs/cors"; // https://elysiajs.com/plugins/cors.html
import { staticPlugin } from "@elysiajs/static"; // https://github.com/elysiajs/elysia-static
import { html } from "@elysiajs/html"; // https://elysiajs.com/plugins/html.html
import { /* type InferContext, */ logger } from "@bogeychan/elysia-logger"; // https://www.npmjs.com/package/@bogeychan/elysia-logger
import { logger } from "@bogeychan/elysia-logger"; // https://www.npmjs.com/package/@bogeychan/elysia-logger

import {
API_FORWARD_ROUTES,
Expand All @@ -28,33 +28,20 @@ export const app = new Elysia()
origin: CORS_ORIGINS,
}),
)
// add logger back in, if it is updated, to work with the current version of Elysia
/* .use(
logger({
level: 'error',
customProps(ctx: InferContext<typeof app>) {
return {
params: ctx.params,
query: ctx.query
};
}
})
) */
.use(html())
.use(ROOT_ROUTES)

// VERSIONS
.use(API_FORWARD_ROUTES)
.group(SWAGGER_PATH, (app) =>
app // if no version is specified, redirect to the latest version
.get("", async ({ set }) => {
set.status = 308;
set.redirect = LATEST_SWAGGER_PATH;
.get("", async ({ redirect }) => {
return redirect(`/${LATEST_SWAGGER_PATH}`);
})
.get(
"/json",
async ({ set }) => {
set.redirect = `/${LATEST_SWAGGER_PATH}/json`;
async ({ redirect }) => {
return redirect(`/${LATEST_SWAGGER_PATH}/json`);
},
{
detail: {
Expand Down
6 changes: 3 additions & 3 deletions src/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const v1 = new Elysia({ prefix: `/${V1_PATH}` })
)
.use(
swagger({
scalarVersion: "1.17.11",
scalarVersion: "1.25.24",
path: SWAGGER_PATH,
exclude: [
...ROOT_PATHS,
Expand All @@ -46,7 +46,7 @@ export const v1 = new Elysia({ prefix: `/${V1_PATH}` })
title: "Propromo RestAPI Documentation",
description:
"A RestAPI for the scopes of the Github GraphqlAPI, that Propromo needs (latest).",
version: "1.0.10",
version: "1.0.11",
},
tags: [
{
Expand Down Expand Up @@ -77,4 +77,4 @@ export const v1 = new Elysia({ prefix: `/${V1_PATH}` })
},
},
}),
);
);
Loading

0 comments on commit 04e87b6

Please sign in to comment.