dashboard-shell-shell 3.0.5-test.1 → 3.0.5-test.10
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/assets/styles/base/_variables.scss +3 -3
- package/assets/styles/global/_button.scss +7 -7
- package/assets/styles/global/_tooltip.scss +4 -4
- package/assets/styles/themes/_light.scss +3 -1
- package/assets/translations/zh-hans.yaml +76 -0
- package/components/ActionDropdown.vue +1 -1
- package/components/CopyToClipboard.vue +15 -0
- package/components/Drawer/Chrome.vue +2 -2
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -22
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +2 -1
- package/components/ExplorerMembers.vue +18 -3
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
- package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
- package/components/Resource/Detail/Metadata/index.vue +3 -1
- package/components/Resource/Detail/TitleBar/Title.vue +4 -3
- package/components/Resource/Detail/TitleBar/Top.vue +2 -0
- package/components/Resource/Detail/TitleBar/index.vue +109 -24
- package/components/ResourceDetail/Masthead/legacy.vue +235 -164
- package/components/ResourceDetail/legacy.vue +29 -13
- package/components/ResourceList/Masthead.vue +22 -14
- package/components/SortableTable/index.vue +2 -2
- package/components/Tabbed/Tab.vue +1 -1
- package/components/Tabbed/index.vue +51 -32
- package/components/auth/Principal.vue +35 -11
- package/components/breadcrumb/index.vue +316 -0
- package/components/form/LabeledSelect.vue +3 -2
- package/components/form/NameNsDescription.vue +5 -5
- package/components/form/Taints.vue +2 -1
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/nav/Header.vue +3 -4
- package/components/nav/NamespaceFilter.vue +1 -2
- package/edit/workload/index.vue +3 -3
- package/package.json +1 -1
- package/pages/account/index.vue +25 -79
- package/pages/c/_cluster/auth/roles/index.vue +38 -5
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +2 -2
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/rancher-components/BadgeState/BadgeState.vue +33 -52
- package/rancher-components/Banner/Banner.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +8 -7
- package/scripts/publish-shell.sh +1 -1
- package/store/i18n.js +3 -0
- package/store/type-map.js +1 -1
- package/types/shell/index.d.ts +4 -30
- package/utils/error.js +3 -1
- package/utils/errorTranslate.json +15 -0
- package/vue.config.js +5 -5
package/pkg/tsconfig.json
CHANGED
|
@@ -27,25 +27,25 @@
|
|
|
27
27
|
],
|
|
28
28
|
"paths": {
|
|
29
29
|
"@shell/core/*": [
|
|
30
|
-
"../../node_modules
|
|
30
|
+
"../../node_modules/dashboard-shell-shell/core/*"
|
|
31
31
|
],
|
|
32
32
|
"@shell/config/*": [
|
|
33
|
-
"../../node_modules
|
|
33
|
+
"../../node_modules/dashboard-shell-shell/config/*"
|
|
34
34
|
],
|
|
35
35
|
"@shell/store/*": [
|
|
36
|
-
"../../node_modules
|
|
36
|
+
"../../node_modules/dashboard-shell-shell/store/*"
|
|
37
37
|
],
|
|
38
38
|
"@shell/plugins/*": [
|
|
39
|
-
"../../node_modules
|
|
39
|
+
"../../node_modules/dashboard-shell-shell/plugins/*"
|
|
40
40
|
],
|
|
41
41
|
"@shell/utils/*": [
|
|
42
|
-
"../../node_modules
|
|
42
|
+
"../../node_modules/dashboard-shell-shell/utils/*"
|
|
43
43
|
],
|
|
44
44
|
"@shell/models/*": [
|
|
45
|
-
"../../node_modules
|
|
45
|
+
"../../node_modules/dashboard-shell-shell/models/*"
|
|
46
46
|
],
|
|
47
47
|
"@shell/mixins/*": [
|
|
48
|
-
"../../node_modules
|
|
48
|
+
"../../node_modules/dashboard-shell-shell/mixins/*"
|
|
49
49
|
],
|
|
50
50
|
"@pkg/*": [
|
|
51
51
|
"./*"
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"**/*.ts",
|
|
57
57
|
"**/*.tsx",
|
|
58
58
|
"**/*.vue",
|
|
59
|
-
"../../node_modules
|
|
60
|
-
"../../node_modules
|
|
59
|
+
"../../node_modules/dashboard-shell-shell/types/*.d.ts",
|
|
60
|
+
"../../node_modules/dashboard-shell-shell/core/types.ts"
|
|
61
61
|
],
|
|
62
62
|
"exclude": [
|
|
63
63
|
"node_modules"
|
package/pkg/vue.config.js
CHANGED
|
@@ -73,7 +73,7 @@ module.exports = function(dir) {
|
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
// Auto-generate module to import the types (model, detail, edit etc)
|
|
76
|
-
const autoImportPlugin = new VirtualModulesPlugin({ 'node_modules
|
|
76
|
+
const autoImportPlugin = new VirtualModulesPlugin({ 'node_modules/dashboard-shell-shell/auto-import': generateTypeImport('@pkg', dir) });
|
|
77
77
|
|
|
78
78
|
config.plugins.unshift(dynamicImporterOverride);
|
|
79
79
|
config.plugins.unshift(modelLoaderImporterOverride);
|
|
@@ -117,7 +117,7 @@ module.exports = function(dir) {
|
|
|
117
117
|
if (p.use) {
|
|
118
118
|
p.use.forEach((u) => {
|
|
119
119
|
if (u.loader.includes('babel-loader')) {
|
|
120
|
-
p.exclude = /node_modules\/(
|
|
120
|
+
p.exclude = /node_modules\/(?!dashboard-shell-shell\/).*/;
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
123
|
}
|
|
@@ -913,42 +913,42 @@ export default class Resource {
|
|
|
913
913
|
{
|
|
914
914
|
action: this.canUpdate ? 'goToEdit' : 'goToViewConfig',
|
|
915
915
|
label: this.t(this.canUpdate ? 'action.edit' : 'action.view'),
|
|
916
|
-
icon: 'icon icon-edit',
|
|
916
|
+
// icon: 'icon icon-edit',
|
|
917
917
|
enabled: this.canCustomEdit,
|
|
918
918
|
},
|
|
919
|
-
{
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
},
|
|
919
|
+
// {
|
|
920
|
+
// action: this.canEditYaml ? 'goToEditYaml' : 'goToViewYaml',
|
|
921
|
+
// label: this.t(this.canEditYaml ? 'action.editYaml' : 'action.viewYaml'),
|
|
922
|
+
// icon: 'icon icon-file',
|
|
923
|
+
// enabled: this.canYaml,
|
|
924
|
+
// },
|
|
925
925
|
{
|
|
926
926
|
action: (this.canCustomEdit ? 'goToClone' : 'cloneYaml'),
|
|
927
927
|
label: this.t('action.clone'),
|
|
928
|
-
icon: 'icon icon-copy',
|
|
929
|
-
enabled: this.canClone && this.canCreate && (this.canCustomEdit || this.canYaml),
|
|
930
|
-
},
|
|
931
|
-
{ divider: true },
|
|
932
|
-
{
|
|
933
|
-
action: 'download',
|
|
934
|
-
label: this.t('action.download'),
|
|
935
|
-
icon: 'icon icon-download',
|
|
936
|
-
bulkable: true,
|
|
937
|
-
bulkAction: 'downloadBulk',
|
|
938
|
-
enabled: this.canYaml,
|
|
939
|
-
weight: -9,
|
|
940
|
-
},
|
|
941
|
-
{
|
|
942
|
-
action: 'viewInApi',
|
|
943
|
-
label: this.t('action.viewInApi'),
|
|
944
|
-
icon: 'icon icon-external-link',
|
|
945
|
-
enabled: this.canViewInApi,
|
|
928
|
+
// icon: 'icon icon-copy',
|
|
929
|
+
enabled: this.canClone && this.canCreate && (this.canCustomEdit || this.canYaml)&& this.schema.id!=='event',
|
|
946
930
|
},
|
|
931
|
+
// { divider: true },
|
|
932
|
+
// {
|
|
933
|
+
// action: 'download',
|
|
934
|
+
// label: this.t('action.download'),
|
|
935
|
+
// icon: 'icon icon-download',
|
|
936
|
+
// bulkable: true,
|
|
937
|
+
// bulkAction: 'downloadBulk',
|
|
938
|
+
// enabled: this.canYaml,
|
|
939
|
+
// weight: -9,
|
|
940
|
+
// },
|
|
941
|
+
// {
|
|
942
|
+
// action: 'viewInApi',
|
|
943
|
+
// label: this.t('action.viewInApi'),
|
|
944
|
+
// icon: 'icon icon-external-link',
|
|
945
|
+
// enabled: this.canViewInApi,
|
|
946
|
+
// },
|
|
947
947
|
{
|
|
948
948
|
action: 'promptRemove',
|
|
949
949
|
altAction: 'remove',
|
|
950
950
|
label: this.t('action.remove'),
|
|
951
|
-
icon: 'icon icon-trash',
|
|
951
|
+
// icon: 'icon icon-trash',
|
|
952
952
|
bulkable: true,
|
|
953
953
|
enabled: this.canDelete,
|
|
954
954
|
bulkAction: 'promptRemove',
|
|
@@ -1322,7 +1322,8 @@ export default class Resource {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
|
|
1324
1324
|
get detailLocation() {
|
|
1325
|
-
|
|
1325
|
+
let location = this._detailLocation;
|
|
1326
|
+
return location;
|
|
1326
1327
|
}
|
|
1327
1328
|
|
|
1328
1329
|
goToDetail() {
|
|
@@ -63,60 +63,41 @@ export default defineComponent({
|
|
|
63
63
|
</script>
|
|
64
64
|
|
|
65
65
|
<template>
|
|
66
|
-
<
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/>{{ msg }}
|
|
72
|
-
</span>
|
|
66
|
+
<div style="display: flex;flex-direction: row;align-items: center;font-size: 12px;">
|
|
67
|
+
<div :class="{ [bg]: true }"></div>
|
|
68
|
+
<span style="margin-left: 5px;">{{ msg }}</span>
|
|
69
|
+
|
|
70
|
+
</div>
|
|
73
71
|
</template>
|
|
74
|
-
|
|
75
72
|
<style lang="scss" scoped>
|
|
76
|
-
.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
border:
|
|
81
|
-
border-radius: 20px;
|
|
82
|
-
|
|
83
|
-
&.bg-info {
|
|
84
|
-
border-color: var(--info);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&.bg-error {
|
|
88
|
-
border-color: var(--error);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&.bg-warning {
|
|
92
|
-
border-color: var(--warning);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Successful states are de-emphasized by using [text-]color instead of background-color
|
|
96
|
-
&.bg-success {
|
|
97
|
-
color: var(--success);
|
|
98
|
-
background: transparent;
|
|
99
|
-
border-color: var(--success);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Added badge-disabled instead of bg-disabled since bg-disabled is used in other places with !important styling, an investigation is needed to make the naming consistent
|
|
103
|
-
&.badge-disabled {
|
|
104
|
-
color: var(--badge-state-disabled-text);
|
|
105
|
-
background-color: var( --badge-state-disabled-bg);
|
|
106
|
-
border: 1px solid var(--badge-state-disabled-border);
|
|
107
|
-
}
|
|
73
|
+
.bg-error {
|
|
74
|
+
width: 10px; /* 圆点的宽度 */
|
|
75
|
+
height: 10px; /* 圆点的高度 */
|
|
76
|
+
background-color: #DD0C17; /* 圆点的颜色 */
|
|
77
|
+
border-radius: 50%; /* 设置为圆形 */
|
|
108
78
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
79
|
+
.bg-darker {
|
|
80
|
+
width: 10px; /* 圆点的宽度 */
|
|
81
|
+
height: 10px; /* 圆点的高度 */
|
|
82
|
+
background-color: #DD0C17; /* 圆点的颜色 */
|
|
83
|
+
border-radius: 50%; /* 设置为圆形 */
|
|
84
|
+
}
|
|
85
|
+
.bg-success {
|
|
86
|
+
width: 10px; /* 圆点的宽度 */
|
|
87
|
+
height: 10px; /* 圆点的高度 */
|
|
88
|
+
background-color: #95F204 !important; /* 圆点的颜色 */
|
|
89
|
+
border-radius: 50%; /* 设置为圆形 */
|
|
90
|
+
}
|
|
91
|
+
.bg-warning {
|
|
92
|
+
width: 10px; /* 圆点的宽度 */
|
|
93
|
+
height: 10px; /* 圆点的高度 */
|
|
94
|
+
background-color: #DAC342; /* 圆点的颜色 */
|
|
95
|
+
border-radius: 50%; /* 设置为圆形 */
|
|
96
|
+
}
|
|
97
|
+
.bg-info {
|
|
98
|
+
width: 10px; /* 圆点的宽度 */
|
|
99
|
+
height: 10px; /* 圆点的高度 */
|
|
100
|
+
background-color: #1890FF; /* 圆点的颜色 */
|
|
101
|
+
border-radius: 50%; /* 设置为圆形 */
|
|
121
102
|
}
|
|
122
103
|
</style>
|
|
@@ -33,10 +33,10 @@ const hasOptions = (options: DropdownOption[]) => {
|
|
|
33
33
|
:data-testid="dataTestid"
|
|
34
34
|
:aria-label="buttonAriaLabel"
|
|
35
35
|
>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
<div v-if="showIcon">
|
|
37
|
+
<i data-v-5db2c2c7="" class="icon icon-actions" alt="More actions icon"></i>
|
|
38
|
+
</div>
|
|
39
|
+
<a v-else href="javascript:;">操作</a>
|
|
40
40
|
</rc-dropdown-trigger>
|
|
41
41
|
<template #dropdownCollection>
|
|
42
42
|
<template
|
|
@@ -58,15 +58,16 @@ const hasOptions = (options: DropdownOption[]) => {
|
|
|
58
58
|
</template> -->
|
|
59
59
|
{{ a.label }}
|
|
60
60
|
</rc-dropdown-item>
|
|
61
|
-
<rc-dropdown-separator
|
|
61
|
+
<!-- <rc-dropdown-separator
|
|
62
62
|
v-else
|
|
63
|
-
/>
|
|
63
|
+
/> -->
|
|
64
64
|
</template>
|
|
65
65
|
<rc-dropdown-item
|
|
66
66
|
v-if="!hasOptions(options)"
|
|
67
67
|
disabled
|
|
68
68
|
>
|
|
69
|
-
|
|
69
|
+
<!-- No actions available -->
|
|
70
|
+
暂无可执行的操作。
|
|
70
71
|
</rc-dropdown-item>
|
|
71
72
|
</template>
|
|
72
73
|
</rc-dropdown>
|
package/scripts/publish-shell.sh
CHANGED
package/store/i18n.js
CHANGED
package/store/type-map.js
CHANGED
|
@@ -515,7 +515,7 @@ export const getters = {
|
|
|
515
515
|
|
|
516
516
|
groupsForVirTypes(state) {
|
|
517
517
|
return (product, name) => {
|
|
518
|
-
return state
|
|
518
|
+
return state?.virtualTypes?.[product]?.find(item => item.name === name)?.icon;
|
|
519
519
|
};
|
|
520
520
|
},
|
|
521
521
|
|
package/types/shell/index.d.ts
CHANGED
|
@@ -3053,37 +3053,24 @@ export default class Resource {
|
|
|
3053
3053
|
divider: boolean;
|
|
3054
3054
|
action?: undefined;
|
|
3055
3055
|
label?: undefined;
|
|
3056
|
-
icon?: undefined;
|
|
3057
3056
|
enabled?: undefined;
|
|
3057
|
+
altAction?: undefined;
|
|
3058
3058
|
bulkable?: undefined;
|
|
3059
3059
|
bulkAction?: undefined;
|
|
3060
3060
|
weight?: undefined;
|
|
3061
|
-
altAction?: undefined;
|
|
3062
3061
|
} | {
|
|
3063
3062
|
action: string;
|
|
3064
3063
|
label: any;
|
|
3065
|
-
icon: string;
|
|
3066
3064
|
enabled: any;
|
|
3067
3065
|
divider?: undefined;
|
|
3066
|
+
altAction?: undefined;
|
|
3068
3067
|
bulkable?: undefined;
|
|
3069
3068
|
bulkAction?: undefined;
|
|
3070
3069
|
weight?: undefined;
|
|
3071
|
-
altAction?: undefined;
|
|
3072
|
-
} | {
|
|
3073
|
-
action: string;
|
|
3074
|
-
label: any;
|
|
3075
|
-
icon: string;
|
|
3076
|
-
bulkable: boolean;
|
|
3077
|
-
bulkAction: string;
|
|
3078
|
-
enabled: boolean;
|
|
3079
|
-
weight: number;
|
|
3080
|
-
divider?: undefined;
|
|
3081
|
-
altAction?: undefined;
|
|
3082
3070
|
} | {
|
|
3083
3071
|
action: string;
|
|
3084
3072
|
altAction: string;
|
|
3085
3073
|
label: any;
|
|
3086
|
-
icon: string;
|
|
3087
3074
|
bulkable: boolean;
|
|
3088
3075
|
enabled: any;
|
|
3089
3076
|
bulkAction: string;
|
|
@@ -3095,37 +3082,24 @@ export default class Resource {
|
|
|
3095
3082
|
divider: boolean;
|
|
3096
3083
|
action?: undefined;
|
|
3097
3084
|
label?: undefined;
|
|
3098
|
-
icon?: undefined;
|
|
3099
3085
|
enabled?: undefined;
|
|
3086
|
+
altAction?: undefined;
|
|
3100
3087
|
bulkable?: undefined;
|
|
3101
3088
|
bulkAction?: undefined;
|
|
3102
3089
|
weight?: undefined;
|
|
3103
|
-
altAction?: undefined;
|
|
3104
3090
|
} | {
|
|
3105
3091
|
action: string;
|
|
3106
3092
|
label: any;
|
|
3107
|
-
icon: string;
|
|
3108
3093
|
enabled: any;
|
|
3109
3094
|
divider?: undefined;
|
|
3095
|
+
altAction?: undefined;
|
|
3110
3096
|
bulkable?: undefined;
|
|
3111
3097
|
bulkAction?: undefined;
|
|
3112
3098
|
weight?: undefined;
|
|
3113
|
-
altAction?: undefined;
|
|
3114
|
-
} | {
|
|
3115
|
-
action: string;
|
|
3116
|
-
label: any;
|
|
3117
|
-
icon: string;
|
|
3118
|
-
bulkable: boolean;
|
|
3119
|
-
bulkAction: string;
|
|
3120
|
-
enabled: boolean;
|
|
3121
|
-
weight: number;
|
|
3122
|
-
divider?: undefined;
|
|
3123
|
-
altAction?: undefined;
|
|
3124
3099
|
} | {
|
|
3125
3100
|
action: string;
|
|
3126
3101
|
altAction: string;
|
|
3127
3102
|
label: any;
|
|
3128
|
-
icon: string;
|
|
3129
3103
|
bulkable: boolean;
|
|
3130
3104
|
enabled: any;
|
|
3131
3105
|
bulkAction: string;
|
package/utils/error.js
CHANGED
|
@@ -199,9 +199,11 @@ export function translateError(error) {
|
|
|
199
199
|
|
|
200
200
|
if (matches) {
|
|
201
201
|
if (matches.length == 1) {
|
|
202
|
+
console.log('00045', error);
|
|
202
203
|
error = error.replace(regex, translation.replacement);
|
|
203
204
|
} else {
|
|
204
|
-
error = translation.
|
|
205
|
+
error = error.replace(regex, (...args) => translation.replacement.replace(/\$([1-9]\d*)/g, (_, idx) => args[Number(idx)] || ''))
|
|
206
|
+
console.log('00046', error);
|
|
205
207
|
}
|
|
206
208
|
}
|
|
207
209
|
}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"translations": [
|
|
3
|
+
{
|
|
4
|
+
"pattern": "subnet ([^\\s]+) cidr ([^\\s]+) is invalid, due to invalid cidr address: ([^\\s]+)",
|
|
5
|
+
"replacement": "子网 '$1' 的 CIDR 地址 '$2' 无效:不是合法的 CIDR 格式",
|
|
6
|
+
"flags": "gi"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"pattern": "validation failed in api: vpc.kubeovn.io \"([^\"]*)\" is invalid: metadata\\.name: invalid value: \"([^\"]*)\": a lowercase rfc 1123 subdomain must consist of lower case alphanumeric characters, '-' or '\\.', and must start and end with an alphanumeric character \\(e\\.g\\..*?\\)",
|
|
10
|
+
"replacement": "API 校验失败:VPC 名称 \"$1\" 不符合 RFC 1123 子域名规则,只能使用小写字母、数字、'-' 或 '.',且必须以字母/数字开头和结尾",
|
|
11
|
+
"flags": "gi"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"pattern": "validation 失败 in api",
|
|
15
|
+
"replacement": "API 校验失败",
|
|
16
|
+
"flags": "gi"
|
|
17
|
+
},
|
|
3
18
|
{
|
|
4
19
|
"pattern": "can't connect to backup target[\\s\\S]*no route to host",
|
|
5
20
|
"replacement": "无法连接到备份目标:网络不可达,请检查备份服务器地址与路由",
|
package/vue.config.js
CHANGED
|
@@ -157,7 +157,7 @@ const getLoaders = (SHELL_ABS) => [
|
|
|
157
157
|
test: /\.m?[tj]sx?$/,
|
|
158
158
|
// This excludes no modules except for node_modules/@rancher/... so that plugins can properly compile
|
|
159
159
|
// when referencing @rancher/shell
|
|
160
|
-
exclude: /node_modules\/(?!(
|
|
160
|
+
exclude: /node_modules\/(?!(dashboard-shell-shell)\/).*/,
|
|
161
161
|
use: [
|
|
162
162
|
{
|
|
163
163
|
loader: 'cache-loader',
|
|
@@ -332,14 +332,14 @@ const getVirtualModules = (dir, includePkg) => {
|
|
|
332
332
|
reqs += `$plugin.loadAsync('${ i }', '/pkg/${ i }/${ librariesIndex[i] }');`;
|
|
333
333
|
});
|
|
334
334
|
|
|
335
|
-
return new VirtualModulesPlugin({ 'node_modules
|
|
335
|
+
return new VirtualModulesPlugin({ 'node_modules/dashboard-shell-shell/dynamic.js': `export default function ($plugin) { ${ reqs } };` });
|
|
336
336
|
};
|
|
337
337
|
|
|
338
|
-
const getAutoImport = () => new webpack.NormalModuleReplacementPlugin(
|
|
338
|
+
const getAutoImport = () => new webpack.NormalModuleReplacementPlugin(/^dashboard-shell-shell\/auto-import$/, (resource) => {
|
|
339
339
|
const ctx = resource.context.split('/');
|
|
340
340
|
const pkg = ctx[ctx.length - 1];
|
|
341
341
|
|
|
342
|
-
resource.request =
|
|
342
|
+
resource.request = `dashboard-shell-shell/auto-import/${ pkg }`;
|
|
343
343
|
});
|
|
344
344
|
|
|
345
345
|
/**
|
|
@@ -356,7 +356,7 @@ const getVirtualModulesAutoImport = (dir) => {
|
|
|
356
356
|
fs.readdirSync(pkgFolder)
|
|
357
357
|
.filter((name) => !name.startsWith('.')) // Ignore hidden folders
|
|
358
358
|
.forEach((name) => {
|
|
359
|
-
autoImportTypes[`node_modules
|
|
359
|
+
autoImportTypes[`node_modules/dashboard-shell-shell/auto-import/${ name }`] = generateDynamicTypeImport(`@pkg/${ name }`, path.join(dir, `pkg/${ name }`));
|
|
360
360
|
});
|
|
361
361
|
}
|
|
362
362
|
|