Skip to content

Commit 7538bef

Browse files
committed
Merge branch 'development'
2 parents eba2482 + 18a0755 commit 7538bef

File tree

1,496 files changed

+44958
-20953
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,496 files changed

+44958
-20953
lines changed

Diff for: .dockerignore

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
node_modules
2+
.git
3+
.gitignore
4+
.out
5+
*.md
6+
7+
docker-compose.*
8+
9+
/**/**/.DS_Store
10+
/**/**/*.md
11+
/**/**/node_modules
12+
/**/**/dist
13+
/**/**/.next
14+
/**/**/.git
15+
/**/**/.prettierrc
16+
/**/**/.env
17+
/**/**/.env.*
18+
/**/**/.dockerignore
19+
/**/**/.eslintrc
20+
/**/**/.eslintrc.*
21+
/**/**/.eslintignore
22+
/**/**/.prettierrc
23+
/**/**/.prettierignore
24+
/**/**/.vscode
25+
/**/**/.eslint.cjs
26+
/**/**/jest.*.*
27+
28+
/packages/not-shared

Diff for: .github/workflows/velog-cron-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Velog Server build workflow
1+
name: Velog cron build workflow
22

33
on:
44
pull_request:
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: [18.18.2]
14+
node-version: [20.11.1]
1515
defaults:
1616
run:
1717
working-directory: './packages/velog-cron'

Diff for: .github/workflows/velog-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
node-version: [18.16]
17+
node-version: [20.11.1]
1818
steps:
1919
- uses: actions/checkout@v3
2020
- uses: pnpm/action-setup@v2

Diff for: .github/workflows/velog-server-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: [18.18.2]
14+
node-version: [20.11.1]
1515
defaults:
1616
run:
1717
working-directory: './packages/velog-server'

Diff for: .github/workflows/velog-web-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
node-version: [18.18.2]
15+
node-version: [20.11.1]
1616
defaults:
1717
run:
1818
working-directory: './packages/velog-web'

Diff for: .gitignore

+19-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
1-
.DS_Store
1+
# IDE
22
.idea
3-
./dist
3+
4+
# Else
5+
.DS_Store
6+
**/.DS_Store
7+
8+
# build
49
**/node_modules/
10+
**/dist/
11+
**/build/**
12+
**/.next/**
513

14+
# env
615
.env
716
.env.*
17+
**/env.*
18+
!**/env.ts
19+
!**/env.mts
820
!**/**/.env.example
921

10-
.vscode
22+
# turbo
23+
**/.turbo
24+
out
25+
# Turborepo
26+
.turbo

Diff for: .husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
pnpm lint-staged
4+
# pnpm lint-staged

Diff for: .lintstagedrc.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default {
2-
'*.{md,yml,json,js,ts,jsx,tsx,mjs,mts}': 'prettier --write',
2+
'*.{md,yml,json,js,ts,jsx,tsx,mjs,mts}': 'pnpm -r lint',
33
}

Diff for: .npmrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
loglevel=error
1+
loglevel=error
2+
public-hoist-pattern[]=*prisma*

Diff for: .prettierignore

-11
This file was deleted.

Diff for: .vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["esbenp.prettier-vscode", "aaron-bond.better-comments"]
3+
}

Diff for: .vscode/settings.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.formatOnType": false, // required
4+
"editor.formatOnPaste": true, // optional
5+
"editor.formatOnSave": true, // optional
6+
"editor.formatOnSaveMode": "file", // required to format on save
7+
"files.autoSave": "afterDelay", // optional but recommended,
8+
"eslint.workingDirectories": [{ "pattern": "./apps/*/" }, { "pattern": "./packages/*/" }]
9+
}

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Chaf, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Diff for: apps/book-server/.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Ignore node_modules
2+
node_modules
3+
# Ignore dist
4+
dist
5+
6+
# Ignore build process files
7+
books/*
8+
!books/base
File renamed without changes.

Diff for: apps/book-server/books/base/next-env.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

Diff for: apps/book-server/books/base/package.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "@packages/nextra",
3+
"version": "0.1.0",
4+
"private": true,
5+
"type": "module",
6+
"scripts": {
7+
"dev": "next dev",
8+
"build": "next build",
9+
"start": "next start",
10+
"lint": "next lint"
11+
},
12+
"dependencies": {
13+
"next": "14.2.5",
14+
"nextra": "2.13.4",
15+
"nextra-theme-docs": "2.13.4",
16+
"prettier": "3.2.5",
17+
"react": "18",
18+
"react-dom": "18"
19+
},
20+
"devDependencies": {
21+
"@types/node": "20.12.5",
22+
"@types/react": "18",
23+
"@types/react-dom": "18",
24+
"typescript": "5"
25+
}
26+
}
File renamed without changes.

Diff for: apps/book-server/books/base/public/favicon.ico

25.3 KB
Binary file not shown.

Diff for: apps/book-server/codegen.mts

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import type { CodegenConfig } from '@graphql-codegen/cli'
2+
3+
const config: CodegenConfig = {
4+
overwrite: true,
5+
schema: 'src/graphql/*.gql',
6+
documents: undefined,
7+
hooks: {
8+
afterOneFileWrite: ['prettier --write'],
9+
},
10+
emitLegacyCommonJSImports: false,
11+
generates: {
12+
'src/graphql/generated.ts': {
13+
plugins: [
14+
'typescript',
15+
'typescript-resolvers',
16+
{
17+
add: {
18+
content: `/* eslint-disable @typescript-eslint/ban-types */`,
19+
},
20+
},
21+
],
22+
config: {
23+
enumsAsTypes: true,
24+
skipTypename: true,
25+
contextType: '../common/interfaces/graphql.mjs#GraphQLContext',
26+
mappers: {
27+
Book: '@packages/database/velog-book-mongo#Book as BookModel',
28+
Writer: '@packages/database/velog-book-mongo#Writer as WriterModel',
29+
Page: '@packages/database/velog-book-mongo#Page as PageModel',
30+
},
31+
inputMaybeValue: 'T | null',
32+
maybeValue: 'T | null',
33+
scalars: {
34+
Date: 'Date',
35+
JSON: 'Record<string, any>',
36+
ID: 'string',
37+
Void: 'void',
38+
PositiveInt: 'number',
39+
},
40+
},
41+
},
42+
},
43+
}
44+
45+
export default config

Diff for: apps/book-server/docker-compose.sh

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
if [ -z "$AWS_PROFILE" ]; then
4+
echo "AWS_PROFILE이 설정되어 있지 않습니다."
5+
exit 1
6+
fi
7+
8+
# AWS 프로필 설정 읽기
9+
export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id --profile $AWS_PROFILE)
10+
export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key --profile $AWS_PROFILE)
11+
export TURBO_TEAM=$(aws configure get turbo_team --profile $AWS_PROFILE)
12+
export TURBO_TOKEN=$(aws configure get turbo_token --profile $AWS_PROFILE)
13+
export TURBO_REMOTE_CACHE_SIGNATURE_KEY=$(aws configure get turbo_remote_cache_signature_key --profile $AWS_PROFILE)
14+
15+
# echo "AWS 프로필 설정이 완료되었습니다. $AWS_PROFILE 프로필을 사용합니다."
16+
# echo "AWS_ACCESSKEY_ID: $AWS_ACCESS_KEY_ID"
17+
# echo "AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY"
18+
# echo "TURBO_TEAM: $TURBO_TEAM"
19+
# echo "TURBO_TOKEN: $TURBO_TOKEN"
20+
# echo "TURBO_REMOTE_CACHE_SIGNATURE_KEY: $TURBO_REMOTE_CACHE_SIGNATURE_KEY"
21+
22+
docker-compose up --build

Diff for: apps/book-server/env/.env.example

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
PORT=
2+
MONGO_URL=
3+
REDIS_HOST=
4+
REDIS_PORT=
5+
DISCORD_BOT_TOKEN=
6+
DISCORD_ERROR_CHANNEL=
7+
DISCORD_IMAGE_CHANNEL=
8+
VELOG_BOOK_API_KEY=
9+
BOOK_BUCKET_URL=
10+
BOOK_BUCKET_NAME=
11+
COOKIE_SECRET_KEY=
12+
JWT_SECRET_KEY=
13+
CLOUDFLARE_R2_ACCOUNT_ID=
14+
CLOUDFLARE_R2_TOKEN_NAME=
15+
CLOUDFLARE_R2_ACCESS_KEY_ID=
16+
CLOUDFLARE_R2_SECRET_ACCESS_KEY=
17+
CLOUDFLARE_R2_CDN=

Diff for: apps/book-server/eslint.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import baseConfig from '@packages/eslint-config/base.mjs'
2+
import { resolve } from 'node:path'
3+
4+
const projectPath = resolve(process.cwd())
5+
6+
/** @type {Linter.Config} */
7+
export default [
8+
...baseConfig(projectPath),
9+
{
10+
ignores: ['node_modules', 'books/*', 'dist'],
11+
},
12+
]

0 commit comments

Comments
 (0)