giime 0.9.0-beta.1 → 0.9.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +121 -122
- package/es/giime/version.d.ts +1 -1
- package/es/index.css +121 -122
- package/es/utils/src/http/devProxy.d.ts +22 -0
- package/es/utils/src/http/devProxy.mjs +15 -4
- package/es/utils/src/http/devProxy.mjs.map +1 -1
- package/lib/giime/version.d.ts +1 -1
- package/lib/index.css +121 -122
- package/lib/utils/src/http/devProxy.d.ts +22 -0
- package/lib/utils/src/http/devProxy.js +15 -4
- package/lib/utils/src/http/devProxy.js.map +1 -1
- package/package.json +1 -1
package/es/index.css
CHANGED
|
@@ -883,72 +883,105 @@ video {
|
|
|
883
883
|
.gm-group:hover .group-hover\:gm-block {
|
|
884
884
|
display: block;
|
|
885
885
|
}
|
|
886
|
-
.gm-upload-preview-dialog[data-v-
|
|
886
|
+
.gm-upload-pro-preview-dialog[data-v-80b383d8] [data-v-80b383d8] .el-dialog__body {
|
|
887
887
|
padding: 0;
|
|
888
888
|
}
|
|
889
889
|
|
|
890
|
-
.gm-upload-file-picture-card[data-v-
|
|
890
|
+
.gm-upload-pro-file-picture-card[data-v-80b383d8] [data-v-80b383d8] .el-upload-list__item, .gm-upload-pro-file-picture-card[data-v-80b383d8] [data-v-80b383d8] .el-upload--picture-card {
|
|
891
891
|
width: auto;
|
|
892
892
|
height: auto;
|
|
893
893
|
}
|
|
894
|
-
.gm-upload-file {
|
|
894
|
+
.gm-upload-pro-file {
|
|
895
895
|
line-height: normal;
|
|
896
896
|
}
|
|
897
|
-
.gm-upload-file
|
|
897
|
+
.gm-upload-pro-file .el-checkbox-group {
|
|
898
|
+
font-size: unset;
|
|
899
|
+
}
|
|
900
|
+
.gm-upload-pro-file .el-checkbox {
|
|
898
901
|
position: absolute;
|
|
899
902
|
left: 10px;
|
|
900
903
|
top: 0;
|
|
901
904
|
z-index: 9;
|
|
902
905
|
}
|
|
903
|
-
.gm-upload-file .el-upload-list--picture-card {
|
|
906
|
+
.gm-upload-pro-file .el-upload-list--picture-card {
|
|
904
907
|
gap: 10px;
|
|
905
908
|
}
|
|
906
|
-
.gm-upload-file .el-upload-list__item {
|
|
909
|
+
.gm-upload-pro-file .el-upload-list__item {
|
|
907
910
|
margin: 0;
|
|
908
|
-
border: none;
|
|
909
911
|
}
|
|
910
|
-
.gm-upload-file .el-upload-list__item-file-name {
|
|
911
|
-
line-height:
|
|
912
|
+
.gm-upload-pro-file .el-upload-list__item-file-name {
|
|
913
|
+
line-height: 1.7;
|
|
912
914
|
}
|
|
913
|
-
.gm-upload-file .el-upload-dragger {
|
|
915
|
+
.gm-upload-pro-file .el-upload-dragger {
|
|
914
916
|
padding: 0;
|
|
915
917
|
border: none;
|
|
916
918
|
width: 100%;
|
|
917
919
|
height: 100%;
|
|
918
920
|
display: flex;
|
|
919
921
|
}
|
|
920
|
-
.gm-upload-file .el-upload--picture-card {
|
|
922
|
+
.gm-upload-pro-file .el-upload--picture-card {
|
|
921
923
|
border: none;
|
|
922
924
|
}
|
|
923
925
|
|
|
924
|
-
.gm-upload-file-disabled .el-upload--picture-card {
|
|
926
|
+
.gm-upload-pro-file-disabled .el-upload--picture-card {
|
|
925
927
|
display: none;
|
|
926
928
|
}
|
|
927
|
-
.gm-upload-file-disabled .el-upload-list__item-status-label {
|
|
929
|
+
.gm-upload-pro-file-disabled .el-upload-list__item-status-label {
|
|
928
930
|
display: none;
|
|
929
931
|
}
|
|
930
|
-
|
|
931
|
-
|
|
932
|
+
|
|
933
|
+
.gm-range-number .el-form-item[data-v-1ae16d96] {
|
|
934
|
+
margin: 0;
|
|
932
935
|
}
|
|
933
936
|
|
|
934
|
-
[data-v-
|
|
935
|
-
|
|
937
|
+
.circular[data-v-d7b04fae] {
|
|
938
|
+
animation: loading-rotate-d7b04fae 2s linear infinite;
|
|
936
939
|
}
|
|
937
940
|
|
|
938
|
-
[data-v-
|
|
939
|
-
|
|
941
|
+
.path[data-v-d7b04fae] {
|
|
942
|
+
animation: loading-dash-d7b04fae 1.5s ease-in-out infinite;
|
|
943
|
+
stroke-dasharray: 90, 150;
|
|
944
|
+
stroke-dashoffset: 0;
|
|
945
|
+
stroke: var(--el-color-primary);
|
|
946
|
+
stroke-linecap: round;
|
|
940
947
|
}
|
|
941
948
|
|
|
942
|
-
|
|
943
|
-
|
|
949
|
+
@keyframes loading-rotate-d7b04fae {
|
|
950
|
+
to {
|
|
951
|
+
transform: rotate(360deg);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
@keyframes loading-dash-d7b04fae {
|
|
955
|
+
0% {
|
|
956
|
+
stroke-dasharray: 1, 200;
|
|
957
|
+
stroke-dashoffset: 0;
|
|
958
|
+
}
|
|
959
|
+
50% {
|
|
960
|
+
stroke-dasharray: 90, 150;
|
|
961
|
+
stroke-dashoffset: -40px;
|
|
962
|
+
}
|
|
963
|
+
100% {
|
|
964
|
+
stroke-dasharray: 90, 150;
|
|
965
|
+
stroke-dashoffset: -120px;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
.gm-number-interval-single[data-v-4e6f4d6f] {
|
|
969
|
+
border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
|
|
970
|
+
box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
|
|
971
|
+
background-color: var(--el-input-bg-color, var(--el-fill-color-blank));
|
|
972
|
+
}
|
|
973
|
+
.gm-number-interval-single[data-v-4e6f4d6f] [data-v-4e6f4d6f] .el-input__wrapper {
|
|
974
|
+
box-shadow: none;
|
|
975
|
+
background: none;
|
|
944
976
|
}
|
|
945
977
|
|
|
946
|
-
[data-v-
|
|
947
|
-
|
|
978
|
+
.gm-number-interval-close[data-v-4e6f4d6f] {
|
|
979
|
+
display: none;
|
|
980
|
+
color: var(--el-input-icon-color, var(--el-text-color-placeholder));
|
|
948
981
|
}
|
|
949
982
|
|
|
950
|
-
[data-v-
|
|
951
|
-
|
|
983
|
+
.gm-number-interval-single[data-v-4e6f4d6f]:hover .gm-number-interval-close[data-v-4e6f4d6f] {
|
|
984
|
+
display: flex;
|
|
952
985
|
}
|
|
953
986
|
[data-v-79615afd] .gmSearchForm .el-form-item {
|
|
954
987
|
margin-right: 0;
|
|
@@ -977,68 +1010,71 @@ video {
|
|
|
977
1010
|
[data-v-98c2e804] .gmTableNoBorder .el-table__border-left-patch {
|
|
978
1011
|
height: 0;
|
|
979
1012
|
}
|
|
980
|
-
|
|
981
|
-
border-
|
|
982
|
-
box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
|
|
983
|
-
background-color: var(--el-input-bg-color, var(--el-fill-color-blank));
|
|
1013
|
+
[data-v-050a4f74] .gmTableNoBorder .el-table__body .el-table__cell {
|
|
1014
|
+
border-right: none;
|
|
984
1015
|
}
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1016
|
+
|
|
1017
|
+
[data-v-050a4f74] .gmTableNoBorder .el-table__inner-wrapper:before {
|
|
1018
|
+
height: 0;
|
|
988
1019
|
}
|
|
989
1020
|
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
color: var(--el-input-icon-color, var(--el-text-color-placeholder));
|
|
1021
|
+
[data-v-050a4f74] .gmTableNoBorder.el-table--border .el-table__inner-wrapper:after {
|
|
1022
|
+
height: 0;
|
|
993
1023
|
}
|
|
994
1024
|
|
|
995
|
-
|
|
996
|
-
|
|
1025
|
+
[data-v-050a4f74] .gmTableNoBorder.el-table--border:after {
|
|
1026
|
+
height: 0;
|
|
997
1027
|
}
|
|
998
|
-
|
|
1028
|
+
|
|
1029
|
+
[data-v-050a4f74] .gmTableNoBorder.el-table--border:before {
|
|
1030
|
+
height: 0;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
[data-v-050a4f74] .gmTableNoBorder .el-table__border-left-patch {
|
|
1034
|
+
height: 0;
|
|
1035
|
+
}
|
|
1036
|
+
.gm-upload-preview-dialog[data-v-c615121c] [data-v-c615121c] .el-dialog__body {
|
|
999
1037
|
padding: 0;
|
|
1000
1038
|
}
|
|
1001
1039
|
|
|
1002
|
-
.gm-upload-
|
|
1040
|
+
.gm-upload-file-picture-card[data-v-c615121c] [data-v-c615121c] .el-upload-list__item, .gm-upload-file-picture-card[data-v-c615121c] [data-v-c615121c] .el-upload--picture-card {
|
|
1003
1041
|
width: auto;
|
|
1004
1042
|
height: auto;
|
|
1005
1043
|
}
|
|
1006
|
-
.gm-upload-
|
|
1044
|
+
.gm-upload-file {
|
|
1007
1045
|
line-height: normal;
|
|
1008
1046
|
}
|
|
1009
|
-
.gm-upload-
|
|
1010
|
-
font-size: unset;
|
|
1011
|
-
}
|
|
1012
|
-
.gm-upload-pro-file .el-checkbox {
|
|
1047
|
+
.gm-upload-file li > .el-checkbox {
|
|
1013
1048
|
position: absolute;
|
|
1014
1049
|
left: 10px;
|
|
1015
1050
|
top: 0;
|
|
1016
1051
|
z-index: 9;
|
|
1017
1052
|
}
|
|
1018
|
-
.gm-upload-
|
|
1053
|
+
.gm-upload-file .el-upload-list--picture-card {
|
|
1019
1054
|
gap: 10px;
|
|
1020
1055
|
}
|
|
1021
|
-
.gm-upload-
|
|
1056
|
+
.gm-upload-file .el-upload-list__item {
|
|
1022
1057
|
margin: 0;
|
|
1058
|
+
border: none;
|
|
1023
1059
|
}
|
|
1024
|
-
.gm-upload-
|
|
1025
|
-
line-height:
|
|
1060
|
+
.gm-upload-file .el-upload-list__item-file-name {
|
|
1061
|
+
line-height: normal;
|
|
1026
1062
|
}
|
|
1027
|
-
.gm-upload-
|
|
1063
|
+
.gm-upload-file .el-upload-dragger {
|
|
1028
1064
|
padding: 0;
|
|
1029
1065
|
border: none;
|
|
1030
1066
|
width: 100%;
|
|
1031
1067
|
height: 100%;
|
|
1032
1068
|
display: flex;
|
|
1033
1069
|
}
|
|
1034
|
-
.gm-upload-
|
|
1070
|
+
.gm-upload-file .el-upload--picture-card {
|
|
1035
1071
|
border: none;
|
|
1036
1072
|
}
|
|
1037
1073
|
|
|
1038
|
-
.gm-upload-
|
|
1074
|
+
.gm-upload-file-disabled .el-upload--picture-card {
|
|
1039
1075
|
display: none;
|
|
1040
1076
|
}
|
|
1041
|
-
.gm-upload-
|
|
1077
|
+
.gm-upload-file-disabled .el-upload-list__item-status-label {
|
|
1042
1078
|
display: none;
|
|
1043
1079
|
}
|
|
1044
1080
|
.gm-flex-center[data-v-c17deec9] {
|
|
@@ -1048,160 +1084,123 @@ video {
|
|
|
1048
1084
|
.gm-flex-justify-between[data-v-c17deec9] {
|
|
1049
1085
|
justify-content: space-between;
|
|
1050
1086
|
}
|
|
1051
|
-
.circular[data-v-d7b04fae] {
|
|
1052
|
-
animation: loading-rotate-d7b04fae 2s linear infinite;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
.path[data-v-d7b04fae] {
|
|
1056
|
-
animation: loading-dash-d7b04fae 1.5s ease-in-out infinite;
|
|
1057
|
-
stroke-dasharray: 90, 150;
|
|
1058
|
-
stroke-dashoffset: 0;
|
|
1059
|
-
stroke: var(--el-color-primary);
|
|
1060
|
-
stroke-linecap: round;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
@keyframes loading-rotate-d7b04fae {
|
|
1064
|
-
to {
|
|
1065
|
-
transform: rotate(360deg);
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
@keyframes loading-dash-d7b04fae {
|
|
1069
|
-
0% {
|
|
1070
|
-
stroke-dasharray: 1, 200;
|
|
1071
|
-
stroke-dashoffset: 0;
|
|
1072
|
-
}
|
|
1073
|
-
50% {
|
|
1074
|
-
stroke-dasharray: 90, 150;
|
|
1075
|
-
stroke-dashoffset: -40px;
|
|
1076
|
-
}
|
|
1077
|
-
100% {
|
|
1078
|
-
stroke-dasharray: 90, 150;
|
|
1079
|
-
stroke-dashoffset: -120px;
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
.gm-range-number .el-form-item[data-v-1ae16d96] {
|
|
1084
|
-
margin: 0;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
1087
|
@charset "UTF-8";
|
|
1088
|
-
.
|
|
1088
|
+
.custom-operate-drawer .el-drawer__header {
|
|
1089
1089
|
padding: 10px 15px;
|
|
1090
1090
|
margin: 0;
|
|
1091
1091
|
border-bottom: 1px solid #ebeef5;
|
|
1092
1092
|
}
|
|
1093
|
-
.
|
|
1093
|
+
.custom-operate-drawer .el-drawer__title {
|
|
1094
1094
|
font-size: 14px;
|
|
1095
1095
|
color: #333;
|
|
1096
1096
|
}
|
|
1097
|
-
.
|
|
1097
|
+
.custom-operate-drawer .el-drawer__body {
|
|
1098
1098
|
padding: 15px;
|
|
1099
1099
|
}
|
|
1100
|
-
.
|
|
1100
|
+
.custom-operate-drawer .el-drawer__footer {
|
|
1101
1101
|
padding: 10px 15px;
|
|
1102
1102
|
border-top: 1px solid #ebeef5;
|
|
1103
1103
|
}
|
|
1104
|
-
.
|
|
1104
|
+
.custom-operate-drawer .el-checkbox {
|
|
1105
1105
|
display: flex;
|
|
1106
1106
|
align-items: center;
|
|
1107
1107
|
}
|
|
1108
|
-
.
|
|
1108
|
+
.custom-operate-drawer .el-input__inner {
|
|
1109
1109
|
text-align: center;
|
|
1110
1110
|
}
|
|
1111
|
-
.
|
|
1111
|
+
.custom-operate-drawer .el-input__suffix {
|
|
1112
1112
|
position: absolute;
|
|
1113
1113
|
right: 10px;
|
|
1114
1114
|
}
|
|
1115
|
-
.
|
|
1115
|
+
.custom-operate-drawer .custom-content li {
|
|
1116
1116
|
display: flex;
|
|
1117
1117
|
align-items: center;
|
|
1118
1118
|
justify-content: center;
|
|
1119
1119
|
height: 44px;
|
|
1120
1120
|
}
|
|
1121
|
-
.
|
|
1121
|
+
.custom-operate-drawer .custom-group {
|
|
1122
1122
|
max-height: calc(100vh - 226px);
|
|
1123
1123
|
overflow-y: auto;
|
|
1124
1124
|
}
|
|
1125
|
-
.
|
|
1125
|
+
.custom-operate-drawer .custom-group::-webkit-scrollbar {
|
|
1126
1126
|
/*滚动条整体样式*/
|
|
1127
1127
|
width: 4px;
|
|
1128
1128
|
/*高宽分别对应横竖滚动条的尺寸*/
|
|
1129
1129
|
height: 1px;
|
|
1130
1130
|
}
|
|
1131
|
-
.
|
|
1131
|
+
.custom-operate-drawer .custom-group::-webkit-scrollbar-thumb {
|
|
1132
1132
|
/*滚动条里面小方块*/
|
|
1133
1133
|
border-radius: 10px;
|
|
1134
1134
|
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
|
|
1135
1135
|
background: #999;
|
|
1136
1136
|
}
|
|
1137
|
-
.
|
|
1137
|
+
.custom-operate-drawer .custom-group::-webkit-scrollbar-track {
|
|
1138
1138
|
/*滚动条里面轨道*/
|
|
1139
1139
|
box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
|
|
1140
1140
|
border-radius: 10px;
|
|
1141
1141
|
background: #eee;
|
|
1142
1142
|
}
|
|
1143
|
-
|
|
1144
|
-
.pagination-container[data-v-47d35e7b] {
|
|
1145
|
-
background: #fff;
|
|
1146
|
-
padding-top: 12px;
|
|
1147
|
-
}
|
|
1148
|
-
.pagination-container.hidden[data-v-47d35e7b] {
|
|
1149
|
-
display: none;
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
1143
|
@charset "UTF-8";
|
|
1153
|
-
.custom-
|
|
1144
|
+
.table-custom-header-drawer .el-drawer__header {
|
|
1154
1145
|
padding: 10px 15px;
|
|
1155
1146
|
margin: 0;
|
|
1156
1147
|
border-bottom: 1px solid #ebeef5;
|
|
1157
1148
|
}
|
|
1158
|
-
.custom-
|
|
1149
|
+
.table-custom-header-drawer .el-drawer__title {
|
|
1159
1150
|
font-size: 14px;
|
|
1160
1151
|
color: #333;
|
|
1161
1152
|
}
|
|
1162
|
-
.custom-
|
|
1153
|
+
.table-custom-header-drawer .el-drawer__body {
|
|
1163
1154
|
padding: 15px;
|
|
1164
1155
|
}
|
|
1165
|
-
.custom-
|
|
1156
|
+
.table-custom-header-drawer .el-drawer__footer {
|
|
1166
1157
|
padding: 10px 15px;
|
|
1167
1158
|
border-top: 1px solid #ebeef5;
|
|
1168
1159
|
}
|
|
1169
|
-
.custom-
|
|
1160
|
+
.table-custom-header-drawer .el-checkbox {
|
|
1170
1161
|
display: flex;
|
|
1171
1162
|
align-items: center;
|
|
1172
1163
|
}
|
|
1173
|
-
.custom-
|
|
1164
|
+
.table-custom-header-drawer .el-input__inner {
|
|
1174
1165
|
text-align: center;
|
|
1175
1166
|
}
|
|
1176
|
-
.custom-
|
|
1167
|
+
.table-custom-header-drawer .el-input__suffix {
|
|
1177
1168
|
position: absolute;
|
|
1178
1169
|
right: 10px;
|
|
1179
1170
|
}
|
|
1180
|
-
.custom-
|
|
1171
|
+
.table-custom-header-drawer .custom-content li {
|
|
1181
1172
|
display: flex;
|
|
1182
1173
|
align-items: center;
|
|
1183
1174
|
justify-content: center;
|
|
1184
1175
|
height: 44px;
|
|
1185
1176
|
}
|
|
1186
|
-
.custom-
|
|
1177
|
+
.table-custom-header-drawer .custom-group {
|
|
1187
1178
|
max-height: calc(100vh - 226px);
|
|
1188
1179
|
overflow-y: auto;
|
|
1189
1180
|
}
|
|
1190
|
-
.custom-
|
|
1181
|
+
.table-custom-header-drawer .custom-group::-webkit-scrollbar {
|
|
1191
1182
|
/*滚动条整体样式*/
|
|
1192
1183
|
width: 4px;
|
|
1193
1184
|
/*高宽分别对应横竖滚动条的尺寸*/
|
|
1194
1185
|
height: 1px;
|
|
1195
1186
|
}
|
|
1196
|
-
.custom-
|
|
1187
|
+
.table-custom-header-drawer .custom-group::-webkit-scrollbar-thumb {
|
|
1197
1188
|
/*滚动条里面小方块*/
|
|
1198
1189
|
border-radius: 10px;
|
|
1199
1190
|
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
|
|
1200
1191
|
background: #999;
|
|
1201
1192
|
}
|
|
1202
|
-
.custom-
|
|
1193
|
+
.table-custom-header-drawer .custom-group::-webkit-scrollbar-track {
|
|
1203
1194
|
/*滚动条里面轨道*/
|
|
1204
1195
|
box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
|
|
1205
1196
|
border-radius: 10px;
|
|
1206
1197
|
background: #eee;
|
|
1207
|
-
}
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
.pagination-container[data-v-47d35e7b] {
|
|
1201
|
+
background: #fff;
|
|
1202
|
+
padding-top: 12px;
|
|
1203
|
+
}
|
|
1204
|
+
.pagination-container.hidden[data-v-47d35e7b] {
|
|
1205
|
+
display: none;
|
|
1206
|
+
}
|
|
@@ -7,6 +7,8 @@ export interface AutoProxyOptions {
|
|
|
7
7
|
excludeKeys?: string[];
|
|
8
8
|
/** 是否禁用本地开发环境代理(禁用后不会代理到 localhost) */
|
|
9
9
|
disableLocal?: boolean;
|
|
10
|
+
/** 需要排除的路径数组(支持带或不带尾部斜杠,如 '/third/am' 或 '/third/am/') */
|
|
11
|
+
excludePaths?: string[];
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* 默认开发代理配置
|
|
@@ -44,6 +46,16 @@ export declare const giimeDevProxy: Record<string, string | ProxyOptions>;
|
|
|
44
46
|
* })
|
|
45
47
|
* }
|
|
46
48
|
* })
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* // 排除特定路径(支持带或不带尾部斜杠)
|
|
52
|
+
* export default defineConfig({
|
|
53
|
+
* server: {
|
|
54
|
+
* proxy: autoGenerateProxy(process.env, {
|
|
55
|
+
* excludePaths: ['/third/am', '/third/gstore/']
|
|
56
|
+
* })
|
|
57
|
+
* }
|
|
58
|
+
* })
|
|
47
59
|
*/
|
|
48
60
|
export declare const autoGenerateProxy: (env: Record<string, string>, options?: AutoProxyOptions) => Record<string, string | ProxyOptions>;
|
|
49
61
|
/**
|
|
@@ -73,5 +85,15 @@ export declare const autoGenerateProxy: (env: Record<string, string>, options?:
|
|
|
73
85
|
* })
|
|
74
86
|
* }
|
|
75
87
|
* })
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* // 排除特定路径
|
|
91
|
+
* export default defineConfig({
|
|
92
|
+
* server: {
|
|
93
|
+
* proxy: giimeDevProxyFn(process.env, {
|
|
94
|
+
* excludePaths: ['/third/am', '/third/am/']
|
|
95
|
+
* })
|
|
96
|
+
* }
|
|
97
|
+
* })
|
|
76
98
|
*/
|
|
77
99
|
export declare const giimeDevProxyFn: (env: Record<string, string>, options?: AutoProxyOptions) => Record<string, string | ProxyOptions>;
|
|
@@ -2,15 +2,24 @@ import { bypass } from '../vue/resolver.mjs';
|
|
|
2
2
|
import { resetEnvMode } from '../../../constants/key.mjs';
|
|
3
3
|
import { getEnvConfig } from './createModes.mjs';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const normalizePath = (path) => {
|
|
6
|
+
return path.endsWith("/") ? path.slice(0, -1) : path;
|
|
7
|
+
};
|
|
8
|
+
const isPathExcluded = (path, excludePaths) => {
|
|
9
|
+
if (!excludePaths || excludePaths.length === 0) return false;
|
|
10
|
+
const normalizedPath = normalizePath(path);
|
|
11
|
+
return excludePaths.some((excludePath) => normalizePath(excludePath) === normalizedPath);
|
|
12
|
+
};
|
|
13
|
+
const API_SERVICE_TYPES = ["/third/gstore", "/third/am", "/guard", "/fe/basic", "/middle", "/product-center"];
|
|
6
14
|
const resolveBaseUrl = (mode) => {
|
|
7
15
|
return getEnvConfig(mode).url;
|
|
8
16
|
};
|
|
9
|
-
const generateProxyConfig = (mode) => {
|
|
17
|
+
const generateProxyConfig = (mode, excludePaths) => {
|
|
10
18
|
const config = {};
|
|
11
19
|
const giimeMode = mode || "development";
|
|
12
20
|
const baseUrl = resolveBaseUrl(giimeMode);
|
|
13
21
|
API_SERVICE_TYPES.forEach((serviceType) => {
|
|
22
|
+
if (isPathExcluded(serviceType, excludePaths)) return;
|
|
14
23
|
config[serviceType] = {
|
|
15
24
|
target: baseUrl,
|
|
16
25
|
changeOrigin: true,
|
|
@@ -27,6 +36,7 @@ const autoGenerateProxy = (env, options) => {
|
|
|
27
36
|
const proxyTarget = resolveBaseUrl(giimeMode);
|
|
28
37
|
const processedPaths = /* @__PURE__ */ new Set();
|
|
29
38
|
const excludeKeys = options?.excludeKeys || [];
|
|
39
|
+
const excludePaths = options?.excludePaths;
|
|
30
40
|
const disableLocal = options?.disableLocal || false;
|
|
31
41
|
for (const [key, value] of Object.entries(env)) {
|
|
32
42
|
if (!key.startsWith("VITE_")) continue;
|
|
@@ -35,7 +45,8 @@ const autoGenerateProxy = (env, options) => {
|
|
|
35
45
|
const cleanValue = value.replace(/['"]/g, "").trim();
|
|
36
46
|
if (!cleanValue.startsWith("/") || cleanValue === "/") continue;
|
|
37
47
|
if (disableLocal && giimeMode === "development") continue;
|
|
38
|
-
const normalizedPath =
|
|
48
|
+
const normalizedPath = normalizePath(cleanValue);
|
|
49
|
+
if (isPathExcluded(normalizedPath, excludePaths)) continue;
|
|
39
50
|
if (processedPaths.has(normalizedPath)) continue;
|
|
40
51
|
proxy[normalizedPath] = {
|
|
41
52
|
target: proxyTarget,
|
|
@@ -50,7 +61,7 @@ const autoGenerateProxy = (env, options) => {
|
|
|
50
61
|
const giimeDevProxyFn = (env, options) => {
|
|
51
62
|
const mode = env[resetEnvMode];
|
|
52
63
|
return {
|
|
53
|
-
...generateProxyConfig(mode),
|
|
64
|
+
...generateProxyConfig(mode, options?.excludePaths),
|
|
54
65
|
// 预定义的服务类型配置
|
|
55
66
|
...autoGenerateProxy(env, options)
|
|
56
67
|
// 自动扫描的配置
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devProxy.mjs","sources":["../../../../../../packages/utils/src/http/devProxy.ts"],"sourcesContent":["import type { ProxyOptions } from 'vite';\nimport { bypass } from '../vue/resolver';\n// background引用,先必须使用../../\nimport { resetEnvMode } from '../../../constants/key';\nimport { getEnvConfig } from './createModes';\n\n/**\n * 自动代理配置选项\n */\nexport interface AutoProxyOptions {\n /** 需要排除的环境变量名称数组 */\n excludeKeys?: string[];\n /** 是否禁用本地开发环境代理(禁用后不会代理到 localhost) */\n disableLocal?: boolean;\n}\n\n/**\n * 预定义的 API 服务类型列表\n */\nconst API_SERVICE_TYPES = ['/third/gstore', '/third/am', '/guard', 'fe/basic', '/middle', '/product-center'];\n\n/**\n * 根据模式获取基础URL\n * @param mode 环境模式\n * @returns 基础URL\n */\nconst resolveBaseUrl = (mode?: string): string => {\n return getEnvConfig(mode).url;\n};\n\n/**\n * 生成代理配置对象\n * @param mode 环境模式(可选)\n * @returns 代理配置对象\n */\nconst generateProxyConfig = (mode?: string): Record<string, string | ProxyOptions> => {\n const config: Record<string, string | ProxyOptions> = {};\n // 使用 VITE_GIIME_MODE 确定代理目标,默认为 development\n const giimeMode = mode || 'development';\n const baseUrl = resolveBaseUrl(giimeMode);\n\n API_SERVICE_TYPES.forEach(serviceType => {\n config[serviceType] = {\n target: baseUrl,\n changeOrigin: true,\n rewrite: (p: string) => p.replace(new RegExp(`^${serviceType.replace(/\\//g, '\\\\/')}`), serviceType),\n bypass,\n };\n });\n\n return config;\n};\n\n/**\n * 默认开发代理配置\n * https://cn.vitejs.dev/config/#server-proxy\n */\nexport const giimeDevProxy: Record<string, string | ProxyOptions> = generateProxyConfig();\n\n/**\n * 自动生成代理配置(通过扫描环境变量)\n * - 自动读取环境变量中以斜杠开头的 VITE_ 变量\n * - 根据 VITE_GIIME_MODE 自动确定代理目标服务器\n * - 支持排除特定环境变量\n * - 支持禁用本地开发环境代理\n *\n * @param env 环境变量对象\n * @param options 配置选项\n * @param options.excludeKeys 需要排除的环境变量名称数组\n * @param options.disableLocal 是否禁用本地开发环境代理\n * @returns 代理配置对象\n *\n * @example\n * // 基础用法 - 自动扫描环境变量\n * export default defineConfig({\n * server: {\n * proxy: autoGenerateProxy(process.env)\n * }\n * })\n *\n * @example\n * // 排除特定环境变量并禁用本地代理\n * export default defineConfig({\n * server: {\n * proxy: autoGenerateProxy(process.env, {\n * excludeKeys: ['VITE_APP_TITLE', 'VITE_PUBLIC_PATH'],\n * disableLocal: true\n * })\n * }\n * })\n */\nexport const autoGenerateProxy = (env: Record<string, string>, options?: AutoProxyOptions): Record<string, string | ProxyOptions> => {\n const proxy: Record<string, string | ProxyOptions> = {};\n\n // 使用 VITE_GIIME_MODE 确定代理目标,默认为 development\n const giimeMode = env.VITE_GIIME_MODE || 'development';\n const proxyTarget = resolveBaseUrl(giimeMode);\n\n const processedPaths = new Set<string>();\n const excludeKeys = options?.excludeKeys || [];\n const disableLocal = options?.disableLocal || false;\n\n // 遍历所有环境变量\n for (const [key, value] of Object.entries(env)) {\n // 只处理 VITE_ 开头的变量\n if (!key.startsWith('VITE_')) continue;\n\n // 跳过被排除的环境变量\n if (excludeKeys.includes(key)) continue;\n\n // 跳过 VITE_BASE_URL\n if (key === 'VITE_BASE_URL') continue;\n\n // 移除引号并获取清理后的值\n const cleanValue = value.replace(/['\"]/g, '').trim();\n\n // 只处理以斜杠开头且后续有值的路径(排除单独的 '/')\n if (!cleanValue.startsWith('/') || cleanValue === '/') continue;\n\n // 如果禁用本地代理且当前模式是 development,跳过\n if (disableLocal && giimeMode === 'development') continue;\n\n // 标准化路径:移除尾部斜杠\n const normalizedPath = cleanValue
|
|
1
|
+
{"version":3,"file":"devProxy.mjs","sources":["../../../../../../packages/utils/src/http/devProxy.ts"],"sourcesContent":["import type { ProxyOptions } from 'vite';\nimport { bypass } from '../vue/resolver';\n// background引用,先必须使用../../\nimport { resetEnvMode } from '../../../constants/key';\nimport { getEnvConfig } from './createModes';\n\n/**\n * 自动代理配置选项\n */\nexport interface AutoProxyOptions {\n /** 需要排除的环境变量名称数组 */\n excludeKeys?: string[];\n /** 是否禁用本地开发环境代理(禁用后不会代理到 localhost) */\n disableLocal?: boolean;\n /** 需要排除的路径数组(支持带或不带尾部斜杠,如 '/third/am' 或 '/third/am/') */\n excludePaths?: string[];\n}\n\n/**\n * 标准化路径(移除尾部斜杠)\n * @param path 原始路径\n * @returns 标准化后的路径\n */\nconst normalizePath = (path: string): string => {\n return path.endsWith('/') ? path.slice(0, -1) : path;\n};\n\n/**\n * 检查路径是否在排除列表中\n * @param path 需要检查的路径\n * @param excludePaths 排除路径列表\n * @returns 是否应该被排除\n */\nconst isPathExcluded = (path: string, excludePaths?: string[]): boolean => {\n if (!excludePaths || excludePaths.length === 0) return false;\n const normalizedPath = normalizePath(path);\n return excludePaths.some(excludePath => normalizePath(excludePath) === normalizedPath);\n};\n\n/**\n * 预定义的 API 服务类型列表\n */\nconst API_SERVICE_TYPES = ['/third/gstore', '/third/am', '/guard', '/fe/basic', '/middle', '/product-center'];\n\n/**\n * 根据模式获取基础URL\n * @param mode 环境模式\n * @returns 基础URL\n */\nconst resolveBaseUrl = (mode?: string): string => {\n return getEnvConfig(mode).url;\n};\n\n/**\n * 生成代理配置对象\n * @param mode 环境模式(可选)\n * @param excludePaths 需要排除的路径数组\n * @returns 代理配置对象\n */\nconst generateProxyConfig = (mode?: string, excludePaths?: string[]): Record<string, string | ProxyOptions> => {\n const config: Record<string, string | ProxyOptions> = {};\n // 使用 VITE_GIIME_MODE 确定代理目标,默认为 development\n const giimeMode = mode || 'development';\n const baseUrl = resolveBaseUrl(giimeMode);\n\n API_SERVICE_TYPES.forEach(serviceType => {\n // 跳过被排除的路径\n if (isPathExcluded(serviceType, excludePaths)) return;\n\n config[serviceType] = {\n target: baseUrl,\n changeOrigin: true,\n rewrite: (p: string) => p.replace(new RegExp(`^${serviceType.replace(/\\//g, '\\\\/')}`), serviceType),\n bypass,\n };\n });\n\n return config;\n};\n\n/**\n * 默认开发代理配置\n * https://cn.vitejs.dev/config/#server-proxy\n */\nexport const giimeDevProxy: Record<string, string | ProxyOptions> = generateProxyConfig();\n\n/**\n * 自动生成代理配置(通过扫描环境变量)\n * - 自动读取环境变量中以斜杠开头的 VITE_ 变量\n * - 根据 VITE_GIIME_MODE 自动确定代理目标服务器\n * - 支持排除特定环境变量\n * - 支持禁用本地开发环境代理\n *\n * @param env 环境变量对象\n * @param options 配置选项\n * @param options.excludeKeys 需要排除的环境变量名称数组\n * @param options.disableLocal 是否禁用本地开发环境代理\n * @returns 代理配置对象\n *\n * @example\n * // 基础用法 - 自动扫描环境变量\n * export default defineConfig({\n * server: {\n * proxy: autoGenerateProxy(process.env)\n * }\n * })\n *\n * @example\n * // 排除特定环境变量并禁用本地代理\n * export default defineConfig({\n * server: {\n * proxy: autoGenerateProxy(process.env, {\n * excludeKeys: ['VITE_APP_TITLE', 'VITE_PUBLIC_PATH'],\n * disableLocal: true\n * })\n * }\n * })\n *\n * @example\n * // 排除特定路径(支持带或不带尾部斜杠)\n * export default defineConfig({\n * server: {\n * proxy: autoGenerateProxy(process.env, {\n * excludePaths: ['/third/am', '/third/gstore/']\n * })\n * }\n * })\n */\nexport const autoGenerateProxy = (env: Record<string, string>, options?: AutoProxyOptions): Record<string, string | ProxyOptions> => {\n const proxy: Record<string, string | ProxyOptions> = {};\n\n // 使用 VITE_GIIME_MODE 确定代理目标,默认为 development\n const giimeMode = env.VITE_GIIME_MODE || 'development';\n const proxyTarget = resolveBaseUrl(giimeMode);\n\n const processedPaths = new Set<string>();\n const excludeKeys = options?.excludeKeys || [];\n const excludePaths = options?.excludePaths;\n const disableLocal = options?.disableLocal || false;\n\n // 遍历所有环境变量\n for (const [key, value] of Object.entries(env)) {\n // 只处理 VITE_ 开头的变量\n if (!key.startsWith('VITE_')) continue;\n\n // 跳过被排除的环境变量\n if (excludeKeys.includes(key)) continue;\n\n // 跳过 VITE_BASE_URL\n if (key === 'VITE_BASE_URL') continue;\n\n // 移除引号并获取清理后的值\n const cleanValue = value.replace(/['\"]/g, '').trim();\n\n // 只处理以斜杠开头且后续有值的路径(排除单独的 '/')\n if (!cleanValue.startsWith('/') || cleanValue === '/') continue;\n\n // 如果禁用本地代理且当前模式是 development,跳过\n if (disableLocal && giimeMode === 'development') continue;\n\n // 标准化路径:移除尾部斜杠\n const normalizedPath = normalizePath(cleanValue);\n\n // 跳过被排除的路径\n if (isPathExcluded(normalizedPath, excludePaths)) continue;\n\n // 跳过已处理的路径(避免重复配置)\n if (processedPaths.has(normalizedPath)) continue;\n\n // 生成代理配置\n proxy[normalizedPath] = {\n target: proxyTarget,\n changeOrigin: true,\n rewrite: (p: string) => p.replace(new RegExp(`^${normalizedPath.replace(/\\//g, '\\\\/')}`), normalizedPath),\n bypass,\n };\n\n processedPaths.add(normalizedPath);\n }\n\n return proxy;\n};\n\n/**\n * 根据环境动态生成代理配置(融合版)\n * - 包含预定义的 API 服务类型代理配置\n * - 包含自动扫描环境变量的代理配置\n *\n * @param env 环境变量对象\n * @param options 自动代理配置选项\n * @returns 代理配置对象\n *\n * @example\n * // 基础用法\n * export default defineConfig({\n * server: {\n * proxy: giimeDevProxyFn(process.env)\n * }\n * })\n *\n * @example\n * // 带选项\n * export default defineConfig({\n * server: {\n * proxy: giimeDevProxyFn(process.env, {\n * excludeKeys: ['VITE_APP_TITLE'],\n * disableLocal: true\n * })\n * }\n * })\n *\n * @example\n * // 排除特定路径\n * export default defineConfig({\n * server: {\n * proxy: giimeDevProxyFn(process.env, {\n * excludePaths: ['/third/am', '/third/am/']\n * })\n * }\n * })\n */\nexport const giimeDevProxyFn = (env: Record<string, string>, options?: AutoProxyOptions): Record<string, string | ProxyOptions> => {\n const mode = env[resetEnvMode];\n\n // 融合两种代理配置\n return {\n ...generateProxyConfig(mode, options?.excludePaths), // 预定义的服务类型配置\n ...autoGenerateProxy(env, options), // 自动扫描的配置\n };\n};\n"],"names":[],"mappings":";;;;AAuBA,MAAM,aAAA,GAAgB,CAAC,IAAA,KAAyB;AAC9C,EAAA,OAAO,IAAA,CAAK,SAAS,GAAG,CAAA,GAAI,KAAK,KAAA,CAAM,CAAA,EAAG,EAAE,CAAA,GAAI,IAAA;AAClD,CAAA;AAQA,MAAM,cAAA,GAAiB,CAAC,IAAA,EAAc,YAAA,KAAqC;AACzE,EAAA,IAAI,CAAC,YAAA,IAAgB,YAAA,CAAa,MAAA,KAAW,GAAG,OAAO,KAAA;AACvD,EAAA,MAAM,c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