@modern-js/packages-generator 3.1.22 → 3.1.24

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 +20 -46
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -115762,10 +115762,14 @@ var require_chainId = __commonJS({
115762
115762
  SVG: "svg",
115763
115763
  /** Rule for pug */
115764
115764
  PUG: "pug",
115765
+ /** Rule for Vue */
115766
+ VUE: "vue",
115765
115767
  /** Rule for toml */
115766
115768
  TOML: "toml",
115767
115769
  /** Rule for yaml */
115768
115770
  YAML: "yaml",
115771
+ /** Rule for wasm */
115772
+ WASM: "wasm",
115769
115773
  /** Rule for bff */
115770
115774
  JS_BFF_API: "js-bff-api"
115771
115775
  },
@@ -115792,6 +115796,8 @@ var require_chainId = __commonJS({
115792
115796
  URL: "url",
115793
115797
  /** pug-loader */
115794
115798
  PUG: "pug",
115799
+ /** vue-loader */
115800
+ VUE: "vue",
115795
115801
  /** file-loader */
115796
115802
  FILE: "file",
115797
115803
  /** @svgr/webpack */
@@ -115861,12 +115867,16 @@ var require_chainId = __commonJS({
115861
115867
  BUNDLE_ANALYZER: "bundle-analyze",
115862
115868
  /** BottomTemplatePlugin */
115863
115869
  BOTTOM_TEMPLATE: "bottom-template",
115864
- /** HtmlCrossOriginPlugin */
115865
- HTML_CROSS_ORIGIN: "html-cross-origin",
115870
+ /** HtmlTagsPlugin */
115871
+ HTML_TAGS: "html-tags",
115866
115872
  /** HtmlNoncePlugin */
115867
115873
  HTML_NONCE: "html-nonce",
115874
+ /** HtmlCrossOriginPlugin */
115875
+ HTML_CROSS_ORIGIN: "html-cross-origin",
115868
115876
  /** MiniCssExtractPlugin */
115869
115877
  MINI_CSS_EXTRACT: "mini-css-extract",
115878
+ /** VueLoaderPlugin */
115879
+ VUE_LOADER_PLUGIN: "vue-loader-plugin",
115870
115880
  /** ReactFastRefreshPlugin */
115871
115881
  REACT_FAST_REFRESH: "react-fast-refresh",
115872
115882
  /** ProvidePlugin for node polyfill */
@@ -115880,9 +115890,7 @@ var require_chainId = __commonJS({
115880
115890
  /** HtmlAsyncChunkPlugin */
115881
115891
  HTML_ASYNC_CHUNK: "html-async-chunk",
115882
115892
  /** SWC_POLYFILL_CHECKER */
115883
- SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin",
115884
- /** HtmlTagsPlugin */
115885
- HTML_TAGS: "html-tags"
115893
+ SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
115886
115894
  },
115887
115895
  /** Predefined minimizers */
115888
115896
  MINIMIZER: {
@@ -116539,6 +116547,7 @@ var require_project = __commonJS({
116539
116547
  });
116540
116548
  var _interop_require_default = require_interop_require_default();
116541
116549
  var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
116550
+ var _pkgup = /* @__PURE__ */ _interop_require_default._(require_pkg_up2());
116542
116551
  var _commands = require_commands();
116543
116552
  var _compiled = require_compiled();
116544
116553
  var _common = require_common3();
@@ -116578,8 +116587,10 @@ var require_project = __commonJS({
116578
116587
  return Boolean(options["web-only"]);
116579
116588
  });
116580
116589
  var isBeyondReact17 = (cwd) => {
116581
- const pkgPath = _path.default.join(cwd, "package.json");
116582
- if (!_compiled.fs.existsSync(pkgPath)) {
116590
+ const pkgPath = _pkgup.default.sync({
116591
+ cwd
116592
+ });
116593
+ if (!pkgPath) {
116583
116594
  return false;
116584
116595
  }
116585
116596
  const pkgInfo = JSON.parse(_compiled.fs.readFileSync(pkgPath, "utf8"));
@@ -116849,11 +116860,10 @@ var require_config3 = __commonJS({
116849
116860
  }
116850
116861
  });
116851
116862
  var _is = require_is();
116852
- var _constants = require_constants();
116853
- var getEntryOptions = (name, baseOptions, optionsByEntries, packageName) => {
116863
+ var getEntryOptions = (name, isMainEntry, baseOptions, optionsByEntries, packageName) => {
116854
116864
  if (optionsByEntries) {
116855
116865
  let optionsByEntry = getOptionsByEntryName(name, optionsByEntries);
116856
- if (optionsByEntry === void 0 && name === _constants.MAIN_ENTRY_NAME && packageName) {
116866
+ if (optionsByEntry === void 0 && isMainEntry && packageName) {
116857
116867
  optionsByEntry = getOptionsByEntryName(packageName, optionsByEntries);
116858
116868
  }
116859
116869
  return optionsByEntry !== void 0 ? (0, _is.isPlainObject)(optionsByEntry) && (0, _is.isPlainObject)(baseOptions) ? __spreadValues(__spreadValues({}, baseOptions), optionsByEntry) : optionsByEntry : baseOptions;
@@ -117854,41 +117864,6 @@ var require_require = __commonJS({
117854
117864
  }
117855
117865
  });
117856
117866
 
117857
- // ../../../toolkit/utils/dist/cjs/cli/routes.js
117858
- var require_routes = __commonJS({
117859
- "../../../toolkit/utils/dist/cjs/cli/routes.js"(exports) {
117860
- "use strict";
117861
- Object.defineProperty(exports, "__esModule", {
117862
- value: true
117863
- });
117864
- Object.defineProperty(exports, "getRouteId", {
117865
- enumerable: true,
117866
- get: function() {
117867
- return getRouteId;
117868
- }
117869
- });
117870
- var _interop_require_default = require_interop_require_default();
117871
- var _path = /* @__PURE__ */ _interop_require_default._(require("path"));
117872
- var _constants = require_constants();
117873
- var _path1 = require_path();
117874
- var getPathWithoutExt = (filename) => {
117875
- const extname = _path.default.extname(filename);
117876
- return filename.slice(0, -extname.length);
117877
- };
117878
- var getRouteId = (componentPath, routesDir, entryName) => {
117879
- const relativePath = (0, _path1.normalizeToPosixPath)(_path.default.relative(routesDir, componentPath));
117880
- const pathWithoutExt = getPathWithoutExt(relativePath);
117881
- let id = ``;
117882
- if (entryName === _constants.MAIN_ENTRY_NAME) {
117883
- id = pathWithoutExt;
117884
- } else {
117885
- id = `${entryName}_${pathWithoutExt}`;
117886
- }
117887
- return id.replace(/\[(.*?)\]/g, "($1)");
117888
- };
117889
- }
117890
- });
117891
-
117892
117867
  // ../../../toolkit/utils/dist/cjs/cli/runtimeExports.js
117893
117868
  var require_runtimeExports = __commonJS({
117894
117869
  "../../../toolkit/utils/dist/cjs/cli/runtimeExports.js"(exports) {
@@ -118035,7 +118010,6 @@ var require_cli = __commonJS({
118035
118010
  _export_star._(require_prettyInstructions(), exports);
118036
118011
  _export_star._(require_print(), exports);
118037
118012
  _export_star._(require_require(), exports);
118038
- _export_star._(require_routes(), exports);
118039
118013
  _export_star._(require_runtimeExports(), exports);
118040
118014
  _export_star._(require_watch(), exports);
118041
118015
  }
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.1.22",
18
+ "version": "3.1.24",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -30,10 +30,10 @@
30
30
  "@types/node": "^14",
31
31
  "jest": "^29",
32
32
  "typescript": "^5",
33
- "@scripts/build": "2.23.0",
34
- "@scripts/jest-config": "2.23.0",
35
- "@modern-js/generator-common": "3.1.22",
36
- "@modern-js/generator-utils": "3.1.22"
33
+ "@scripts/build": "2.24.0",
34
+ "@modern-js/generator-utils": "3.1.24",
35
+ "@modern-js/generator-common": "3.1.24",
36
+ "@scripts/jest-config": "2.24.0"
37
37
  },
38
38
  "sideEffects": false,
39
39
  "publishConfig": {