@modern-js/plugin-garfish 1.4.2 → 1.4.3

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.
@@ -3,14 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.resolvedConfig = exports.initializer = exports.externals = exports.default = void 0;
6
+ exports.externals = exports.default = void 0;
7
7
 
8
8
  var _path = _interopRequireDefault(require("path"));
9
9
 
10
10
  var _utils = require("@modern-js/utils");
11
11
 
12
- var _core = require("@modern-js/core");
13
-
14
12
  var _util = require("../util");
15
13
 
16
14
  var _utils2 = require("./utils");
@@ -29,259 +27,245 @@ const externals = {
29
27
  };
30
28
  exports.externals = externals;
31
29
 
32
- const resolvedConfig = async config => {
33
- const {
34
- resolved
35
- } = config;
36
- const {
37
- masterApp,
38
- router
39
- } = (0, _utils2.getRuntimeConfig)(resolved);
40
- const nConfig = {
41
- resolved: _objectSpread({}, resolved)
42
- };
43
-
44
- if (masterApp) {
45
- var _router$historyOption;
46
-
47
- // basename does not exist use router's basename
48
- (0, _utils2.setRuntimeConfig)(nConfig.resolved, 'masterApp', Object.assign(typeof masterApp === 'object' ? _objectSpread({}, masterApp) : {}, {
49
- basename: (router === null || router === void 0 ? void 0 : (_router$historyOption = router.historyOptions) === null || _router$historyOption === void 0 ? void 0 : _router$historyOption.basename) || '/'
50
- }));
51
- }
30
+ var _default = ({
31
+ runtimePluginName: _runtimePluginName = '@modern-js/runtime/plugins'
32
+ } = {}) => ({
33
+ name: '@modern-js/plugin-garfish',
34
+ setup: ({
35
+ useAppContext,
36
+ useResolvedConfigContext
37
+ }) => {
38
+ let pluginsExportsUtils;
39
+ let runtimeExportsUtils;
40
+ return {
41
+ validateSchema() {
42
+ return _utils.PLUGIN_SCHEMAS['@modern-js/plugin-garfish'];
43
+ },
44
+
45
+ resolvedConfig: async config => {
46
+ const {
47
+ resolved
48
+ } = config;
49
+ const {
50
+ masterApp,
51
+ router
52
+ } = (0, _utils2.getRuntimeConfig)(resolved);
53
+ const nConfig = {
54
+ resolved: _objectSpread({}, resolved)
55
+ };
52
56
 
53
- (0, _util.logger)(`resolvedConfig`, {
54
- runtime: nConfig.resolved.runtime,
55
- deploy: nConfig.resolved.deploy,
56
- server: nConfig.resolved.server
57
- });
58
- return nConfig;
59
- };
57
+ if (masterApp) {
58
+ var _router$historyOption;
60
59
 
61
- exports.resolvedConfig = resolvedConfig;
62
-
63
- const initializer = ( // eslint-disable-next-line @typescript-eslint/no-shadow
64
- {
65
- resolvedConfig,
66
- validateSchema
67
- }, {
68
- runtimePluginName: _runtimePluginName = '@modern-js/runtime/plugins',
69
- defaultEnableHtmlEntry: _defaultEnableHtmlEntry = true,
70
- defaultExternalBasicLibrary: _defaultExternalBasicLibrary = false
71
- }) => () => {
72
- let pluginsExportsUtils;
73
- let runtimeExportsUtils;
74
- return {
75
- validateSchema,
76
- resolvedConfig,
77
-
78
- config() {
79
- // eslint-disable-next-line react-hooks/rules-of-hooks
80
- const config = (0, _core.useAppContext)();
81
- pluginsExportsUtils = (0, _utils.createRuntimeExportsUtils)(config.internalDirectory, 'plugins');
82
- runtimeExportsUtils = (0, _utils.createRuntimeExportsUtils)(config.internalDirectory, 'index');
83
- return {
84
- source: {
85
- alias: {
86
- '@modern-js/runtime/plugins': pluginsExportsUtils.getPath()
87
- }
88
- },
89
- tools: {
90
- webpack: (webpackConfig, {
91
- chain,
92
- webpack,
93
- env: _env = process.env.NODE_ENV || 'development'
94
- }) => {
95
- var _resolveOptions$deplo, _resolveWebpackConfig;
60
+ // basename does not exist use router's basename
61
+ (0, _utils2.setRuntimeConfig)(nConfig.resolved, 'masterApp', Object.assign(typeof masterApp === 'object' ? _objectSpread({}, masterApp) : {}, {
62
+ basename: (router === null || router === void 0 ? void 0 : (_router$historyOption = router.historyOptions) === null || _router$historyOption === void 0 ? void 0 : _router$historyOption.basename) || (router === null || router === void 0 ? void 0 : router.basename) || '/'
63
+ }));
64
+ }
96
65
 
97
- // eslint-disable-next-line react-hooks/rules-of-hooks
98
- const resolveOptions = (0, _core.useResolvedConfigContext)();
66
+ (0, _util.logger)(`resolvedConfig`, {
67
+ runtime: nConfig.resolved.runtime,
68
+ deploy: nConfig.resolved.deploy,
69
+ server: nConfig.resolved.server
70
+ });
71
+ return nConfig;
72
+ },
99
73
 
100
- if (resolveOptions !== null && resolveOptions !== void 0 && (_resolveOptions$deplo = resolveOptions.deploy) !== null && _resolveOptions$deplo !== void 0 && _resolveOptions$deplo.microFrontend) {
101
- var _resolveOptions$serve, _resolveOptions$deplo2, _resolveOptions$deplo3;
74
+ config() {
75
+ // eslint-disable-next-line react-hooks/rules-of-hooks
76
+ const config = useAppContext(); // eslint-disable-next-line react-hooks/rules-of-hooks
102
77
 
103
- chain.output.libraryTarget('umd');
78
+ const resolveOptions = useResolvedConfigContext();
79
+ pluginsExportsUtils = (0, _utils.createRuntimeExportsUtils)(config.internalDirectory, 'plugins');
80
+ runtimeExportsUtils = (0, _utils.createRuntimeExportsUtils)(config.internalDirectory, 'index');
81
+ return {
82
+ source: {
83
+ alias: {
84
+ '@modern-js/runtime/plugins': pluginsExportsUtils.getPath()
85
+ }
86
+ },
87
+ tools: {
88
+ webpack: (webpackConfig, {
89
+ chain,
90
+ webpack,
91
+ env: _env = process.env.NODE_ENV || 'development'
92
+ }) => {
93
+ var _resolveOptions$deplo, _resolveWebpackConfig;
94
+
95
+ if (resolveOptions !== null && resolveOptions !== void 0 && (_resolveOptions$deplo = resolveOptions.deploy) !== null && _resolveOptions$deplo !== void 0 && _resolveOptions$deplo.microFrontend) {
96
+ var _resolveOptions$serve, _resolveOptions$deplo2, _resolveOptions$deplo3;
97
+
98
+ chain.output.libraryTarget('umd');
99
+ chain.devServer.headers({
100
+ 'Access-Control-Allow-Origin': '*'
101
+ });
104
102
 
105
- if (resolveOptions !== null && resolveOptions !== void 0 && (_resolveOptions$serve = resolveOptions.server) !== null && _resolveOptions$serve !== void 0 && _resolveOptions$serve.port) {
106
- chain.output.publicPath(_env === 'development' ? `//localhost:${resolveOptions.server.port}/` : webpackConfig.output.publicPath);
107
- } // add comments avoid sourcemap abnormal
103
+ if (resolveOptions !== null && resolveOptions !== void 0 && (_resolveOptions$serve = resolveOptions.server) !== null && _resolveOptions$serve !== void 0 && _resolveOptions$serve.port) {
104
+ chain.output.publicPath(_env === 'development' ? `//localhost:${resolveOptions.server.port}/` : webpackConfig.output.publicPath);
105
+ } // add comments avoid sourcemap abnormal
108
106
 
109
107
 
110
- if (webpack.BannerPlugin) {
111
- chain.plugin('banner').use(webpack.BannerPlugin, [{
112
- banner: 'Micro front-end'
113
- }]);
114
- }
108
+ if (webpack.BannerPlugin) {
109
+ chain.plugin('banner').use(webpack.BannerPlugin, [{
110
+ banner: 'Micro front-end'
111
+ }]);
112
+ }
115
113
 
116
- const {
117
- enableHtmlEntry = _defaultEnableHtmlEntry,
118
- externalBasicLibrary = _defaultExternalBasicLibrary
119
- } = typeof (resolveOptions === null || resolveOptions === void 0 ? void 0 : (_resolveOptions$deplo2 = resolveOptions.deploy) === null || _resolveOptions$deplo2 === void 0 ? void 0 : _resolveOptions$deplo2.microFrontend) === 'object' ? resolveOptions === null || resolveOptions === void 0 ? void 0 : (_resolveOptions$deplo3 = resolveOptions.deploy) === null || _resolveOptions$deplo3 === void 0 ? void 0 : _resolveOptions$deplo3.microFrontend : {}; // external
114
+ const {
115
+ enableHtmlEntry = true,
116
+ externalBasicLibrary = false
117
+ } = typeof (resolveOptions === null || resolveOptions === void 0 ? void 0 : (_resolveOptions$deplo2 = resolveOptions.deploy) === null || _resolveOptions$deplo2 === void 0 ? void 0 : _resolveOptions$deplo2.microFrontend) === 'object' ? resolveOptions === null || resolveOptions === void 0 ? void 0 : (_resolveOptions$deplo3 = resolveOptions.deploy) === null || _resolveOptions$deplo3 === void 0 ? void 0 : _resolveOptions$deplo3.microFrontend : {}; // external
120
118
 
121
- if (externalBasicLibrary) {
122
- chain.externals(externals);
123
- } // use html mode
119
+ if (externalBasicLibrary) {
120
+ chain.externals(externals);
121
+ } // use html mode
124
122
 
125
123
 
126
- if (!enableHtmlEntry) {
127
- chain.output.filename('index.js');
128
- chain.plugins.delete('html-main');
129
- chain.optimization.runtimeChunk(false);
130
- chain.optimization.splitChunks({
131
- chunks: 'async'
132
- });
124
+ if (!enableHtmlEntry) {
125
+ chain.output.filename('index.js');
126
+ chain.plugins.delete('html-main');
127
+ chain.optimization.runtimeChunk(false);
128
+ chain.optimization.splitChunks({
129
+ chunks: 'async'
130
+ });
131
+ }
133
132
  }
134
- }
135
133
 
136
- const resolveWebpackConfig = chain.toConfig();
137
- (0, _util.logger)('webpackConfig', {
138
- output: resolveWebpackConfig.output,
139
- externals: resolveWebpackConfig.externals,
140
- env: _env,
141
- alias: (_resolveWebpackConfig = resolveWebpackConfig.resolve) === null || _resolveWebpackConfig === void 0 ? void 0 : _resolveWebpackConfig.alias
142
- });
134
+ const resolveWebpackConfig = chain.toConfig();
135
+ (0, _util.logger)('webpackConfig', {
136
+ output: resolveWebpackConfig.output,
137
+ externals: resolveWebpackConfig.externals,
138
+ env: _env,
139
+ alias: (_resolveWebpackConfig = resolveWebpackConfig.resolve) === null || _resolveWebpackConfig === void 0 ? void 0 : _resolveWebpackConfig.alias
140
+ });
141
+ }
143
142
  }
143
+ };
144
+ },
145
+
146
+ addRuntimeExports() {
147
+ const mfPackage = _path.default.resolve(__dirname, '../../../../');
148
+
149
+ const addExportStatement = `export { default as garfish, default as masterApp } from '${mfPackage}'`;
150
+ (0, _util.logger)('exportStatement', addExportStatement);
151
+ pluginsExportsUtils.addExport(addExportStatement);
152
+ runtimeExportsUtils.addExport(`export * from '${mfPackage}'`);
153
+ },
154
+
155
+ modifyEntryImports({
156
+ entrypoint,
157
+ imports
158
+ }) {
159
+ // eslint-disable-next-line react-hooks/rules-of-hooks
160
+ const config = useResolvedConfigContext();
161
+ const {
162
+ masterApp
163
+ } = (0, _utils2.getRuntimeConfig)(config);
164
+
165
+ if (masterApp) {
166
+ imports.push({
167
+ value: _runtimePluginName,
168
+ specifiers: [{
169
+ imported: 'garfish'
170
+ }]
171
+ });
172
+ imports.push({
173
+ value: _runtimePluginName,
174
+ specifiers: [{
175
+ imported: 'masterApp'
176
+ }]
177
+ });
144
178
  }
145
- };
146
- },
147
-
148
- addRuntimeExports() {
149
- const mfPackage = _path.default.resolve(__dirname, '../../../../');
150
-
151
- const addExportStatement = `export { default as garfish, default as masterApp } from '${mfPackage}'`;
152
- (0, _util.logger)('exportStatement', addExportStatement);
153
- pluginsExportsUtils.addExport(addExportStatement);
154
- runtimeExportsUtils.addExport(`export * from '${mfPackage}'`);
155
- },
156
-
157
- modifyEntryImports({
158
- entrypoint,
159
- imports
160
- }) {
161
- // eslint-disable-next-line react-hooks/rules-of-hooks
162
- const config = (0, _core.useResolvedConfigContext)();
163
- const {
164
- masterApp
165
- } = (0, _utils2.getRuntimeConfig)(config);
166
-
167
- if (masterApp) {
168
- imports.push({
169
- value: _runtimePluginName,
170
- specifiers: [{
171
- imported: 'garfish'
172
- }]
173
- });
179
+
174
180
  imports.push({
175
- value: _runtimePluginName,
181
+ value: 'react-dom',
176
182
  specifiers: [{
177
- imported: 'masterApp'
183
+ imported: 'unmountComponentAtNode'
184
+ }, {
185
+ imported: 'createPortal'
178
186
  }]
179
187
  });
180
- }
181
-
182
- imports.push({
183
- value: 'react-dom',
184
- specifiers: [{
185
- imported: 'unmountComponentAtNode'
186
- }, {
187
- imported: 'createPortal'
188
- }]
189
- });
190
- return {
191
- imports,
192
- entrypoint
193
- };
194
- },
195
-
196
- modifyEntryRuntimePlugins({
197
- entrypoint,
198
- plugins
199
- }) {
200
- // eslint-disable-next-line react-hooks/rules-of-hooks
201
- const config = (0, _core.useResolvedConfigContext)();
202
- const {
203
- masterApp
204
- } = (0, _utils2.getRuntimeConfig)(config);
205
-
206
- if (masterApp) {
207
- (0, _util.logger)('garfishPlugin options', masterApp);
208
- plugins.push({
209
- name: 'garfish',
210
- args: 'masterApp',
211
- options: masterApp === true ? JSON.stringify({}) : JSON.stringify(masterApp)
212
- });
213
- }
188
+ return {
189
+ imports,
190
+ entrypoint
191
+ };
192
+ },
214
193
 
215
- return {
194
+ modifyEntryRuntimePlugins({
216
195
  entrypoint,
217
196
  plugins
218
- };
219
- },
220
-
221
- modifyEntryRenderFunction({
222
- entrypoint,
223
- code
224
- }) {
225
- var _config$deploy;
226
-
227
- // eslint-disable-next-line react-hooks/rules-of-hooks
228
- const config = (0, _core.useResolvedConfigContext)();
197
+ }) {
198
+ // eslint-disable-next-line react-hooks/rules-of-hooks
199
+ const config = useResolvedConfigContext();
200
+ const {
201
+ masterApp
202
+ } = (0, _utils2.getRuntimeConfig)(config);
203
+
204
+ if (masterApp) {
205
+ (0, _util.logger)('garfishPlugin options', masterApp);
206
+ plugins.push({
207
+ name: 'garfish',
208
+ args: 'masterApp',
209
+ options: masterApp === true ? JSON.stringify({}) : JSON.stringify(masterApp)
210
+ });
211
+ }
229
212
 
230
- if (!(config !== null && config !== void 0 && (_config$deploy = config.deploy) !== null && _config$deploy !== void 0 && _config$deploy.microFrontend)) {
231
213
  return {
232
214
  entrypoint,
233
- code
215
+ plugins
234
216
  };
235
- }
217
+ },
236
218
 
237
- const nCode = (0, _utils2.makeRenderFunction)(code);
238
- (0, _util.logger)('makeRenderFunction', nCode);
239
- return {
219
+ modifyEntryRenderFunction({
240
220
  entrypoint,
241
- code: nCode
242
- };
243
- },
244
-
245
- modifyEntryExport({
246
- entrypoint,
247
- exportStatement
248
- }) {
249
- var _config$deploy2;
250
-
251
- // eslint-disable-next-line react-hooks/rules-of-hooks
252
- const config = (0, _core.useResolvedConfigContext)();
253
-
254
- if (config !== null && config !== void 0 && (_config$deploy2 = config.deploy) !== null && _config$deploy2 !== void 0 && _config$deploy2.microFrontend) {
255
- const exportStatementCode = (0, _utils2.makeProvider)();
256
- (0, _util.logger)('exportStatement', exportStatementCode);
221
+ code
222
+ }) {
223
+ var _config$deploy;
224
+
225
+ // eslint-disable-next-line react-hooks/rules-of-hooks
226
+ const config = useResolvedConfigContext();
227
+
228
+ if (!(config !== null && config !== void 0 && (_config$deploy = config.deploy) !== null && _config$deploy !== void 0 && _config$deploy.microFrontend)) {
229
+ return {
230
+ entrypoint,
231
+ code
232
+ };
233
+ }
234
+
235
+ const nCode = (0, _utils2.makeRenderFunction)(code);
236
+ (0, _util.logger)('makeRenderFunction', nCode);
257
237
  return {
258
238
  entrypoint,
259
- exportStatement: exportStatementCode
239
+ code: nCode
260
240
  };
261
- }
241
+ },
262
242
 
263
- return {
243
+ modifyEntryExport({
264
244
  entrypoint,
265
245
  exportStatement
266
- };
267
- }
268
-
269
- };
270
- };
271
-
272
- exports.initializer = initializer;
246
+ }) {
247
+ var _config$deploy2;
248
+
249
+ // eslint-disable-next-line react-hooks/rules-of-hooks
250
+ const config = useResolvedConfigContext();
251
+
252
+ if (config !== null && config !== void 0 && (_config$deploy2 = config.deploy) !== null && _config$deploy2 !== void 0 && _config$deploy2.microFrontend) {
253
+ const exportStatementCode = (0, _utils2.makeProvider)();
254
+ (0, _util.logger)('exportStatement', exportStatementCode);
255
+ return {
256
+ entrypoint,
257
+ exportStatement: exportStatementCode
258
+ };
259
+ }
273
260
 
274
- var _default = (0, _core.createPlugin)(initializer({
275
- resolvedConfig,
261
+ return {
262
+ entrypoint,
263
+ exportStatement
264
+ };
265
+ }
276
266
 
277
- validateSchema() {
278
- return _utils.PLUGIN_SCHEMAS['@modern-js/plugin-garfish'];
267
+ };
279
268
  }
280
-
281
- }, {
282
- runtimePluginName: '@modern-js/runtime/plugins'
283
- }), {
284
- name: '@modern-js/plugin-garfish'
285
269
  });
286
270
 
287
271
  exports.default = _default;
@@ -8,13 +8,15 @@ exports.makeRenderFunction = exports.makeProvider = void 0;
8
8
  exports.setRuntimeConfig = setRuntimeConfig;
9
9
 
10
10
  const makeProvider = () => `
11
- export const provider = function ({basename, dom, ...props}) {
11
+ export const provider = function ({basename, dom}) {
12
12
  return {
13
- render({basename, dom}) {
14
- console.log('App.config', App.config);
15
- const SubApp = render({props, basename});
13
+ render({basename, dom, props}) {
14
+ const SubApp = render({ props, basename });
16
15
  const node = dom.querySelector('#' + MOUNT_ID) || dom;
17
- bootstrap(SubApp, node);
16
+ const App = function () {
17
+ return React.createElement(SubApp, props)
18
+ };
19
+ bootstrap(App, node);
18
20
  },
19
21
  destroy({ dom }) {
20
22
  const node = dom.querySelector('#' + MOUNT_ID) || dom;
@@ -15,12 +15,6 @@ Object.defineProperty(exports, "default", {
15
15
  return _plugin.default;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "useMicroApps", {
19
- enumerable: true,
20
- get: function () {
21
- return _useModuleApps.useMicroApps;
22
- }
23
- });
24
18
  Object.defineProperty(exports, "useModuleApp", {
25
19
  enumerable: true,
26
20
  get: function () {
@@ -99,8 +99,7 @@ const GarfishPlugin = config => {
99
99
  return /*#__PURE__*/_react.default.createElement('div');
100
100
  },
101
101
  apps: new Proxy({}, {
102
- get(_target, _p) {
103
- (0, _util.logger)('apps init Component Render', _p);
102
+ get() {
104
103
  return () => /*#__PURE__*/_react.default.createElement('div');
105
104
  }
106
105
 
@@ -3,22 +3,49 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMicroApps = useMicroApps;
7
6
  exports.useModuleApp = useModuleApp;
8
7
  exports.useModuleApps = useModuleApps;
9
8
 
10
- var _react = require("react");
9
+ var _react = _interopRequireWildcard(require("react"));
11
10
 
12
11
  var _util = require("../util");
13
12
 
14
13
  var _Context = require("./utils/Context");
15
14
 
15
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
+
17
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
+
19
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
20
+
21
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
22
+
23
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
24
+
16
25
  function useModuleApps() {
17
26
  const {
18
- apps
27
+ apps,
28
+ MApp,
29
+ appInfoList
19
30
  } = (0, _react.useContext)(_Context.GarfishContext);
20
- (0, _util.logger)('call useModuleApps', apps);
21
- return apps;
31
+ (0, _util.logger)('call useModuleApps', _objectSpread({
32
+ MApp,
33
+ apps: appInfoList
34
+ }, apps));
35
+ const Info = new Proxy(_objectSpread({
36
+ MApp,
37
+ apps: appInfoList
38
+ }, apps), {
39
+ get(target, p, receiver) {
40
+ if (typeof p === 'string' && p in target) {
41
+ return Reflect.get(target, p, receiver);
42
+ }
43
+
44
+ return () => /*#__PURE__*/_react.default.createElement('div');
45
+ }
46
+
47
+ });
48
+ return Info;
22
49
  }
23
50
 
24
51
  function useModuleApp() {
@@ -27,22 +54,4 @@ function useModuleApp() {
27
54
  } = (0, _react.useContext)(_Context.GarfishContext);
28
55
  (0, _util.logger)('call useModuleApps', MApp);
29
56
  return MApp;
30
- }
31
-
32
- function useMicroApps() {
33
- const {
34
- MApp,
35
- appInfoList,
36
- apps
37
- } = (0, _react.useContext)(_Context.GarfishContext);
38
- (0, _util.logger)('call useMicroApps', {
39
- MApp,
40
- apps: appInfoList,
41
- Components: apps
42
- });
43
- return {
44
- MApp,
45
- apps: appInfoList,
46
- Components: apps
47
- };
48
57
  }