@umijs/plugins 4.0.0-canary.20220429.1 → 4.0.0-canary.20220429.4
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/dva.js +1 -0
- package/dist/initial-state.js +1 -1
- package/dist/layout.js +1 -1
- package/dist/model.js +9 -0
- package/dist/utils/modelUtils.d.ts +1 -0
- package/dist/utils/modelUtils.js +1 -0
- package/package.json +3 -3
package/dist/dva.js
CHANGED
package/dist/initial-state.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.default = (api) => {
|
|
|
13
13
|
enableBy: api.EnableBy.config,
|
|
14
14
|
});
|
|
15
15
|
api.register({
|
|
16
|
-
key: '
|
|
16
|
+
key: 'addExtraModelsPre',
|
|
17
17
|
fn: () => [(0, withTmpPath_1.withTmpPath)({ api, path: '@@initialState.ts' })],
|
|
18
18
|
});
|
|
19
19
|
api.addRuntimePluginKey(() => ['getInitialState']);
|
package/dist/layout.js
CHANGED
package/dist/model.js
CHANGED
|
@@ -104,6 +104,11 @@ export function dataflowProvider(container, opts) {
|
|
|
104
104
|
};
|
|
105
105
|
function getAllModels(api) {
|
|
106
106
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
const extraModelsPre = yield api.applyPlugins({
|
|
108
|
+
key: 'addExtraModelsPre',
|
|
109
|
+
type: api.ApplyPluginsType.add,
|
|
110
|
+
initialValue: [],
|
|
111
|
+
});
|
|
107
112
|
const extraModels = yield api.applyPlugins({
|
|
108
113
|
key: 'addExtraModels',
|
|
109
114
|
type: api.ApplyPluginsType.add,
|
|
@@ -114,6 +119,10 @@ function getAllModels(api) {
|
|
|
114
119
|
return t.isArrowFunctionExpression(node) || t.isFunctionDeclaration(node);
|
|
115
120
|
},
|
|
116
121
|
}).getAllModels({
|
|
122
|
+
extraModelsPre: [
|
|
123
|
+
...extraModelsPre,
|
|
124
|
+
...(api.config.model.extraModelsPre || []),
|
|
125
|
+
],
|
|
117
126
|
extraModels: [...extraModels, ...(api.config.model.extraModels || [])],
|
|
118
127
|
});
|
|
119
128
|
});
|
package/dist/utils/modelUtils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugins",
|
|
3
|
-
"version": "4.0.0-canary.20220429.
|
|
3
|
+
"version": "4.0.0-canary.20220429.4",
|
|
4
4
|
"description": "@umijs/plugins",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/plugins#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@ahooksjs/use-request": "^2.0.0",
|
|
26
26
|
"@ant-design/icons": "^4.7.0",
|
|
27
27
|
"@ant-design/pro-layout": "^6.35.1",
|
|
28
|
-
"@umijs/bundler-utils": "4.0.0-canary.20220429.
|
|
28
|
+
"@umijs/bundler-utils": "4.0.0-canary.20220429.4",
|
|
29
29
|
"antd-dayjs-webpack-plugin": "^1.0.6",
|
|
30
30
|
"axios": "^0.26.1",
|
|
31
31
|
"babel-plugin-import": "^1.13.3",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"warning": "^4.0.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"umi": "4.0.0-canary.20220429.
|
|
47
|
+
"umi": "4.0.0-canary.20220429.4"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|