Skip to content

Commit

Permalink
Sync with dev@b7ee7ab (#263)
Browse files Browse the repository at this point in the history
* 更新了服务器分类下的插件和原版问题 (#223)

update doc

* 📃 docs(contributing): config markdown lint

* upd: vanilla.md -> pic link (#225)

* 一些更新 (#227)

* update doc

* update

* 更新

* fix

* Update plugins.md

* Update index.md

* 🐞 fix(actions): add pages check

close #226 #229

* edit workflow

* update pages-check

* Update pages-check.yml

* Update pages-check.yml

* Update README.md

* 💥 upd: visible

* 💥 upd: visible

* ✨ feat(assets): convert & tinify imgs

close #228

* fix expand transition

* fix a format issue

* ✨ feat(sidebar): add commons.md

* ✨ feat(upload crash): change upload crash

change upload crash link to point to /contribute/crash-report

* 🦄 refactor(data): use json data

dont use `.ts` file to handle data

* fix serval issue about analyzer, and bump MCLA to v0.5.0

* docs: add 在服务端运行仅客户端模组
close #231

* 🐞 fix(PWA): try to fix PWA

#232 WIP

* 🌈 style(style): edit style config

* 🌈 style(format): format files

* docs: 增加 无法链接到后端服务器 后端服务器正版验证未关闭 (#239)

* bump MCLA to v0.5.1 (#238)

Fix line number

* doc: 常见问题 插件无法链接到更新服务器 (#242)

* doc: 常见问题 插件无法链接到更新服务器

* Update docs/server/plugins.md

Co-authored-by: Kevin Z <zyxkad@gmail.com>

* Update docs/server/plugins.md

Co-authored-by: Kevin Z <zyxkad@gmail.com>

* Update docs/server/plugins.md

---------

Co-authored-by: bingxin666 <73421892+bingxin666@users.noreply.github.com>
Co-authored-by: Kevin Z <zyxkad@gmail.com>

* update CRASH-UPLOAD (#243)

* update CRASH-UPLOAD
add a few requirements before report issue

* update format

* Issue 模版增加截图 textarea,并将 Mac 改成 macOS (#244)

* Create screenshot textarea

* 将Mac 改成 macOS

* fixed pwa

* fix style

* install @vite-pwa/vitepress

* 🦄 refactor(theme): edit theme structure

* 🦄 refactor(dir): move `.vitepress` dir

* 🐞 fix(import): fix import

* 🐞 fix(import): fix import

* 🐞 fix(import): fix import

* 添加双向链接支持、增强可读性,并更新依赖项
使用 VitePress 插件添加了双向链接支持、新的贡献者组件、Git 提交历史、增强阅读体验;将 VitePress 更新到 v1.1.4 并更新其他依赖

* 修复可能导致构建失败的问题

* 修一下提交信息和贡献者不显示的问题

* 使用 Actions 部署到 CF Pages

* 加一个手动执行

* 忘记改提交哈希获取了

* 🔥 upd: format

* ❤️ upd: better lang use

* 折腾了一下贡献者组件

---------

Co-authored-by: bingxin666 <73421892+bingxin666@users.noreply.github.com>
Co-authored-by: bingling-sama <bingling_sama@qq.com>
Co-authored-by: zkitefly <z18344203426@qq.com>
Co-authored-by: XieXiLin <support@xiexilin.com>
Co-authored-by: zyxkad <zyxkad@gmail.com>
Co-authored-by: Pysio <71202163+pysio2007@users.noreply.github.com>
Co-authored-by: 何杰豪 <hejiehao12@126.com>
  • Loading branch information
8 people committed May 2, 2024
1 parent 8e56284 commit 645acb5
Show file tree
Hide file tree
Showing 85 changed files with 9,395 additions and 7,537 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"parser": "@typescript-eslint/parser",
"project": [
"./tsconfig.json",
"./tsconfig.worker.json",
"./tsconfig.worker.json"
],
"sourceType": "module",
"extraFileExtensions": [".vue"]
Expand Down
18 changes: 17 additions & 1 deletion .github/ISSUE_TEMPLATE/CRASH-UPLOAD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ labels: [
"崩溃提交"
]
body:
- type: checkboxes
id: check-list
attributes:
label: "检查项"
description: "请逐个检查下列项目,并勾选确认。"
options:
- label: "我已检查并确认没有使用任何预览版的服务端 / 插件 / 模组"
required: true
- label: "我已确认位于 https://beta.crashmc.com/analyzer 的分析器无法找出我的错误 / 无法给出正确解法"
required: true
- type: textarea
id: description
attributes:
Expand Down Expand Up @@ -35,6 +45,12 @@ body:
placeholder: 粘贴 MCLogs 链接、粘贴日志内容或上传日志文件
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: 截图
description: 如果有相关截图的话,请上传截图。[截图教程](https://zhuanlan.zhihu.com/p/92074446)
placeholder: 请把截图粘贴到这里
- type: dropdown
id: os
attributes:
Expand All @@ -44,7 +60,7 @@ body:
options:
- Windows
- Linux
- Mac
- macOS
validations:
required: true
- type: dropdown
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/pages-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pages Check
run-name: ${{ github.actor }} is checking pages deployment 🚀
on:
push:
branches:
- main
- dev

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.2
- name: Setup pnpm
uses: pnpm/action-setup@v3.0.0
with:
version: 8.15.3
- name: Install dependencies
run: pnpm install
- name: Build Pages
run: pnpm run docs:build
73 changes: 73 additions & 0 deletions .github/workflows/preview-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build Docs to Cloudflare Pages

on:
workflow_dispatch:
push:
branches:
- 'dev'

env:
STORE_PATH: ''

jobs:
build:
name: Build
runs-on: ubuntu-22.04
environment:
name: Production Docs
url: https://beta.crashmc.com
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9.0.4
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build docs
run: |
pnpm run docs:build
env:
# As suggested in Verbose Build option to be able to track down errors https://github.com/vuejs/vitepress/issues/422
# vitepress build command does not have --debug option, so we need to set it manually where the debug package is used.
# DEBUG: 'vitepress:*'
VUE_PROD_HYDRATION_MISMATCH_DETAILS_FLAG: '1'

- name: Publish to Cloudflare Pages
id: deploy
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: .vitepress/dist
# Optional: Switch what branch you are publishing to.
# By default this will be the branch which triggered this workflow
branch: dev
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta`
wranglerVersion: '3'
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ cache
.pnp.cjs
.pnp.loader.mjs
yarn.lock
dev-dist
vite.config.ts.timestamp*

#CloudIDE
.lightly
Expand All @@ -146,3 +148,6 @@ dist-ssr

# macOS
.DS_Store

# Obsidian
.obsidian
5 changes: 5 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"default": true,
"MD033": false,
"MD041": false
}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false,
"useTabs": true,
"vueIndentScriptAndStyle": false
}
95 changes: 95 additions & 0 deletions .vitepress/analyzers/mcla.api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
export type {
readable,
StackInfo,
Stacktrace,
JavaError,
ReportDetails,
HeadThread,
AffectedLevel,
DetailsItem,
CrashReport,
ErrorDesc,
SolutionPossibility,
ErrorResult,
Solution,
MCLAAPI,
}

type readable =
| string
| Uint8Array
| ReadableStream
| ReadableStreamDefaultReader

interface StackInfo {
raw: string
class: string
method: string
}

type Stacktrace = StackInfo[]

interface JavaError {
class: string
message: string
stacktrace: Stacktrace
causedBy: JavaError
// extra infos
lineNo: number
}

type ReportDetails = Map<string, string[]>

interface HeadThread {
thread: string
stacktrace: Stacktrace
}

interface AffectedLevel {
details: ReportDetails
stacktrace: Stacktrace
}

interface DetailsItem {
details: ReportDetails
}

interface CrashReport {
description: string
error: JavaError
head: HeadThread
affectedLevel: AffectedLevel
others: Map<string, DetailsItem>
}

interface ErrorDesc {
error: string
message: string
solutions: number[]
}

interface SolutionPossibility {
errorDesc: ErrorDesc
match: number
}

interface ErrorResult {
error: JavaError
matched: SolutionPossibility[]
file?: string
}

interface Solution {
tags: string[]
description: string
link_to: string
}

interface MCLAAPI {
version: string
release(): void
parseCrashReport(log: readable): Promise<CrashReport>
parseLogErrors(log: readable): Promise<JavaError[]>
analyzeLogErrors(log: readable): Promise<ErrorResult[]>
analyzeLogErrorsIter(log: readable): Promise<AsyncIterable<ErrorResult>>
}
Loading

0 comments on commit 645acb5

Please sign in to comment.