Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
84 changes: 0 additions & 84 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug 报告 🐛
description: 汇报一个BUG
labels: [ "bug" ]
labels: ['bug']
assignees:
- Mr-Quin
body:
Expand Down Expand Up @@ -40,7 +40,7 @@ body:

- type: markdown
attributes:
value: "## 运行环境"
value: '## 运行环境'

- type: dropdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 项目提问
description: 对项目功能有疑问
title: '[提问]'
labels: ["question"]
labels: ['question']
body:
- type: checkboxes
attributes:
Expand Down
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/功能请求.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ name: 功能请求
about: 有什么想法都可以提
title: ''
labels: enhancement

---

**功能说明**
简单描述需要的功能


**使用场景**
说明为什么需要这个功能


**其他内容**
其他可供参考的内容,如:

- 截图
- 其他有类似功能的项目
4 changes: 2 additions & 2 deletions .github/workflows/cloudflare-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
append_var WATCH_ROOM_EXTERNAL_SERVER_AUTH "${{ secrets.WATCH_ROOM_EXTERNAL_SERVER_AUTH }}"
append_var WATCH_ROOM_EXTERNAL_SERVER_URL "${{ secrets.WATCH_ROOM_EXTERNAL_SERVER_URL }}"
append_var WATCH_ROOM_SERVER_TYPE "${{ secrets.WATCH_ROOM_SERVER_TYPE }}"

echo "Updated wrangler.toml:"
cat wrangler.toml

Expand Down Expand Up @@ -185,4 +185,4 @@ jobs:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: deploy
packageManager: pnpm
wranglerVersion: "4.60.0"
wranglerVersion: '4.60.0'
8 changes: 4 additions & 4 deletions .github/workflows/docker-image-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
type: string
push:
# 监听 dev 分支的推送
branches: [ dev ]
branches: [dev]
# 取消了 pull_request 触发,因为它通常不应该触发构建和推送镜像的操作
# 如果确实需要,可以重新加回来
# pull_request:
Expand Down Expand Up @@ -65,10 +65,10 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# 这个步骤不再需要,因为我们直接用 github.repository_owner
# - name: Set lowercase repository owner ...

# 更改:使用动态镜像名和更强大的标签逻辑
- name: Extract metadata
id: meta
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
# 更改:使用从 meta 生成的所有标签来创建 manifest
# 将逗号分隔的标签列表转换为 ' -t <tag1> -t <tag2> ...' 的格式
FORMATTED_TAGS=$(echo "${{ steps.meta.outputs.tags }}" | sed 's/,/ -t /g')

docker buildx imagetools create -t $FORMATTED_TAGS \
$(printf '${{ env.IMAGE_NAME }}@sha256:%s ' *)

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
default: 'latest'
type: string
push:
branches: [ main, master ]
branches: [main, master]
pull_request:
branches: [ main, master ]
branches: [main, master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
6 changes: 5 additions & 1 deletion .prettierrc.js → .prettierrc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module.exports = {
import type { Config } from 'prettier';

const config: Config = {
arrowParens: 'always',
singleQuote: true,
jsxSingleQuote: true,
tabWidth: 2,
semi: true,
};

export default config;
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ ENV DOCKER_ENV=true
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
# 从构建器中复制 scripts 目录
COPY --from=builder --chown=nextjs:nodejs /app/scripts ./scripts
# 从构建器中复制 start.js
COPY --from=builder --chown=nextjs:nodejs /app/start.js ./start.js
# 从构建器中复制自定义 server.js(包含 Socket.IO 支持)
COPY --from=builder --chown=nextjs:nodejs /app/server.js ./server.js
# 从构建器中复制 TypeScript 启动入口
COPY --from=builder --chown=nextjs:nodejs /app/start.ts ./start.ts
# 从构建器中复制自定义 server.ts(包含 Socket.IO 支持)
COPY --from=builder --chown=nextjs:nodejs /app/server.ts ./server.ts
# 从构建器中复制 public 和 .next/static 目录
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
Expand All @@ -66,5 +66,5 @@ USER nextjs

EXPOSE 3000

# 使用自定义启动脚本,先预加载配置再启动服务器
CMD ["node", "start.js"]
# 使用自定义 TypeScript 启动脚本,先预加载配置再启动服务器
CMD ["./node_modules/.bin/tsx", "start.ts"]
Loading