@modern-js/repo-generator 0.0.0-next-1680058022535 → 0.0.0-next-1680093705168

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 +29 -28
  2. package/package.json +12 -12
package/dist/index.js CHANGED
@@ -135312,12 +135312,17 @@ var require_commands = __commonJS({
135312
135312
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
135313
135313
  var commands_exports = {};
135314
135314
  __export2(commands_exports, {
135315
+ getArgv: () => getArgv,
135315
135316
  getCommand: () => getCommand,
135316
135317
  isDevCommand: () => isDevCommand
135317
135318
  });
135318
135319
  module2.exports = __toCommonJS2(commands_exports);
135320
+ var getArgv = () => {
135321
+ var _a2;
135322
+ return (((_a2 = process.env.MODERN_ARGV) == null ? void 0 : _a2.split(" ")) || process.argv).slice(2);
135323
+ };
135319
135324
  var getCommand = () => {
135320
- const args = process.argv.slice(2);
135325
+ const args = getArgv();
135321
135326
  const command = args[0];
135322
135327
  return command;
135323
135328
  };
@@ -137894,9 +137899,9 @@ var require_getServerConfig2 = __commonJS({
137894
137899
  }
137895
137900
  });
137896
137901
 
137897
- // ../../../toolkit/utils/dist/tryResolve.js
137898
- var require_tryResolve2 = __commonJS({
137899
- "../../../toolkit/utils/dist/tryResolve.js"(exports, module2) {
137902
+ // ../../../toolkit/utils/dist/resolve.js
137903
+ var require_resolve = __commonJS({
137904
+ "../../../toolkit/utils/dist/resolve.js"(exports, module2) {
137900
137905
  var __defProp2 = Object.defineProperty;
137901
137906
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
137902
137907
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -137914,12 +137919,13 @@ var require_tryResolve2 = __commonJS({
137914
137919
  return to;
137915
137920
  };
137916
137921
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
137917
- var tryResolve_exports = {};
137918
- __export2(tryResolve_exports, {
137922
+ var resolve_exports = {};
137923
+ __export2(resolve_exports, {
137924
+ getAntdMajorVersion: () => getAntdMajorVersion,
137919
137925
  isPackageInstalled: () => isPackageInstalled,
137920
137926
  tryResolve: () => tryResolve
137921
137927
  });
137922
- module2.exports = __toCommonJS2(tryResolve_exports);
137928
+ module2.exports = __toCommonJS2(resolve_exports);
137923
137929
  var import_ensureArray = require_ensureArray2();
137924
137930
  var tryResolve = (name, resolvePath) => {
137925
137931
  let filePath = "";
@@ -137942,6 +137948,17 @@ var require_tryResolve2 = __commonJS({
137942
137948
  return false;
137943
137949
  }
137944
137950
  };
137951
+ var getAntdMajorVersion = (appDirectory) => {
137952
+ try {
137953
+ const pkgJsonPath = require.resolve("antd/package.json", {
137954
+ paths: [appDirectory]
137955
+ });
137956
+ const { version } = require(pkgJsonPath);
137957
+ return Number(version.split(".")[0]);
137958
+ } catch (err) {
137959
+ return null;
137960
+ }
137961
+ };
137945
137962
  }
137946
137963
  });
137947
137964
 
@@ -138002,15 +138019,16 @@ var require_analyzeProject2 = __commonJS({
138002
138019
  });
138003
138020
  module2.exports = __toCommonJS2(analyzeProject_exports);
138004
138021
  var path9 = __toESM2(require("path"));
138022
+ var import_commands = require_commands();
138005
138023
  var import_compiled = require_compiled2();
138006
138024
  var isApiOnly = (appDirectory, entryDir) => __async2(void 0, null, function* () {
138007
138025
  const srcDir = path9.join(appDirectory, entryDir != null ? entryDir : "src");
138008
138026
  const existSrc = yield import_compiled.fs.pathExists(srcDir);
138009
- const options = (0, import_compiled.minimist)(process.argv.slice(2));
138027
+ const options = (0, import_compiled.minimist)((0, import_commands.getArgv)());
138010
138028
  return !existSrc || Boolean(options["api-only"]);
138011
138029
  });
138012
138030
  var isWebOnly = () => __async2(void 0, null, function* () {
138013
- const options = (0, import_compiled.minimist)(process.argv.slice(2));
138031
+ const options = (0, import_compiled.minimist)((0, import_commands.getArgv)());
138014
138032
  return Boolean(options["web-only"]);
138015
138033
  });
138016
138034
  }
@@ -138081,27 +138099,10 @@ var require_chainId2 = __commonJS({
138081
138099
  },
138082
138100
  /** Predefined rule groups */
138083
138101
  ONE_OF: {
138084
- JS: "js",
138085
- TS: "ts",
138086
- CSS: "css",
138087
- LESS: "less",
138088
- SASS: "sass",
138089
- YAML: "yml",
138090
- TOML: "toml",
138091
- FALLBACK: "fallback",
138092
- MARKDOWN: "markdown",
138093
- BFF_CLIENT: "bff-client",
138094
- CSS_MODULES: "css-modules",
138095
- LESS_MODULES: "less-modules",
138096
- SASS_MODULES: "sass-modules",
138097
138102
  SVG: "svg",
138098
138103
  SVG_URL: "svg-url",
138099
138104
  SVG_ASSET: "svg-asset",
138100
- SVG_INLINE: "svg-inline",
138101
- ASSETS: "assets",
138102
- ASSETS_URL: "assets-url",
138103
- ASSETS_INLINE: "assets-inline",
138104
- IMAGE_COMPRESS: "image-compress"
138105
+ SVG_INLINE: "svg-inline"
138105
138106
  },
138106
138107
  /** Predefined loaders */
138107
138108
  USE: {
@@ -138817,7 +138818,7 @@ var require_dist2 = __commonJS({
138817
138818
  __reExport(src_exports2, require_wait2(), module2.exports);
138818
138819
  __reExport(src_exports2, require_emptyDir2(), module2.exports);
138819
138820
  __reExport(src_exports2, require_getServerConfig2(), module2.exports);
138820
- __reExport(src_exports2, require_tryResolve2(), module2.exports);
138821
+ __reExport(src_exports2, require_resolve(), module2.exports);
138821
138822
  __reExport(src_exports2, require_analyzeProject2(), module2.exports);
138822
138823
  __reExport(src_exports2, require_chainId2(), module2.exports);
138823
138824
  __reExport(src_exports2, require_version2(), module2.exports);
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-next-1680058022535",
14
+ "version": "0.0.0-next-1680093705168",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "main": "./dist/index.js",
17
17
  "files": [
@@ -26,17 +26,17 @@
26
26
  "@types/node": "^14",
27
27
  "jest": "^29",
28
28
  "typescript": "^4",
29
- "@modern-js/base-generator": "0.0.0-next-1680058022535",
30
- "@modern-js/generator-plugin": "0.0.0-next-1680058022535",
31
- "@modern-js/generator-common": "0.0.0-next-1680058022535",
32
- "@modern-js/generator-utils": "0.0.0-next-1680058022535",
33
- "@modern-js/module-generator": "0.0.0-next-1680058022535",
34
- "@modern-js/doc-generator": "0.0.0-next-1680058022535",
35
- "@modern-js/mwa-generator": "0.0.0-next-1680058022535",
36
- "@modern-js/monorepo-generator": "0.0.0-next-1680058022535",
37
- "@scripts/build": "0.0.0-next-1680058022535",
38
- "@scripts/jest-config": "0.0.0-next-1680058022535",
39
- "@modern-js/utils": "0.0.0-next-1680058022535"
29
+ "@modern-js/base-generator": "0.0.0-next-1680093705168",
30
+ "@modern-js/generator-common": "0.0.0-next-1680093705168",
31
+ "@modern-js/generator-plugin": "0.0.0-next-1680093705168",
32
+ "@modern-js/generator-utils": "0.0.0-next-1680093705168",
33
+ "@modern-js/module-generator": "0.0.0-next-1680093705168",
34
+ "@modern-js/monorepo-generator": "0.0.0-next-1680093705168",
35
+ "@modern-js/mwa-generator": "0.0.0-next-1680093705168",
36
+ "@modern-js/doc-generator": "0.0.0-next-1680093705168",
37
+ "@modern-js/utils": "0.0.0-next-1680093705168",
38
+ "@scripts/build": "0.0.0-next-1680093705168",
39
+ "@scripts/jest-config": "0.0.0-next-1680093705168"
40
40
  },
41
41
  "sideEffects": false,
42
42
  "publishConfig": {