Skip to content

Commit 57b341f

Browse files
authored
Merge branch 'master' into ip-version
2 parents d886daa + aa67615 commit 57b341f

File tree

308 files changed

+7693
-1655
lines changed

Some content is hidden

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

308 files changed

+7693
-1655
lines changed

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You can modifiy Uptime Kuma in your browser without setting up a local developme
66

77
1. Click `Code` -> `Create codespace on master`
88
2. Wait a few minutes until you see there are two exposed ports
9-
3. Go to the `3000` url, see if it is working
9+
3. Go to the `3000` url, see if it is working
1010

1111
![image](https://github.com/louislam/uptime-kuma/assets/1336778/909b2eb4-4c5e-44e4-ac26-6d20ed856e7f)
1212

.devcontainer/devcontainer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
"customizations": {
1414
"vscode": {
1515
"extensions": [
16-
"streetsidesoftware.code-spell-checker",
17-
"dbaeumer.vscode-eslint"
18-
]
16+
"streetsidesoftware.code-spell-checker",
17+
"dbaeumer.vscode-eslint",
18+
"GitHub.copilot-chat"
19+
]
1920
}
2021
},
2122
"forwardPorts": [3000, 3001]

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/.idea
22
/node_modules
3-
/data
3+
/data*
44
/cypress
55
/out
66
/test

.eslintrc.js

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = {
22
ignorePatterns: [
3-
"test/*",
3+
"test/*.js",
4+
"test/cypress",
45
"server/modules/apicache/*",
56
"src/util.js"
67
],
@@ -14,13 +15,17 @@ module.exports = {
1415
extends: [
1516
"eslint:recommended",
1617
"plugin:vue/vue3-recommended",
18+
"plugin:jsdoc/recommended-error",
1719
],
1820
parser: "vue-eslint-parser",
1921
parserOptions: {
2022
parser: "@babel/eslint-parser",
2123
sourceType: "module",
2224
requireConfigFile: false,
2325
},
26+
plugins: [
27+
"jsdoc"
28+
],
2429
rules: {
2530
"yoda": "error",
2631
eqeqeq: [ "warn", "smart" ],
@@ -71,7 +76,7 @@ module.exports = {
7176
"no-var": "error",
7277
"key-spacing": "warn",
7378
"keyword-spacing": "warn",
74-
"space-infix-ops": "warn",
79+
"space-infix-ops": "error",
7580
"arrow-spacing": "warn",
7681
"no-trailing-spaces": "error",
7782
"no-constant-condition": [ "error", {
@@ -97,7 +102,43 @@ module.exports = {
97102
}],
98103
"no-control-regex": "off",
99104
"one-var": [ "error", "never" ],
100-
"max-statements-per-line": [ "error", { "max": 1 }]
105+
"max-statements-per-line": [ "error", { "max": 1 }],
106+
"jsdoc/check-tag-names": [
107+
"error",
108+
{
109+
"definedTags": [ "link" ]
110+
}
111+
],
112+
"jsdoc/no-undefined-types": "off",
113+
"jsdoc/no-defaults": [
114+
"error",
115+
{ "noOptionalParamNames": true }
116+
],
117+
"jsdoc/require-throws": "warn",
118+
"jsdoc/require-jsdoc": [
119+
"error",
120+
{
121+
"require": {
122+
"FunctionDeclaration": true,
123+
"MethodDefinition": true,
124+
}
125+
}
126+
],
127+
"jsdoc/no-blank-block-descriptions": "error",
128+
"jsdoc/require-returns-description": "warn",
129+
"jsdoc/require-returns-check": [
130+
"error",
131+
{ "reportMissingReturnForUndefinedTypes": false }
132+
],
133+
"jsdoc/require-returns": [
134+
"warn",
135+
{
136+
"forceRequireReturn": true,
137+
"forceReturnsWithAsync": true
138+
}
139+
],
140+
"jsdoc/require-param-type": "warn",
141+
"jsdoc/require-param-description": "warn"
101142
},
102143
"overrides": [
103144
{

.github/ISSUE_TEMPLATE/security.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ labels:
1212

1313
DO NOT PROVIDE ANY DETAILS HERE. Please privately report to https://github.com/louislam/uptime-kuma/security/advisories/new.
1414

15-
1615
Why need this issue? It is because GitHub Advisory do not send a notification to @louislam, it is a workaround to do so.
1716

1817
Your GitHub Advisory URL:
19-

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
22
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
33

4-
Tick the checkbox if you understand [x]:
4+
Tick the checkbox if you understand [x]:
55
- [ ] I have read and understand the pull request rules.
66

77
# Description

.github/workflows/auto-test.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
os: [macos-latest, ubuntu-latest, windows-latest, ARM64]
25-
node: [ 14, 20 ]
25+
node: [ 14, 20.5 ]
2626
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2727

2828
steps:
@@ -71,27 +71,28 @@ jobs:
7171
- run: git config --global core.autocrlf false # Mainly for Windows
7272
- uses: actions/checkout@v3
7373

74-
- name: Use Node.js 14
74+
- name: Use Node.js 20
7575
uses: actions/setup-node@v3
7676
with:
77-
node-version: 14
77+
node-version: 20
7878
- run: npm install
7979
- run: npm run lint
8080

81-
e2e-tests:
82-
needs: [ check-linters ]
83-
runs-on: ubuntu-latest
84-
steps:
85-
- run: git config --global core.autocrlf false # Mainly for Windows
86-
- uses: actions/checkout@v3
87-
88-
- name: Use Node.js 14
89-
uses: actions/setup-node@v3
90-
with:
91-
node-version: 14
92-
- run: npm install
93-
- run: npm run build
94-
- run: npm run cy:test
81+
# TODO: Temporarily disable, as it cannot pass the test in 2.0.0 yet
82+
# e2e-tests:
83+
# needs: [ check-linters ]
84+
# runs-on: ubuntu-latest
85+
# steps:
86+
# - run: git config --global core.autocrlf false # Mainly for Windows
87+
# - uses: actions/checkout@v3
88+
#
89+
# - name: Use Node.js 14
90+
# uses: actions/setup-node@v3
91+
# with:
92+
# node-version: 14
93+
# - run: npm install
94+
# - run: npm run build
95+
# - run: npm run cy:test
9596

9697
frontend-unit-tests:
9798
needs: [ check-linters ]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: prevent-file-change
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
check-file-changes:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Prevent file change
11+
uses: xalvarez/prevent-file-change-action@v1
12+
with:
13+
githubToken: ${{ secrets.GITHUB_TOKEN }}
14+
# Regex, /src/lang/*.json is not allowed to be changed, except for /src/lang/en.json
15+
pattern: '^(?!src/lang/en\.json$)src/lang/.*\.json$'
16+
trustedAuthors: UptimeKumaBot
17+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dist-ssr
77

88
/data
99
!/data/.gitkeep
10+
/data*
1011
.vscode
1112

1213
/private

0 commit comments

Comments
 (0)