@modern-js/plugin-garfish 2.66.0 → 2.67.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.
@@ -58,15 +58,19 @@ const garfishPlugin = () => ({
58
58
  setup: (api) => {
59
59
  api._internalRuntimePlugins(({ entrypoint, plugins }) => {
60
60
  const userConfig = api.getNormalizedConfig();
61
+ if (userConfig.deploy.microFrontend) {
62
+ return {
63
+ entrypoint,
64
+ plugins
65
+ };
66
+ }
61
67
  const { packageName, metaName } = api.getAppContext();
62
68
  const runtimeConfig = (0, import_utils.getEntryOptions)(entrypoint.entryName, entrypoint.isMainEntry, userConfig.runtime, userConfig.runtimeByEntries, packageName);
63
- if (runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.masterApp) {
64
- plugins.push({
65
- name: "garfish",
66
- path: `@${metaName}/plugin-garfish/runtime`,
67
- config: (runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.masterApp) || {}
68
- });
69
- }
69
+ plugins.push({
70
+ name: "garfish",
71
+ path: `@${metaName}/plugin-garfish/runtime`,
72
+ config: (runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.masterApp) || {}
73
+ });
70
74
  return {
71
75
  entrypoint,
72
76
  plugins
@@ -38,15 +38,19 @@ var garfishPlugin = function() {
38
38
  api._internalRuntimePlugins(function(param) {
39
39
  var entrypoint = param.entrypoint, plugins = param.plugins;
40
40
  var userConfig = api.getNormalizedConfig();
41
+ if (userConfig.deploy.microFrontend) {
42
+ return {
43
+ entrypoint,
44
+ plugins
45
+ };
46
+ }
41
47
  var _api_getAppContext = api.getAppContext(), packageName = _api_getAppContext.packageName, metaName = _api_getAppContext.metaName;
42
48
  var runtimeConfig = getEntryOptions(entrypoint.entryName, entrypoint.isMainEntry, userConfig.runtime, userConfig.runtimeByEntries, packageName);
43
- if (runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.masterApp) {
44
- plugins.push({
45
- name: "garfish",
46
- path: "@".concat(metaName, "/plugin-garfish/runtime"),
47
- config: (runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.masterApp) || {}
48
- });
49
- }
49
+ plugins.push({
50
+ name: "garfish",
51
+ path: "@".concat(metaName, "/plugin-garfish/runtime"),
52
+ config: (runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.masterApp) || {}
53
+ });
50
54
  return {
51
55
  entrypoint,
52
56
  plugins
@@ -32,15 +32,19 @@ const garfishPlugin = () => ({
32
32
  setup: (api) => {
33
33
  api._internalRuntimePlugins(({ entrypoint, plugins }) => {
34
34
  const userConfig = api.getNormalizedConfig();
35
+ if (userConfig.deploy.microFrontend) {
36
+ return {
37
+ entrypoint,
38
+ plugins
39
+ };
40
+ }
35
41
  const { packageName, metaName } = api.getAppContext();
36
42
  const runtimeConfig = getEntryOptions(entrypoint.entryName, entrypoint.isMainEntry, userConfig.runtime, userConfig.runtimeByEntries, packageName);
37
- if (runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.masterApp) {
38
- plugins.push({
39
- name: "garfish",
40
- path: `@${metaName}/plugin-garfish/runtime`,
41
- config: (runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.masterApp) || {}
42
- });
43
- }
43
+ plugins.push({
44
+ name: "garfish",
45
+ path: `@${metaName}/plugin-garfish/runtime`,
46
+ config: (runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.masterApp) || {}
47
+ });
44
48
  return {
45
49
  entrypoint,
46
50
  plugins
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.66.0",
18
+ "version": "2.67.1",
19
19
  "jsnext:source": "./src/cli/index.ts",
20
20
  "types": "./dist/types/cli/index.d.ts",
21
21
  "typesVersions": {
@@ -69,12 +69,12 @@
69
69
  "debug": "4.3.7",
70
70
  "garfish": "^1.8.1",
71
71
  "react-loadable": "^5.5.0",
72
- "@modern-js/plugin-v2": "2.66.0",
73
- "@modern-js/runtime-utils": "2.66.0",
74
- "@modern-js/utils": "2.66.0"
72
+ "@modern-js/utils": "2.67.1",
73
+ "@modern-js/runtime-utils": "2.67.1",
74
+ "@modern-js/plugin-v2": "2.67.1"
75
75
  },
76
76
  "peerDependencies": {
77
- "@modern-js/runtime": "^2.66.0",
77
+ "@modern-js/runtime": "^2.67.1",
78
78
  "react": ">=17",
79
79
  "react-dom": ">=17"
80
80
  },
@@ -93,13 +93,13 @@
93
93
  "react-dom": "^18.3.1",
94
94
  "react-router-dom": "6.27.0",
95
95
  "typescript": "^5",
96
- "@modern-js/app-tools": "2.66.0",
97
- "@modern-js/core": "2.66.0",
98
- "@modern-js/runtime": "2.66.0",
99
- "@modern-js/plugin-router-v5": "2.66.0",
100
- "@modern-js/types": "2.66.0",
96
+ "@modern-js/app-tools": "2.67.1",
97
+ "@modern-js/plugin-router-v5": "2.67.1",
98
+ "@modern-js/core": "2.67.1",
99
+ "@modern-js/runtime": "2.67.1",
101
100
  "@scripts/build": "2.66.0",
102
- "@scripts/jest-config": "2.66.0"
101
+ "@scripts/jest-config": "2.66.0",
102
+ "@modern-js/types": "2.67.1"
103
103
  },
104
104
  "sideEffects": false,
105
105
  "publishConfig": {
package/type.d.ts CHANGED
@@ -11,10 +11,7 @@ declare module '@modern-js/runtime' {
11
11
  }
12
12
 
13
13
  interface RuntimeConfig {
14
- garfish?: Config;
15
- garfishByEntries?: {
16
- [name: string]: Config;
17
- };
14
+ masterApp?: Config;
18
15
  }
19
16
  }
20
17
  declare module '@modern-js/app-tools' {