Skip to content

Commit e542a34

Browse files
authored
Merge pull request #13 from FOSWLY/dev
2.1.4
2 parents 9c1e143 + 2834ede commit e542a34

File tree

5 files changed

+17
-24
lines changed

5 files changed

+17
-24
lines changed

bun.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 2.1.4
2+
3+
- Убрана установка устаревших значений в конфиге cors
4+
- Удалена дублирующаяся логика создания папки logs
5+
16
# 2.1.3
27

38
- Изменен метод установки cors на установку с помощью библиотеки `@elysiajs/cors`

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "translate-backend",
3-
"version": "2.1.3",
3+
"version": "2.1.4",
44
"author": "Toil",
55
"repository": {
66
"type": "git",
@@ -27,7 +27,7 @@
2727
"eslint-plugin-oxlint": "^0.16.6",
2828
"husky": "^9.1.7",
2929
"oxlint": "^0.16.6",
30-
"typescript-eslint": "^8.29.1"
30+
"typescript-eslint": "^8.30.1"
3131
},
3232
"module": "src/index.js",
3333
"bun-create": {

src/config.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ export default Value.Parse(ConfigSchema, {
1515
contact_email: Bun.env.APP_CONTACT_EMAIL,
1616
allowUnsafeEval: Bun.env.ALLOW_UNSAFE_EVAL === "true",
1717
},
18-
cors: {
19-
"Access-Control-Allow-Origin": "*",
20-
"Access-Control-Allow-Headers": "*",
21-
"Access-Control-Allow-Methods": "GET, POST, OPTIONS",
22-
"Access-Control-Max-Age": "86400",
23-
},
18+
cors: {},
2419
logging: {
2520
level: Bun.env.NODE_ENV === "production" ? "info" : "debug",
2621
logPath: path.join(__dirname, "..", "logs"),

src/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import fs from "node:fs/promises";
2-
31
import { Elysia } from "elysia";
42
import { swagger } from "@elysiajs/swagger";
53
import { cors } from "@elysiajs/cors";
@@ -14,11 +12,6 @@ import detect from "./controllers/detect";
1412
import getLangs from "./controllers/getLangs";
1513
import { LibreTransalteDisabledError } from "./errors";
1614

17-
if (!(await fs.exists(config.logging.logPath))) {
18-
await fs.mkdir(config.logging.logPath, { recursive: true });
19-
log.info(`Created log directory`);
20-
}
21-
2215
const app = new Elysia({
2316
prefix: "/v2",
2417
})

0 commit comments

Comments
 (0)