Skip to content

Commit

Permalink
Merge branch 'main' of github.com:walinejs/waline
Browse files Browse the repository at this point in the history
  • Loading branch information
lizheming committed Oct 14, 2023
2 parents b63bb2e + c705669 commit 7169014
Show file tree
Hide file tree
Showing 21 changed files with 2,684 additions and 2,306 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-deploy-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
version: ${{ steps.publish-server.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
if: ${{ needs.npm.outputs.old-version != needs.npm.outputs.version || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
Expand All @@ -43,7 +43,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/translator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: lizheming/github-translate-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
18 changes: 9 additions & 9 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
"dev": "vuepress dev src"
},
"devDependencies": {
"@fancyapps/ui": "5.0.22",
"@vuepress/client": "2.0.0-beta.66",
"@vuepress/plugin-docsearch": "2.0.0-beta.66",
"@vuepress/utils": "2.0.0-beta.66",
"@fancyapps/ui": "5.0.24",
"@vuepress/client": "2.0.0-beta.67",
"@vuepress/plugin-docsearch": "2.0.0-beta.67",
"@vuepress/utils": "2.0.0-beta.67",
"marked": "4.3.0",
"vue": "3.3.4",
"vuepress": "2.0.0-beta.66",
"vuepress-plugin-redirect": "2.0.0-beta.235",
"vuepress-plugin-remove-pwa": "2.0.0-beta.235",
"vuepress-shared": "2.0.0-beta.235",
"vuepress-theme-hope": "2.0.0-beta.235"
"vuepress": "2.0.0-beta.67",
"vuepress-plugin-redirect": "2.0.0-beta.237",
"vuepress-plugin-remove-pwa": "2.0.0-beta.237",
"vuepress-shared": "2.0.0-beta.237",
"vuepress-theme-hope": "2.0.0-beta.237"
}
}
2 changes: 1 addition & 1 deletion docs/src/en/reference/client/props.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ You can pass in a code highlighter of your own, or set to `false` to disable cod

Customize $\TeX$ rendering, the default behavior is to prompt that the preview mode does not support $\TeX$. The function provides two parameters, the first parameter indicates whether it should be rendered in block level, and the second parameter is the string of the $\TeX$ content, and return a HTML string as render result.

You can import $\TeX$ renderer to provide preview feature. We recommend you to use Katex or MathJax, or you can set to `false` to disable parsing $\TeX$.
You can import $\TeX$ renderer to provide preview feature. We recommend you to use KaTeX or MathJax, or you can set to `false` to disable parsing $\TeX$.

## search

Expand Down
2 changes: 1 addition & 1 deletion docs/src/en/reference/server/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ When setting security domains, you need to add the site address and the Waline s
| `MARKDOWN_SUP` | `true` | Whether enable superscript |
| `MARKDOWN_TEX` | `mathjax` | Service to parse math, `mathjax` `katex` and `false` are supported |
| `MARKDOWN_MATHJAX` | `{}` | MathJax Options |
| `MARKDOWN_KATEX` | `{}` | Katex Options |
| `MARKDOWN_KATEX` | `{}` | KaTeX Options |

## Mail Service

Expand Down
2 changes: 1 addition & 1 deletion docs/src/reference/client/props.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Waline 多语言配置。

自定义 $\TeX$ 渲染,默认行为是提示预览模式不支持 $\TeX$。函数提供两个参数,第一个参数表示渲染模式是否为块级,第二个参数是 $\TeX$ 的字符串,并返回一段 HTML 字符串作为渲染结果。

你可以自行引入 $\TeX$ 渲染器并提供预览渲染,建议使用 Katex 或 MathJax,也可以设置为 `false` 以禁止渲染 $\TeX$。
你可以自行引入 $\TeX$ 渲染器并提供预览渲染,建议使用 KaTeX 或 MathJax,也可以设置为 `false` 以禁止渲染 $\TeX$。

## search

Expand Down
2 changes: 1 addition & 1 deletion docs/src/reference/server/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Recaptcha Key 和 Secret 可在 <https://www.google.com/recaptcha> 申请。
| `MARKDOWN_SUP` | `true` | 是否启用上角标支持 |
| `MARKDOWN_TEX` | `mathjax` | 解析 TeX 的服务,支持 `mathjax``katex``false` |
| `MARKDOWN_MATHJAX` | `{}` | MathJax 选项 |
| `MARKDOWN_KATEX` | `{}` | Katex 选项 |
| `MARKDOWN_KATEX` | `{}` | KaTeX 选项 |

## 邮件

Expand Down
64 changes: 32 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,57 +49,57 @@
"singleQuote": true
},
"devDependencies": {
"@babel/core": "7.22.11",
"@babel/plugin-transform-runtime": "7.22.10",
"@babel/preset-env": "7.22.10",
"@babel/preset-react": "7.22.5",
"@babel/runtime": "7.22.11",
"@commitlint/cli": "17.7.1",
"@babel/core": "7.23.0",
"@babel/plugin-transform-runtime": "7.22.15",
"@babel/preset-env": "7.22.20",
"@babel/preset-react": "7.22.15",
"@babel/runtime": "7.23.1",
"@commitlint/cli": "17.7.2",
"@commitlint/config-conventional": "17.7.0",
"@rollup/plugin-babel": "6.0.3",
"@rollup/plugin-commonjs": "25.0.4",
"@rollup/plugin-node-resolve": "15.2.1",
"@rollup/plugin-replace": "5.0.2",
"@rollup/plugin-terser": "0.4.3",
"@types/node": "20.5.7",
"@typescript-eslint/eslint-plugin": "6.5.0",
"@typescript-eslint/parser": "6.5.0",
"@vitejs/plugin-react": "4.0.4",
"@rollup/plugin-babel": "6.0.4",
"@rollup/plugin-commonjs": "25.0.5",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-replace": "5.0.3",
"@rollup/plugin-terser": "0.4.4",
"@types/node": "20.8.4",
"@typescript-eslint/eslint-plugin": "6.7.5",
"@typescript-eslint/parser": "6.7.5",
"@vitejs/plugin-react": "4.1.0",
"@vue/eslint-config-prettier": "8.0.0",
"@vue/eslint-config-typescript": "11.0.3",
"@vue/eslint-config-typescript": "12.0.0",
"apidoc": "1.2.0",
"c8": "8.0.1",
"commitizen": "4.3.0",
"conventional-changelog-cli": "4.0.0",
"conventional-changelog-cli": "4.1.0",
"cross-env": "7.0.3",
"cz-conventional-changelog": "3.3.0",
"eslint": "8.48.0",
"eslint": "8.51.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-vue": "9.17.0",
"husky": "8.0.3",
"markdownlint-cli": "0.35.0",
"markdownlint-cli": "0.37.0",
"nano-staged": "0.8.0",
"postcss": "8.4.28",
"prettier": "3.0.2",
"rimraf": "5.0.1",
"rollup": "3.28.1",
"rollup-plugin-dts": "6.0.0",
"rollup-plugin-typescript2": "0.35.0",
"sass": "1.66.1",
"sort-package-json": "2.5.1",
"postcss": "8.4.31",
"prettier": "3.0.3",
"rimraf": "5.0.5",
"rollup": "4.0.2",
"rollup-plugin-dts": "6.1.0",
"rollup-plugin-typescript2": "0.36.0",
"sass": "1.69.1",
"sort-package-json": "2.6.0",
"stylelint": "15.10.3",
"stylelint-config-hope": "3.0.0",
"stylelint-config-hope": "4.0.0",
"tslib": "2.6.2",
"typescript": "5.2.2",
"vercel": "32.1.0",
"vite": "4.4.9",
"vercel": "32.4.1",
"vite": "4.4.11",
"vite-plugin-reiconify": "1.1.2",
"vitest": "0.34.3"
"vitest": "0.34.6"
},
"packageManager": "pnpm@8.7.0",
"packageManager": "pnpm@8.9.0",
"apidoc": {
"title": "Waline API Documentation"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
"@rematch/core": "2.2.0",
"base-icon": "2.2.1",
"classnames": "2.3.2",
"i18next": "23.4.6",
"i18next": "23.5.1",
"i18next-browser-languagedetector": "7.1.0",
"md5": "2.3.0",
"qrcode.react": "3.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "13.2.0",
"react-redux": "8.1.2",
"react-router-dom": "6.15.0",
"react-i18next": "13.2.2",
"react-redux": "8.1.3",
"react-router-dom": "6.16.0",
"redux": "4.2.1",
"typescript": "5.2.2",
"vite-plugin-css-injected-by-js": "^3.3.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/client/__tests__/katex.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Waline Katex 案例</title>
<title>Waline KaTeX 案例</title>
<link rel="stylesheet" href="../dist/waline.css" />
<link
rel="stylesheet"
Expand Down
12 changes: 6 additions & 6 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,21 @@
]
},
"dependencies": {
"@vueuse/core": "^10.4.1",
"@vueuse/core": "^10.5.0",
"autosize": "^6.0.1",
"marked": "^4.3.0",
"vue": "^3.3.4"
},
"devDependencies": {
"@babel/core": "7.22.11",
"@babel/preset-env": "7.22.10",
"@babel/core": "7.23.0",
"@babel/preset-env": "7.22.20",
"@giphy/js-types": "4.4.0",
"@types/autosize": "4.0.1",
"@types/marked": "4.3.1",
"@vitejs/plugin-vue": "4.3.3",
"@vitejs/plugin-vue": "4.4.0",
"recaptcha-v3": "1.10.0",
"user-agent-data-types": "0.3.1",
"vite": "4.4.9"
"user-agent-data-types": "0.4.2",
"vite": "4.4.11"
},
"engines": {
"node": ">=14"
Expand Down
18 changes: 9 additions & 9 deletions packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@waline/vercel",
"version": "1.31.4",
"version": "1.31.7",
"description": "vercel server for waline comment system",
"keywords": [
"waline",
Expand All @@ -18,23 +18,23 @@
"@cloudbase/node-sdk": "^2.11.0",
"@koa/cors": "^4.0.0",
"akismet": "^2.0.7",
"deta": "^1.2.0",
"dompurify": "^3.0.5",
"deta": "^2.0.0",
"dompurify": "^3.0.6",
"dy-node-ip2region": "^1.0.1",
"fast-csv": "^4.3.6",
"form-data": "^4.0.0",
"jsdom": "^22.1.0",
"jsonwebtoken": "^9.0.1",
"katex": "^0.16.8",
"jsonwebtoken": "^9.0.2",
"katex": "^0.16.9",
"koa-compose": "^4.1.0",
"leancloud-storage": "^4.15.0",
"markdown-it": "^13.0.1",
"leancloud-storage": "^4.15.1",
"markdown-it": "^13.0.2",
"markdown-it-emoji": "^2.0.2",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"mathjax-full": "^3.2.2",
"node-fetch": "^2.7.0",
"nodemailer": "^6.9.4",
"nodemailer": "^6.9.6",
"nunjucks": "^3.2.4",
"phpass": "^0.1.1",
"prismjs": "^1.29.0",
Expand All @@ -49,7 +49,7 @@
"think-mongo": "^2.2.1",
"think-router-rest": "^1.0.5",
"thinkjs": "^3.2.15",
"ua-parser-js": "^1.0.35"
"ua-parser-js": "^1.0.36"
},
"engines": {
"node": ">=14"
Expand Down
13 changes: 9 additions & 4 deletions packages/server/src/service/storage/leancloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,16 @@ module.exports = class extends Base {
ret.map(async (item) => {
const _oldStatus = item.get('status');

if (think.isFunction(data)) {
item.set(data(item.toJSON()));
} else {
item.set(data);
var updateData = typeof data === 'function' ? data(item.toJSON()) : data;

const REVERSED_KEYS = ['createdAt', 'updatedAt'];
for (const k in updateData) {
if (REVERSED_KEYS.includes(k)) {
continue;
}
item.set(k, updateData[k]);
}

const _newStatus = item.get('status');

if (_newStatus && _oldStatus !== _newStatus) {
Expand Down
Loading

0 comments on commit 7169014

Please sign in to comment.