Skip to content

Commit 04e3695

Browse files
authored
Merge pull request #1369 from jumpserver/dev
v4.10.2
2 parents 3ff0a7f + 8c67e8f commit 04e3695

209 files changed

Lines changed: 15672 additions & 31562 deletions

File tree

Some content is hidden

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

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ publish.sh
4646
luna.tar.gz
4747
luna/
4848
package-lock.json
49+
.angular

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
dist
3+
e2e
4+
.idea
5+
.vscode
6+
.angular

.prettierrc.cjs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module.exports = {
2+
// 指定最大换行长度
3+
printWidth: 100,
4+
// 缩进制表符宽度 | 空格数
5+
tabWidth: 2,
6+
// 使用制表符而不是空格缩进行 (true:制表符,false:空格)
7+
useTabs: false,
8+
// 结尾不用分号 (true:有,false:没有)
9+
semi: true,
10+
// 使用单引号 (true:单引号,false:双引号)
11+
singleQuote: true,
12+
// 在对象字面量中决定是否将属性名用引号括起来 可选值 "<as-needed|consistent|preserve>"
13+
quoteProps: "as-needed",
14+
// 在JSX中使用单引号而不是双引号 (true:单引号,false:双引号)
15+
jsxSingleQuote: false,
16+
// 多行时尽可能打印尾随逗号 可选值"<none|es5|all>"
17+
trailingComma: "none",
18+
// 在对象,数组括号与文字之间加空格 "{ foo: bar }" (true:有,false:没有)
19+
bracketSpacing: true,
20+
// 将 > 多行元素放在最后一行的末尾,而不是单独放在下一行 (true:放末尾,false:单独一行)
21+
bracketSameLine: false,
22+
// (x) => {} 箭头函数参数只有一个时是否要有小括号 (avoid:省略括号,always:不省略括号)
23+
arrowParens: "avoid",
24+
// 指定要使用的解析器,不需要写文件开头的 @prettier
25+
requirePragma: false,
26+
// 可以在文件顶部插入一个特殊标记,指定该文件已使用 Prettier 格式化
27+
insertPragma: false,
28+
// 用于控制文本是否应该被换行以及如何进行换行
29+
proseWrap: "preserve",
30+
// 在html中空格是否是敏感的 "css" - 遵守 CSS 显示属性的默认值, "strict" - 空格被认为是敏感的 ,"ignore" - 空格被认为是不敏感的
31+
htmlWhitespaceSensitivity: "css",
32+
// 控制在 Vue 单文件组件中 <script> 和 <style> 标签内的代码缩进方式
33+
vueIndentScriptAndStyle: false,
34+
// 换行符使用 lf 结尾是 可选值 "<auto|lf|crlf|cr>"
35+
endOfLine: "auto",
36+
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码 (rangeStart:开始,rangeEnd:结束)
37+
rangeStart: 0,
38+
rangeEnd: Infinity
39+
};

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"runtimeExecutable": "bash",
1212
"runtimeArgs": [
1313
"-c",
14-
"source ~/.zshrc && nvm use v16.20.2 && npm start"
14+
"source ~/.zshrc && npm run dev"
1515
],
1616
}
1717
]

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"prettier.singleQuote": true
2+
"prettier.singleQuote": true,
3+
"angular.enable-strict-mode-prompt": false
34
}

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use base image to build the project avoid npm install every time
2-
FROM jumpserver/luna-base:20241113_102222 AS stage-build
2+
FROM jumpserver/luna-base:20250609_105214 AS stage-build
33

44
ARG VERSION
55
ENV VERSION=$VERSION
@@ -8,8 +8,8 @@ ADD . /data
88

99
RUN sed -i "s@version =.*;@version = '${VERSION}';@g" src/environments/environment.prod.ts \
1010
&& yarn build \
11-
&& cp -R src/assets/i18n luna/
11+
&& cp -R src/assets/i18n dist/luna/
1212

1313
FROM nginx:1.24-bullseye
14-
COPY --from=stage-build /data/luna /opt/luna
14+
COPY --from=stage-build /data/dist/luna /opt/luna
1515
COPY nginx.conf /etc/nginx/conf.d/default.conf

angular.json

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -3,129 +3,129 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"WebTerminal": {
6+
"Luna": {
77
"root": "",
88
"sourceRoot": "src",
99
"projectType": "application",
1010
"architect": {
1111
"build": {
12-
"builder": "@angular-devkit/build-angular:browser",
12+
"builder": "@angular/build:application",
1313
"options": {
1414
"outputPath": "dist",
15+
"optimization": false,
16+
"progress": true,
17+
"statsJson": false,
18+
"aot": false,
19+
"sourceMap": true,
20+
"namedChunks": true,
1521
"index": "src/index.html",
16-
"main": "src/main.ts",
22+
"browser": "src/main.ts",
23+
"polyfills": ["src/polyfills.ts"],
24+
"allowedCommonJsDependencies": [
25+
"crypto-js",
26+
"events",
27+
"buffer",
28+
"@xterm/xterm",
29+
"@xterm/addon-fit",
30+
"jquery",
31+
"xterm-theme"
32+
],
1733
"tsConfig": "src/tsconfig.app.json",
18-
"polyfills": "src/polyfills.ts",
34+
"stylePreprocessorOptions": {
35+
"includePaths": ["src", "src/sass", "node_modules"]
36+
},
1937
"preserveSymlinks": true,
2038
"assets": [
2139
"src/assets",
2240
"src/static",
23-
"src/favicon.ico"
24-
],
25-
"styles": [
26-
"node_modules/animate.css/animate.min.css",
27-
"node_modules/xterm/dist/xterm.css",
28-
"node_modules/ngx-toastr/toastr.css",
29-
"src/sass/style.scss",
30-
"src/styles.css",
31-
"src/theme.scss",
32-
"node_modules/asciinema-player/resources/public/css/asciinema-player.css"
41+
"src/favicon.ico",
42+
{
43+
"glob": "**/*",
44+
"input": "./node_modules/@ant-design/icons-angular/src/inline-svg/",
45+
"output": "/assets/"
46+
}
3347
],
48+
"styles": ["src/sass/ant.less", "src/sass/styles.scss"],
3449
"scripts": [
35-
"node_modules/jquery/dist/jquery.min.js",
36-
"node_modules/xterm/dist/xterm.js",
37-
"node_modules/@ztree/ztree_v3/js/jquery.ztree.all.min.js",
38-
"node_modules/@ztree/ztree_v3/js/jquery.ztree.exhide.min.js",
39-
"node_modules/asciinema-player/resources/public/js/asciinema-player.js"
50+
"jquery/dist/jquery.min.js",
51+
"@ztree/ztree_v3/js/jquery.ztree.all.min.js",
52+
"@ztree/ztree_v3/js/jquery.ztree.exhide.min.js",
53+
"asciinema-player/dist/bundle/asciinema-player.min.js"
4054
]
4155
},
4256
"configurations": {
4357
"production": {
4458
"optimization": true,
4559
"outputHashing": "all",
60+
"baseHref": "/luna/",
61+
"outputPath": {
62+
"base": "dist",
63+
"browser": "luna"
64+
},
4665
"sourceMap": false,
47-
"extractCss": true,
4866
"namedChunks": false,
49-
"aot": true,
5067
"extractLicenses": true,
51-
"vendorChunk": false,
52-
"buildOptimizer": true,
68+
"budgets": [
69+
{
70+
"type": "initial",
71+
"maximumWarning": "5mb",
72+
"maximumError": "6mb"
73+
}
74+
],
5375
"fileReplacements": [
5476
{
5577
"replace": "src/environments/environment.ts",
5678
"with": "src/environments/environment.prod.ts"
5779
}
5880
]
81+
},
82+
"hmr": {
83+
"optimization": false,
84+
"sourceMap": true,
85+
"namedChunks": true
5986
}
6087
}
6188
},
6289
"serve": {
63-
"builder": "@angular-devkit/build-angular:dev-server",
90+
"builder": "@angular/build:dev-server",
6491
"options": {
65-
"browserTarget": "WebTerminal:build"
92+
"buildTarget": "Luna:build",
93+
"proxyConfig": "proxy.conf.json"
6694
},
6795
"configurations": {
6896
"production": {
69-
"browserTarget": "WebTerminal:build:production"
97+
"buildTarget": "Luna:build:production"
98+
},
99+
"hmr": {
100+
"buildTarget": "Luna:build:hmr"
70101
}
71102
}
72103
},
73104
"extract-i18n": {
74-
"builder": "@angular-devkit/build-angular:extract-i18n",
105+
"builder": "@angular/build:extract-i18n",
75106
"options": {
76-
"browserTarget": "WebTerminal:build"
77-
}
78-
},
79-
"test": {
80-
"builder": "@angular-devkit/build-angular:karma",
81-
"options": {
82-
"main": "src/test.ts",
83-
"karmaConfig": "./karma.conf.js",
84-
"polyfills": "src/polyfills.ts",
85-
"tsConfig": "src/tsconfig.spec.json",
86-
"scripts": [
87-
"node_modules/jquery/dist/jquery.min.js",
88-
"node_modules/xterm/dist/xterm.js",
89-
"node_modules/@ztree/ztree_v3/js/jquery.ztree.all.min.js",
90-
"node_modules/@ztree/ztree_v3/js/jquery.ztree.exhide.min.js"
91-
],
92-
"styles": [
93-
"node_modules/animate.css/animate.min.css",
94-
"node_modules/xterm/dist/xterm.css",
95-
"src/sass/style.scss",
96-
"src/styles.css"
97-
],
98-
"assets": [
99-
"src/assets",
100-
"src/static",
101-
"src/theme/default",
102-
"src/favicon.ico"
103-
]
107+
"buildTarget": "Luna:build"
104108
}
105109
},
106110
"lint": {
107-
"builder": "@angular-devkit/build-angular:tslint",
111+
"builder": "@angular-eslint/builder:lint",
108112
"options": {
109-
"tsConfig": [
110-
"src/tsconfig.app.json",
111-
"src/tsconfig.spec.json"
112-
],
113-
"exclude": [
114-
"**/node_modules/**"
115-
]
113+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
116114
}
117115
}
118116
}
119117
}
120118
},
121-
"defaultProject": "Luna",
122119
"schematics": {
123120
"@schematics/angular:component": {
124121
"prefix": "app",
125-
"styleext": "scss"
122+
"style": "scss"
126123
},
127124
"@schematics/angular:directive": {
128125
"prefix": "app"
129126
}
127+
},
128+
"cli": {
129+
"analytics": "b781fa7d-691a-46cd-bb02-23fe8532f7d6"
130130
}
131131
}

0 commit comments

Comments
 (0)