Skip to content

Commit d7ed68c

Browse files
authored
feat: console 4.0 (kubesphere#4276)
Signed-off-by: ci-bot <[email protected]>
1 parent bd995f4 commit d7ed68c

File tree

8,301 files changed

+495463
-403558
lines changed

Some content is hidden

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

8,301 files changed

+495463
-403558
lines changed

.changeset/config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": false,
4+
"commit": false,
5+
"fixed": [["@ks-console/*"]],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "ksc-release-4.1",
9+
"updateInternalDependencies": "patch",
10+
"ignore": [],
11+
"snapshot": {
12+
"useCalculatedVersion": true,
13+
"prereleaseTemplate": "{tag}.{datetime}"
14+
}
15+
}

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
3+
.idea

.editorconfig

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
root = true
22

3-
[*.jsx?]
4-
charset = utf-8
3+
[*]
54
indent_style = space
65
indent_size = 2
6+
tab_width = 2
77
end_of_line = lf
8-
insert_final_newline = true
8+
charset = utf-8
99
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
1014

1115
[Makefile]
1216
indent_style = tab
13-
14-
[*.yaml]
15-
indent_style = space
16-
indent_size = 2

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ node_modules/
77
jest.config.js
88
babel.config.js
99
.eslintrc.js
10-
locales/
10+
locales/
11+
packages/*/lib/

.eslintrc.js

Lines changed: 7 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,19 @@
1-
/*
2-
* This file is part of KubeSphere Console.
3-
* Copyright (C) 2019 The KubeSphere Console Authors.
4-
*
5-
* KubeSphere Console is free software: you can redistribute it and/or modify
6-
* it under the terms of the GNU Affero General Public License as published by
7-
* the Free Software Foundation, either version 3 of the License, or
8-
* (at your option) any later version.
9-
*
10-
* KubeSphere Console is distributed in the hope that it will be useful,
11-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU Affero General Public License for more details.
14-
*
15-
* You should have received a copy of the GNU Affero General Public License
16-
* along with KubeSphere Console. If not, see <https://www.gnu.org/licenses/>.
17-
*/
18-
191
// http://eslint.org/docs/user-guide/configuring
2+
const path = require('path');
3+
4+
const resolve = dir => path.resolve(__dirname, dir);
205

216
module.exports = {
227
root: true,
23-
parser: 'babel-eslint',
248
parserOptions: {
25-
sourceType: 'module',
26-
ecmaFeatures: {
27-
jsx: true,
28-
modules: true,
29-
},
9+
project: ['./tsconfig.json'],
3010
},
31-
env: {
32-
es6: true,
33-
commonjs: true,
34-
browser: true,
35-
jest: true,
36-
},
37-
extends: ['airbnb-base', 'plugin:prettier/recommended'],
38-
// https://github.com/yannickcr/eslint-plugin-react
39-
plugins: ['react', 'babel', 'promise'],
40-
// check if imports actually resolve
11+
extends: ['kubesphere'],
4112
settings: {
4213
'import/resolver': {
4314
webpack: {
44-
config: 'scripts/webpack.base.js',
15+
config: resolve('packages/bootstrap/webpack/webpack.base.conf.js'),
4516
},
4617
},
4718
},
48-
// add your custom rules here
49-
rules: {
50-
// allow paren-less arrow functions
51-
'arrow-parens': 0,
52-
'import/no-extraneous-dependencies': 0,
53-
'import/no-dynamic-require': 0,
54-
'import/no-cycle': 0,
55-
// allow async-await
56-
'generator-star-spacing': 0,
57-
// allow debugger during development
58-
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
59-
'global-require': 0,
60-
'no-console': ["error", { allow: ["warn", "error"] }],
61-
'dot-notation': 0,
62-
'no-underscore-dangle': 0,
63-
'no-param-reassign': 0,
64-
'no-unused-expressions': 0,
65-
'no-mixed-operators': 0,
66-
'no-return-await': 0,
67-
'no-restricted-syntax': 0,
68-
'no-await-in-loop': 0,
69-
'no-restricted-globals': 0,
70-
'no-empty': [
71-
2,
72-
{
73-
allowEmptyCatch: true,
74-
},
75-
],
76-
camelcase: 0,
77-
'max-len': [
78-
1,
79-
{
80-
code: 100,
81-
tabWidth: 2,
82-
ignoreUrls: true,
83-
ignoreComments: true,
84-
ignoreRegExpLiterals: true,
85-
ignoreTrailingComments: true,
86-
ignoreStrings: true,
87-
ignoreTemplateLiterals: true,
88-
ignorePattern:
89-
"^(\\s*[a-zA-Z_]+: '[^']+'[,;]*)|(.*require.*)$",
90-
},
91-
],
92-
'import/prefer-default-export': 0,
93-
'no-eval': 0,
94-
'no-plusplus': 0,
95-
'func-names': 0,
96-
'consistent-return': 0,
97-
'react/jsx-uses-react': 2,
98-
'react/jsx-uses-vars': 2,
99-
'class-methods-use-this': 0,
100-
'no-nested-ternary': 0,
101-
'no-use-before-define': 0,
102-
'prefer-destructuring': 0,
103-
'max-classes-per-file': 0,
104-
'prefer-promise-reject-errors': 0,
105-
},
106-
parserOptions: {
107-
ecmaFeatures: {
108-
legacyDecorators: true
109-
}
110-
},
111-
globals: {
112-
t: true,
113-
globals: true,
114-
request: true,
115-
},
116-
}
19+
};

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ jobs:
3838

3939
# Initializes the CodeQL tools for scanning.
4040
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@v1
41+
uses: github/codeql-action/init@v2
4242
with:
4343
languages: ${{ matrix.language }}
4444

4545
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4646
# If this step fails, then you should remove it and run the build manually (see below)
4747
- name: Autobuild
48-
uses: github/codeql-action/autobuild@v1
48+
uses: github/codeql-action/autobuild@v2
4949

5050
# ℹ️ Command-line programs to run using the OS shell.
5151
# 📚 https://git.io/JvXDl
@@ -59,4 +59,4 @@ jobs:
5959
# make release
6060

6161
- name: Perform CodeQL Analysis
62-
uses: github/codeql-action/analyze@v1
62+
uses: github/codeql-action/analyze@v2

.github/workflows/deploy-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
needs: deploy-check
2929
strategy:
3030
matrix:
31-
node-version: [12.18.x]
31+
node-version: [16.x]
3232
steps:
3333
- name: get pull request ref
3434
id: get_pull_request_ref
@@ -44,7 +44,7 @@ jobs:
4444
repository: ${{ fromJson(steps.get_pull_request_ref.outputs.data).head.repo.full_name }}
4545
ref: ${{ fromJson(steps.get_pull_request_ref.outputs.data).head.ref }}
4646
- name: Use Node.js ${{ matrix.node-version }}
47-
uses: actions/setup-node@v1
47+
uses: actions/setup-node@v3
4848
with:
4949
node-version: ${{ matrix.node-version }}
5050
- name: Build

.github/workflows/kubed-bump.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Bump @kubed/*
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
kubed-bump:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: 'Checkout'
11+
uses: actions/checkout@v4
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 16
17+
18+
- name: Install Yarn
19+
run: npm install --global yarn
20+
21+
- name: Install dependencies
22+
run: yarn install
23+
24+
- name: Bump @kubed/*
25+
run: yarn run kubed:bump
26+
27+
- name: Update yarn.lock
28+
run: yarn install
29+
30+
- name: 'Create Pull Request'
31+
env:
32+
COMMIT_MESSAGE: 'chore(bot): bump @kubed/*'
33+
uses: peter-evans/create-pull-request@v6
34+
with:
35+
commit-message: ${{ env.COMMIT_MESSAGE }}
36+
signoff: true
37+
delete-branch: true
38+
branch-suffix: timestamp
39+
title: ${{ env.COMMIT_MESSAGE }}
40+
body: |
41+
```release-note
42+
none
43+
```
44+
labels: approved

.github/workflows/license-headers.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Update License Headers
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
update-license-headers:
8+
runs-on: self-runner-kubesphere
9+
steps:
10+
- name: 'Checkout'
11+
uses: actions/checkout@v4
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 16
17+
18+
- name: Install Yarn
19+
run: npm install --global yarn
20+
21+
- name: Install dependencies
22+
run: yarn install
23+
24+
- name: Update License Headers
25+
run: bash hack/update-licenses.sh
26+
27+
- name: 'Create Pull Request'
28+
env:
29+
COMMIT_MESSAGE: 'chore(bot): update license headers'
30+
uses: peter-evans/create-pull-request@v7
31+
with:
32+
commit-message: ${{ env.COMMIT_MESSAGE }}
33+
signoff: true
34+
delete-branch: true
35+
branch-suffix: timestamp
36+
sign-commits: true
37+
title: ${{ env.COMMIT_MESSAGE }}
38+
body: |
39+
```release-note
40+
none
41+
```
42+
labels: approved
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update Lock File
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
lock-file-update:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: 'Checkout'
11+
uses: actions/checkout@v4
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 16
17+
18+
- name: Install Yarn
19+
run: npm install --global yarn
20+
21+
- name: Remove node_modules
22+
run: rm -rf **/node_modules/
23+
24+
- name: Install dependencies
25+
run: yarn install
26+
27+
- name: 'Create Pull Request'
28+
env:
29+
COMMIT_MESSAGE: 'chore(bot): update yarn.lock'
30+
uses: peter-evans/create-pull-request@v6
31+
with:
32+
commit-message: ${{ env.COMMIT_MESSAGE }}
33+
signoff: true
34+
delete-branch: true
35+
branch-suffix: timestamp
36+
title: ${{ env.COMMIT_MESSAGE }}
37+
body: |
38+
```release-note
39+
none
40+
```
41+
labels: approved

0 commit comments

Comments
 (0)