@umijs/plugins 4.0.0-canary.20221202.1 → 4.0.0-canary.20221208.1
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/qiankun/slave.js
CHANGED
|
@@ -247,9 +247,10 @@ export { connectMaster } from './connectMaster';
|
|
|
247
247
|
});
|
|
248
248
|
},
|
|
249
249
|
onProxyRes: (0, import_http_proxy_middleware.responseInterceptor)(async (responseBuffer, proxyRes, req2, res2) => {
|
|
250
|
+
var _a2;
|
|
250
251
|
if (proxyRes.statusCode === 302) {
|
|
251
252
|
const hostname = req2.hostname;
|
|
252
|
-
const port = process.env.PORT;
|
|
253
|
+
const port = process.env.PORT || ((_a2 = api.appData) == null ? void 0 : _a2.port);
|
|
253
254
|
const goto = `${hostname}:${port}`;
|
|
254
255
|
const redirectUrl = proxyRes.headers.location.replace(encodeURIComponent(new URL(masterEntry).hostname), encodeURIComponent(goto)) || masterEntry;
|
|
255
256
|
const redirectMessage = `[@umijs/plugin-qiankun]: redirect to ${redirectUrl}`;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// src/styled-components.ts
|
|
23
|
+
var styled_components_exports = {};
|
|
24
|
+
__export(styled_components_exports, {
|
|
25
|
+
default: () => styled_components_default
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(styled_components_exports);
|
|
28
|
+
var import_path = require("path");
|
|
29
|
+
var styled_components_default = (api) => {
|
|
30
|
+
api.describe({
|
|
31
|
+
key: "styledComponents",
|
|
32
|
+
config: {
|
|
33
|
+
schema(Joi) {
|
|
34
|
+
return Joi.object({
|
|
35
|
+
babelPlugin: Joi.object()
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
enableBy: api.EnableBy.config
|
|
40
|
+
});
|
|
41
|
+
api.modifyBabelPresetOpts((memo) => {
|
|
42
|
+
if (api.env === "development") {
|
|
43
|
+
memo.pluginStyledComponents = {
|
|
44
|
+
...api.config.styledComponents.babelPlugin
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return memo;
|
|
48
|
+
});
|
|
49
|
+
const libPath = (0, import_path.dirname)(require.resolve("styled-components/package"));
|
|
50
|
+
api.onGenerateFiles(() => {
|
|
51
|
+
api.writeTmpFile({
|
|
52
|
+
path: "index.tsx",
|
|
53
|
+
content: `
|
|
54
|
+
import styled, { ThemeProvider, createGlobalStyle, css, keyframes, StyleSheetManager, useTheme } from '${libPath}';
|
|
55
|
+
export { styled, ThemeProvider, createGlobalStyle, css, keyframes, StyleSheetManager, useTheme };
|
|
56
|
+
`
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
+
0 && (module.exports = {});
|
package/dist/valtio.js
CHANGED
|
@@ -34,7 +34,8 @@ var valtio_default = (api) => {
|
|
|
34
34
|
schema(joi) {
|
|
35
35
|
return joi.object();
|
|
36
36
|
}
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
|
+
enableBy: api.EnableBy.config
|
|
38
39
|
});
|
|
39
40
|
const libPath = (0, import_utils.winPath)((0, import_path.dirname)(require.resolve("@umijs/valtio/package.json")));
|
|
40
41
|
api.onGenerateFiles(() => {
|
|
@@ -42,12 +43,18 @@ var valtio_default = (api) => {
|
|
|
42
43
|
path: "index.ts",
|
|
43
44
|
content: `
|
|
44
45
|
export {
|
|
45
|
-
proxy,
|
|
46
|
+
proxy,
|
|
47
|
+
useSnapshot,
|
|
48
|
+
snapshot,
|
|
49
|
+
subscribe,
|
|
50
|
+
subscribeKey,
|
|
46
51
|
proxyWithComputed,
|
|
47
52
|
proxyWithHistory,
|
|
48
53
|
proxyWithDevtools,
|
|
49
54
|
proxyMap,
|
|
50
55
|
proxySet,
|
|
56
|
+
derive,
|
|
57
|
+
underive,
|
|
51
58
|
} from '${libPath}';
|
|
52
59
|
`
|
|
53
60
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { getPluginManager } from '@@/core/plugin';
|
|
3
3
|
import ReactDOM from 'react-dom';
|
|
4
|
-
import { ApplyPluginsType, __getRoot } from 'umi';
|
|
4
|
+
import { ApplyPluginsType, __getRoot, history } from 'umi';
|
|
5
5
|
import { setModelState } from './qiankunModel';
|
|
6
6
|
|
|
7
7
|
const noop = () => {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/plugins",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.20221208.1",
|
|
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,8 +27,8 @@
|
|
|
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.0-canary.
|
|
31
|
-
"@umijs/valtio": "^1.0.
|
|
30
|
+
"@umijs/bundler-utils": "4.0.0-canary.20221208.1",
|
|
31
|
+
"@umijs/valtio": "^1.0.2",
|
|
32
32
|
"antd-dayjs-webpack-plugin": "^1.0.6",
|
|
33
33
|
"axios": "^0.27.2",
|
|
34
34
|
"babel-plugin-import": "^1.13.5",
|
|
@@ -45,11 +45,12 @@
|
|
|
45
45
|
"react-intl": "3.12.1",
|
|
46
46
|
"react-redux": "^8.0.2",
|
|
47
47
|
"redux": "^4.2.0",
|
|
48
|
+
"styled-components": "6.0.0-beta.6",
|
|
48
49
|
"warning": "^4.0.3"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"antd": "^4.24.1",
|
|
52
|
-
"umi": "4.0.0-canary.
|
|
53
|
+
"umi": "4.0.0-canary.20221208.1"
|
|
53
54
|
},
|
|
54
55
|
"publishConfig": {
|
|
55
56
|
"access": "public"
|