Skip to content

Commit a248b60

Browse files
committed
Merge branch 'development'
2 parents 14afa1b + ca244c0 commit a248b60

File tree

10 files changed

+2516
-1925
lines changed

10 files changed

+2516
-1925
lines changed

apps/cron/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20.12.0-alpine AS base
1+
FROM node:20.16.0-alpine AS base
22
RUN apk update
33
RUN apk add --no-cache libc6-compat
44

@@ -45,7 +45,7 @@ COPY --from=pruner /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
4545
COPY --from=pruner /app/out/json/ ./
4646
COPY --from=pruner /app/out/full/ ./
4747

48-
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
48+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prefer-frozen-lockfile
4949

5050
RUN pnpm --filter @packages/database prisma:generate
5151
RUN pnpm --filter ${APP_NAME} ssm pull -e ${DOCKER_ENV}

apps/cron/src/services/PostReadService/index.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ export class PostReadService implements Service {
4040
const postRead = await this.findById(postReadId)
4141

4242
if (!postRead) {
43-
throw new NotFoundError('Not found PostRead')
43+
console.log(`Not found postReadId: ${postReadId}`)
44+
return
4445
}
4546

4647
await this.db.postRead.delete({

apps/cron/src/services/PostService/index.mts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,18 @@ export class PostService implements Service {
179179
): Promise<{ isSpam: boolean; reason: string }> {
180180
const includesCN = /[\u4e00-\u9fa5]/.test(text)
181181
const includesKR = /[-|-|-]/.test(text)
182+
const includesVN = /[àáâãèéêìíòóôõùúýăđĩũơưế]/.test(
183+
text,
184+
)
182185

183186
if (includesCN && !includesKR) {
184187
return { isSpam: true, reason: 'includesCN' }
185188
}
186189

190+
if (includesVN && !includesKR) {
191+
return { isSpam: true, reason: 'includesVN' }
192+
}
193+
187194
let replaced = text.replace(/```([\s\S]*?)```/g, '') // remove code blocks
188195
// replace image markdown
189196
replaced = replaced.replace(/!\[([\s\S]*?)\]\(([\s\S]*?)\)/g, '')

apps/server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20.12.0-alpine AS base
1+
FROM node:20.16.0-alpine AS base
22
RUN apk update
33
RUN apk add --no-cache libc6-compat
44

apps/server/src/services/PostService/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export class PostService implements Service {
258258
throw new BadRequestError('Invalid timeframe')
259259
}
260260

261-
if (timeframe === 'year' && offset > 1000) {
261+
if (timeframe === 'year' && (offset > 1000 || limit > 20)) {
262262
console.log('Detected GraphQL Abuse', ip)
263263
return []
264264
}

apps/web/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20.12.0-alpine AS base
1+
FROM node:20.16.0-alpine AS base
22

33
RUN corepack enable
44

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
"@packages/tsconfig": "workspace:*",
3636
"@types/eslint": "^9.6.0",
3737
"@types/eslint__js": "^8.42.3",
38-
"@types/node": "^20.16.1",
39-
"@typescript-eslint/eslint-plugin": "^7.18.0",
40-
"@typescript-eslint/parser": "^7.18.0",
38+
"@types/node": "^20.14.0",
39+
"@typescript-eslint/eslint-plugin": "^8.3.0",
40+
"@typescript-eslint/parser": "^8.3.0",
4141
"eslint": "^9.9.0",
4242
"husky": "^9.1.4",
4343
"jiti": "^1.21.6",

packages/commonjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"dependencies": {
2121
"@graphql-tools/graphql-file-loader": "^8.0.1",
2222
"@graphql-tools/load": "^8.0.2",
23-
"@graphql-tools/merge": "^9.0.4",
24-
"axios": "^1.4.0"
23+
"@graphql-tools/merge": "^9.0.6",
24+
"axios": "^1.7.5"
2525
},
2626
"devDependencies": {
2727
"@types/node": "^20.14.0"

packages/eslint-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
"jiti": "^1.21.6",
2424
"prettier": "^3.2.5"
2525
}
26-
}
26+
}

0 commit comments

Comments
 (0)