@umijs/plugins 4.0.20 → 4.0.21
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/antd.js +12 -19
- package/dist/locale.js +6 -19
- package/dist/qiankun/master.js +13 -24
- package/package.json +3 -3
package/dist/antd.js
CHANGED
|
@@ -2,22 +2,8 @@ var __create = Object.create;
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __spreadValues = (a, b) => {
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
7
|
var __export = (target, all) => {
|
|
22
8
|
for (var name in all)
|
|
23
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -98,15 +84,22 @@ var antd_default = (api) => {
|
|
|
98
84
|
}
|
|
99
85
|
if (antdVersion.startsWith("5")) {
|
|
100
86
|
const theme = require("@ant-design/antd-theme-variable");
|
|
101
|
-
memo.theme =
|
|
87
|
+
memo.theme = {
|
|
88
|
+
...theme,
|
|
89
|
+
...memo.theme
|
|
90
|
+
};
|
|
102
91
|
}
|
|
103
92
|
if (antd.dark || antd.compact) {
|
|
104
93
|
const { getThemeVariables } = require("antd/dist/theme");
|
|
105
|
-
memo.theme =
|
|
94
|
+
memo.theme = {
|
|
95
|
+
...getThemeVariables(antd),
|
|
96
|
+
...memo.theme
|
|
97
|
+
};
|
|
106
98
|
}
|
|
107
|
-
memo.theme =
|
|
108
|
-
"root-entry-name": "default"
|
|
109
|
-
|
|
99
|
+
memo.theme = {
|
|
100
|
+
"root-entry-name": "default",
|
|
101
|
+
...memo.theme
|
|
102
|
+
};
|
|
110
103
|
return memo;
|
|
111
104
|
});
|
|
112
105
|
api.addExtraBabelPlugins(() => {
|
package/dist/locale.js
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
7
|
var __export = (target, all) => {
|
|
25
8
|
for (var name in all)
|
|
26
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -113,7 +96,10 @@ var locale_default = (api) => {
|
|
|
113
96
|
const resolveKey = api.config.moment2dayjs ? "dayjs" : "moment";
|
|
114
97
|
const momentPkgPath = (0, import_plugin_utils.winPath)((0, import_path.dirname)(require.resolve(`${resolveKey}/package.json`)));
|
|
115
98
|
const EventEmitterPkg = (0, import_plugin_utils.winPath)((0, import_path.dirname)(require.resolve("event-emitter/package")));
|
|
116
|
-
const { baseSeparator, baseNavigator, antd, title, useLocalStorage } =
|
|
99
|
+
const { baseSeparator, baseNavigator, antd, title, useLocalStorage } = {
|
|
100
|
+
...defaultConfig,
|
|
101
|
+
...api.config.locale
|
|
102
|
+
};
|
|
117
103
|
const defaultLocale = ((_a = api.config.locale) == null ? void 0 : _a.default) || `zh${baseSeparator}CN`;
|
|
118
104
|
const localeList = await getList(resolveKey);
|
|
119
105
|
const momentLocales = localeList.map(({ momentLocale }) => momentLocale).filter((locale) => locale);
|
|
@@ -166,7 +152,8 @@ var locale_default = (api) => {
|
|
|
166
152
|
UseLocalStorage: !!useLocalStorage,
|
|
167
153
|
LocaleDir: localeDirName,
|
|
168
154
|
ExistLocaleDir: (0, import_fs.existsSync)(localeDirPath),
|
|
169
|
-
LocaleList: localeList.map((locale) =>
|
|
155
|
+
LocaleList: localeList.map((locale) => ({
|
|
156
|
+
...locale,
|
|
170
157
|
antdLocale: locale.antdLocale.map((antdLocale, index) => ({
|
|
171
158
|
locale: antdLocale,
|
|
172
159
|
index
|
package/dist/qiankun/master.js
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
7
|
var __export = (target, all) => {
|
|
25
8
|
for (var name in all)
|
|
26
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -65,11 +48,16 @@ var master_default = (api) => {
|
|
|
65
48
|
api.addRuntimePlugin(() => {
|
|
66
49
|
return [(0, import_withTmpPath.withTmpPath)({ api, path: "masterRuntimePlugin.tsx" })];
|
|
67
50
|
});
|
|
68
|
-
api.modifyDefaultConfig((config) =>
|
|
51
|
+
api.modifyDefaultConfig((config) => ({
|
|
52
|
+
...config,
|
|
69
53
|
mountElementId: import_constants.defaultMasterRootId,
|
|
70
|
-
qiankun:
|
|
71
|
-
|
|
72
|
-
|
|
54
|
+
qiankun: {
|
|
55
|
+
...config.qiankun,
|
|
56
|
+
master: {
|
|
57
|
+
...JSON.parse(process.env.INITIAL_QIANKUN_MASTER_OPTIONS || "{}"),
|
|
58
|
+
...(config.qiankun || {}).master
|
|
59
|
+
}
|
|
60
|
+
}
|
|
73
61
|
}));
|
|
74
62
|
api.modifyRoutes((memo) => {
|
|
75
63
|
Object.keys(memo).forEach((id) => {
|
|
@@ -122,10 +110,11 @@ export interface IRuntimeConfig {
|
|
|
122
110
|
api.writeTmpFile({
|
|
123
111
|
path: "masterOptions.ts",
|
|
124
112
|
content: `
|
|
125
|
-
let options = ${JSON.stringify(
|
|
113
|
+
let options = ${JSON.stringify({
|
|
126
114
|
masterHistoryType: ((_a = api.config.history) == null ? void 0 : _a.type) || import_constants.defaultHistoryType,
|
|
127
|
-
base: api.config.base || "/"
|
|
128
|
-
|
|
115
|
+
base: api.config.base || "/",
|
|
116
|
+
...api.config.qiankun.master
|
|
117
|
+
})};
|
|
129
118
|
export const getMasterOptions = () => options;
|
|
130
119
|
export const setMasterOptions = (newOpts) => options = ({ ...options, ...newOpts });
|
|
131
120
|
`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugins",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.21",
|
|
4
4
|
"description": "@umijs/plugins",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/plugins#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@ant-design/antd-theme-variable": "^1.0.0",
|
|
28
28
|
"@ant-design/icons": "^4.7.0",
|
|
29
29
|
"@ant-design/pro-components": "^2.0.1",
|
|
30
|
-
"@umijs/bundler-utils": "4.0.
|
|
30
|
+
"@umijs/bundler-utils": "4.0.21",
|
|
31
31
|
"antd-dayjs-webpack-plugin": "^1.0.6",
|
|
32
32
|
"axios": "^0.27.2",
|
|
33
33
|
"babel-plugin-import": "^1.13.5",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"warning": "^4.0.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"umi": "4.0.
|
|
49
|
+
"umi": "4.0.21"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|