@modern-js/bff-generator 3.0.2 → 3.0.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.
Files changed (2) hide show
  1. package/dist/index.js +46 -14
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -36566,7 +36566,8 @@ var require_chainId = __commonJS({
36566
36566
  ASSETS_RETRY: "ASSETS_RETRY",
36567
36567
  AUTO_SET_ROOT_SIZE: "auto-set-root-size",
36568
36568
  HTML_ASYNC_CHUNK: "html-async-chunk",
36569
- SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
36569
+ SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin",
36570
+ HTML_TAGS: "html-tags"
36570
36571
  },
36571
36572
  MINIMIZER: {
36572
36573
  JS: "js",
@@ -36747,6 +36748,36 @@ var require_getCoreJsVersion = __commonJS({
36747
36748
  }
36748
36749
  });
36749
36750
 
36751
+ // ../../../toolkit/utils/dist/react.js
36752
+ var require_react = __commonJS({
36753
+ "../../../toolkit/utils/dist/react.js"(exports) {
36754
+ "use strict";
36755
+ var __importDefault = exports && exports.__importDefault || function(mod) {
36756
+ return mod && mod.__esModule ? mod : { "default": mod };
36757
+ };
36758
+ Object.defineProperty(exports, "__esModule", { value: true });
36759
+ exports.isBeyondReact17 = void 0;
36760
+ var path_1 = __importDefault(require("path"));
36761
+ var _1 = require_dist();
36762
+ var isBeyondReact17 = (cwd) => {
36763
+ const pkgPath = path_1.default.join(cwd, "package.json");
36764
+ if (!_1.fs.existsSync(pkgPath)) {
36765
+ return false;
36766
+ }
36767
+ const pkgInfo = JSON.parse(_1.fs.readFileSync(pkgPath, "utf8"));
36768
+ const deps = {
36769
+ ...pkgInfo.devDependencies,
36770
+ ...pkgInfo.dependencies
36771
+ };
36772
+ if (typeof deps.react !== "string") {
36773
+ return false;
36774
+ }
36775
+ return _1.semver.satisfies(_1.semver.minVersion(deps.react), ">=17.0.0");
36776
+ };
36777
+ exports.isBeyondReact17 = isBeyondReact17;
36778
+ }
36779
+ });
36780
+
36750
36781
  // ../../../toolkit/utils/dist/index.js
36751
36782
  var require_dist = __commonJS({
36752
36783
  "../../../toolkit/utils/dist/index.js"(exports) {
@@ -36814,6 +36845,7 @@ var require_dist = __commonJS({
36814
36845
  __exportStar(require_routes(), exports);
36815
36846
  __exportStar(require_test_utils(), exports);
36816
36847
  __exportStar(require_getCoreJsVersion(), exports);
36848
+ __exportStar(require_react(), exports);
36817
36849
  }
36818
36850
  });
36819
36851
 
@@ -137217,21 +137249,21 @@ var MWANewActionGenerators = {
137217
137249
  };
137218
137250
  var MWANewActionPluginName = {
137219
137251
  [ActionType.Element]: {
137220
- [ActionElement.Server]: "ServerPlugin"
137252
+ [ActionElement.Server]: "serverPlugin"
137221
137253
  },
137222
137254
  [ActionType.Function]: {
137223
- [ActionFunction.TailwindCSS]: "TailwindCSSPlugin",
137224
- [ActionFunction.BFF]: "BFFPlugin",
137225
- [ActionFunction.MicroFrontend]: "GarfishPlugin",
137226
- [ActionFunction.Test]: "TestPlugin",
137227
- [ActionFunction.Storybook]: "StorybookPlugin",
137228
- [ActionFunction.SSG]: "SSGPlugin",
137229
- [ActionFunction.Polyfill]: "PolyfillPlugin",
137230
- [ActionFunction.Proxy]: "ProxyPlugin",
137231
- [ActionFunction.SWC]: "SWCPlugin"
137255
+ [ActionFunction.TailwindCSS]: "tailwindCSSPlugin",
137256
+ [ActionFunction.BFF]: "bffPlugin",
137257
+ [ActionFunction.MicroFrontend]: "garfishPlugin",
137258
+ [ActionFunction.Test]: "testPlugin",
137259
+ [ActionFunction.Storybook]: "storybookPlugin",
137260
+ [ActionFunction.SSG]: "ssgPlugin",
137261
+ [ActionFunction.Polyfill]: "polyfillPlugin",
137262
+ [ActionFunction.Proxy]: "proxyPlugin",
137263
+ [ActionFunction.SWC]: "swcPlugin"
137232
137264
  },
137233
137265
  [ActionType.Refactor]: {
137234
- [ActionRefactor.ReactRouter5]: "ReactRouter5Plugin"
137266
+ [ActionRefactor.ReactRouter5]: "reactRouter5Plugin"
137235
137267
  }
137236
137268
  };
137237
137269
  var MWANewActionPluginDependence = {
@@ -137254,8 +137286,8 @@ var MWANewActionPluginDependence = {
137254
137286
  }
137255
137287
  };
137256
137288
  var BFFPluginName = {
137257
- [Framework.Express]: "ExpressBFFPlugin",
137258
- [Framework.Koa]: "KoaBFFPlugin"
137289
+ [Framework.Express]: "expressPlugin",
137290
+ [Framework.Koa]: "koaPlugin"
137259
137291
  };
137260
137292
  var BFFPluginDependence = {
137261
137293
  [Framework.Express]: "@modern-js/plugin-express",
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "3.0.2",
14
+ "version": "3.0.3",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./src/index.ts",
17
17
  "main": "./dist/index.js",
@@ -28,11 +28,11 @@
28
28
  "@types/node": "^14",
29
29
  "jest": "^27",
30
30
  "typescript": "^4",
31
- "@modern-js/generator-common": "3.0.2",
32
- "@modern-js/generator-utils": "3.0.2",
33
- "@modern-js/plugin-i18n": "2.0.2",
34
- "@scripts/jest-config": "2.0.2",
35
- "@scripts/build": "2.0.2"
31
+ "@modern-js/plugin-i18n": "2.1.0",
32
+ "@scripts/jest-config": "2.1.0",
33
+ "@modern-js/generator-utils": "3.0.3",
34
+ "@scripts/build": "2.1.0",
35
+ "@modern-js/generator-common": "3.0.3"
36
36
  },
37
37
  "sideEffects": false,
38
38
  "publishConfig": {