@umijs/plugins 4.0.0-canary.20220506.1 → 4.0.0-canary.20220506.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../src/access.ts"],"names":[],"mappings":";AAKA,wBA8IE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":";AAEA,wBAqEE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"antd.d.ts","sourceRoot":"","sources":["../src/antd.ts"],"names":[],"mappings":";AAMA,wBAgJE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dva.d.ts","sourceRoot":"","sources":["../src/dva.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAE3B,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;;AAGvD,wBA8IE;AAEF,wBAAgB,YAAY,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,cAmB5C;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,IAAI,WAIrC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":";AAEA,wBAEE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initial-state.d.ts","sourceRoot":"","sources":["../src/initial-state.ts"],"names":[],"mappings":";AAGA,wBAuHE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":";AAQA,wBAqhBE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../src/locale.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,gBAAgB,gBAAiB,MAAM,WACb,CAAC;;AAGxC,wBAkOE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":";AAQA,wBA+DE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moment2dayjs.d.ts","sourceRoot":"","sources":["../src/moment2dayjs.ts"],"names":[],"mappings":";AASA,wBAgGE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/qiankun/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AACjD,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,kCAAkC,2BAA2B,CAAC;AAC3E,eAAO,MAAM,oCAAoC,6BAA6B,CAAC;AAC/E,eAAO,MAAM,iBAAiB,4BAA4B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"master.d.ts","sourceRoot":"","sources":["../../src/qiankun/master.ts"],"names":[],"mappings":"AAYA,wBAAgB,cAAc,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,GAAG,CAAA;CAAE,WAMvD;;AAED,wBA0IE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slave.d.ts","sourceRoot":"","sources":["../../src/qiankun/slave.ts"],"names":[],"mappings":";AAmBA,wBAkLE"}
@@ -30,7 +30,10 @@ exports.default = (api) => {
30
30
  key: 'addExtraModels',
31
31
  fn() {
32
32
  return [
33
- `@@/plugin-qiankun-slave/qiankunModel#{"namespace":"${constants_1.qiankunStateFromMasterModelNamespace}"}`,
33
+ (0, withTmpPath_1.withTmpPath)({
34
+ api,
35
+ path: `qiankunModel.ts#{"namespace":"${constants_1.qiankunStateFromMasterModelNamespace}"}`,
36
+ }),
34
37
  ];
35
38
  },
36
39
  });
@@ -123,36 +126,39 @@ if (!window.__POWERED_BY_QIANKUN__) {
123
126
  function getFileContent(file) {
124
127
  return (0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../../libs/qiankun/slave', file), 'utf-8');
125
128
  }
126
- api.onGenerateFiles(() => {
127
- // api.writeTmpFile({
128
- // path: 'slaveOptions.ts',
129
- // content: `
130
- // let options = ${JSON.stringify((api.config.qiankun || {}).slave || {})};
131
- // export const getSlaveOptions = () => options;
132
- // export const setSlaveOptions = (newOpts) => options = ({ ...options, ...newOpts });
133
- // `,
134
- // });
135
- [
136
- 'qiankunModel.ts',
137
- 'connectMaster.tsx',
138
- 'slaveRuntimePlugin.ts',
139
- 'lifecycles.ts',
140
- ].forEach((file) => {
141
- api.writeTmpFile({
142
- path: file.replace(/\.tpl$/, ''),
143
- content: getFileContent(file)
144
- .replace('__USE_MODEL__', api.isPluginEnable('model')
145
- ? `import { useModel } from '@@/plugin-model'`
146
- : `const useModel = null;`)
147
- .replace(/from 'qiankun'/g, `from '${(0, plugin_utils_1.winPath)((0, path_1.dirname)(require.resolve('qiankun/package')))}'`)
148
- .replace(/from 'lodash\//g, `from '${(0, plugin_utils_1.winPath)((0, path_1.dirname)(require.resolve('lodash/package')))}/`),
129
+ api.onGenerateFiles({
130
+ fn() {
131
+ // api.writeTmpFile({
132
+ // path: 'slaveOptions.ts',
133
+ // content: `
134
+ // let options = ${JSON.stringify((api.config.qiankun || {}).slave || {})};
135
+ // export const getSlaveOptions = () => options;
136
+ // export const setSlaveOptions = (newOpts) => options = ({ ...options, ...newOpts });
137
+ // `,
138
+ // });
139
+ [
140
+ 'qiankunModel.ts',
141
+ 'connectMaster.tsx',
142
+ 'slaveRuntimePlugin.ts',
143
+ 'lifecycles.ts',
144
+ ].forEach((file) => {
145
+ api.writeTmpFile({
146
+ path: file.replace(/\.tpl$/, ''),
147
+ content: getFileContent(file)
148
+ .replace('__USE_MODEL__', api.isPluginEnable('model')
149
+ ? `import { useModel } from '@@/plugin-model'`
150
+ : `const useModel = null;`)
151
+ .replace(/from 'qiankun'/g, `from '${(0, plugin_utils_1.winPath)((0, path_1.dirname)(require.resolve('qiankun/package')))}'`)
152
+ .replace(/from 'lodash\//g, `from '${(0, plugin_utils_1.winPath)((0, path_1.dirname)(require.resolve('lodash/package')))}/`),
153
+ });
149
154
  });
150
- });
151
- api.writeTmpFile({
152
- path: 'index.ts',
153
- content: `
155
+ api.writeTmpFile({
156
+ path: 'index.ts',
157
+ content: `
154
158
  export { connectMaster } from './connectMaster';
155
159
  `,
156
- });
160
+ });
161
+ },
162
+ before: 'model',
157
163
  });
158
164
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qiankun.d.ts","sourceRoot":"","sources":["../src/qiankun.ts"],"names":[],"mappings":";AAEA,wBAkBE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":";AAIA,wBAsTE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwindcss.d.ts","sourceRoot":"","sources":["../src/tailwindcss.ts"],"names":[],"mappings":";AAIA,wBA2CE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unocss.d.ts","sourceRoot":"","sources":["../src/unocss.ts"],"names":[],"mappings":";AAMA,wBA6CE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"astUtils.d.ts","sourceRoot":"","sources":["../../src/utils/astUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,0CAA0C,CAAC;AAClE,OAAO,KAAK,CAAC,MAAM,2CAA2C,CAAC;AAE/D,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,oBAS1E"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localeUtils.d.ts","sourceRoot":"","sources":["../../src/utils/localeUtils.ts"],"names":[],"mappings":"AAIA,oBAAY,eAAe,GAAG,CAAC,IAAI,EAAE;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAExB,MAAM,WAAW,sBAAsB;IACrC,YA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ED,qBAAa,KAAK;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;gBACH,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE,MAAM;IAgB1D,QAAQ,CAAC,IAAI,EAAE,MAAM;CAiCtB;AAED,qBAAa,UAAU;IACrB,GAAG,EAAE,IAAI,CAAC;IACV,IAAI,EAAE,KAAK,CAAM;IACjB,KAAK,EAAE,MAAM,CAAK;gBACN,GAAG,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,EAAE,KAAK;IAKzC,YAAY,CAAC,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,EAAE,CAAA;KAAE;IAsC3D,mBAAmB,CAAC,MAAM,EAAE,KAAK,EAAE;IA6CnC,SAAS,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAelD,YAAY,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;IAsCpD,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE;CAsBxC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveProjectDep.d.ts","sourceRoot":"","sources":["../../src/utils/resolveProjectDep.ts"],"names":[],"mappings":"AAGA,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,GAAG,EAAE,GAAG,CAAC;IACT,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,sBAWA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withTmpPath.d.ts","sourceRoot":"","sources":["../../src/utils/withTmpPath.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAChC,GAAG,EAAE,IAAI,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,UAUA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugins",
3
- "version": "4.0.0-canary.20220506.1",
3
+ "version": "4.0.0-canary.20220506.2",
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.20220506.1",
28
+ "@umijs/bundler-utils": "4.0.0-canary.20220506.2",
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.20220506.1"
47
+ "umi": "4.0.0-canary.20220506.2"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"