@modern-js/router-v5-generator 3.4.15 → 3.4.17

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 (3) hide show
  1. package/dist/index.js +128 -128
  2. package/package.json +10 -10
  3. package/src/index.ts +6 -7
package/dist/index.js CHANGED
@@ -6620,9 +6620,9 @@ var require_lib = __commonJS({
6620
6620
  }
6621
6621
  });
6622
6622
 
6623
- // ../../../../node_modules/.pnpm/@modern-js+utils@2.58.0/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
6623
+ // ../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
6624
6624
  var require_chalk = __commonJS({
6625
- "../../../../node_modules/.pnpm/@modern-js+utils@2.58.0/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
6625
+ "../../../../node_modules/.pnpm/@modern-js+utils@2.58.1/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
6626
6626
  "use strict";
6627
6627
  (() => {
6628
6628
  var e = { 44: (e2, t2, n2) => {
@@ -51056,12 +51056,12 @@ __export(src_exports, {
51056
51056
  module.exports = __toCommonJS(src_exports);
51057
51057
  var import_path7 = __toESM(require("path"));
51058
51058
 
51059
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
51059
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
51060
51060
  var import_path = __toESM(require("path"));
51061
51061
  var import_utils = require("@modern-js/utils");
51062
51062
  var FS_RESOURCE = "_codesmith_core_fs_resource";
51063
51063
 
51064
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
51064
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
51065
51065
  var import_utils2 = require("@modern-js/utils");
51066
51066
  async function fsExists(path7) {
51067
51067
  try {
@@ -51072,13 +51072,13 @@ async function fsExists(path7) {
51072
51072
  }
51073
51073
  }
51074
51074
 
51075
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
51075
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
51076
51076
  var import_ejs = __toESM(require_ejs());
51077
51077
  function renderString(template, fullData) {
51078
51078
  return import_ejs.default.render(template, fullData) || "";
51079
51079
  }
51080
51080
 
51081
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
51081
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
51082
51082
  var EjsAPI = class {
51083
51083
  async renderTemplate(templateResource, target, parameters = {}) {
51084
51084
  if (templateResource._type !== FS_RESOURCE) {
@@ -51110,7 +51110,7 @@ var EjsAPI = class {
51110
51110
  }
51111
51111
  };
51112
51112
 
51113
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
51113
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
51114
51114
  var import_path2 = __toESM(require("path"));
51115
51115
  var import_utils4 = require("@modern-js/utils");
51116
51116
  var FsAPI = class {
@@ -51137,7 +51137,7 @@ var FsAPI = class {
51137
51137
  }
51138
51138
  };
51139
51139
 
51140
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
51140
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
51141
51141
  var import_utils5 = require("@modern-js/utils");
51142
51142
  async function canUseGit() {
51143
51143
  try {
@@ -51212,7 +51212,7 @@ async function gitCommit(cwd, commitMessage) {
51212
51212
  });
51213
51213
  }
51214
51214
 
51215
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
51215
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
51216
51216
  var GitAPI = class {
51217
51217
  async isInGitRepo(cwd = this.generatorCore.outputPath) {
51218
51218
  const canUse = await canUseGit();
@@ -51262,7 +51262,7 @@ var GitAPI = class {
51262
51262
  }
51263
51263
  };
51264
51264
 
51265
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
51265
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
51266
51266
  var import_handlebars = __toESM(require_lib());
51267
51267
  function renderString2(template, fullData, registers) {
51268
51268
  const helpers = {
@@ -51276,7 +51276,7 @@ function renderString2(template, fullData, registers) {
51276
51276
  return import_handlebars.default.compile(template)(fullData) || "";
51277
51277
  }
51278
51278
 
51279
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.0_@modern-js+codesmith@2.4.0/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
51279
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.1_@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
51280
51280
  var HandlebarsAPI = class {
51281
51281
  async registerHelp(helpers) {
51282
51282
  this.registers.helpers = {
@@ -51324,7 +51324,7 @@ var HandlebarsAPI = class {
51324
51324
  }
51325
51325
  };
51326
51326
 
51327
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
51327
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
51328
51328
  var import_utils8 = require("@modern-js/utils");
51329
51329
  async function canUseNvm() {
51330
51330
  try {
@@ -51374,7 +51374,7 @@ async function canUsePnpm() {
51374
51374
  }
51375
51375
  }
51376
51376
 
51377
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
51377
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
51378
51378
  var import_utils9 = require("@modern-js/utils");
51379
51379
  function execaWithStreamLog(command, args, options) {
51380
51380
  const promise = (0, import_utils9.execa)(command, args, {
@@ -51470,7 +51470,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
51470
51470
  throw new Error("please install pnpm first");
51471
51471
  }
51472
51472
 
51473
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
51473
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
51474
51474
  var NpmAPI = class {
51475
51475
  npmInstall({ cwd, registryUrl, ignoreScripts }) {
51476
51476
  return npmInstall({
@@ -61054,10 +61054,10 @@ var Schema = (
61054
61054
  }()
61055
61055
  );
61056
61056
 
61057
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61057
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61058
61058
  var import_inquirer = __toESM(require_inquirer());
61059
61059
 
61060
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
61060
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
61061
61061
  var import_lodash = require("@modern-js/utils/lodash");
61062
61062
  function validateSchema(schema) {
61063
61063
  const { type, properties } = schema;
@@ -61149,7 +61149,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
61149
61149
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
61150
61150
  }
61151
61151
 
61152
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61152
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61153
61153
  var compileRule = (rule, scope) => {
61154
61154
  const state = Schema.compile(rule, {
61155
61155
  $self: {},
@@ -61253,7 +61253,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
61253
61253
  return answers;
61254
61254
  }
61255
61255
 
61256
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
61256
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
61257
61257
  var CLIReader = class {
61258
61258
  getAnswers() {
61259
61259
  return this.answers;
@@ -61282,7 +61282,7 @@ var CLIReader = class {
61282
61282
  }
61283
61283
  };
61284
61284
 
61285
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61285
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61286
61286
  var import_utils13 = require("@modern-js/utils");
61287
61287
  var import_lodash5 = require("@modern-js/utils/lodash");
61288
61288
  var import_comment_json = __toESM(require_src2());
@@ -61351,7 +61351,7 @@ var I18n = class {
61351
61351
  }
61352
61352
  };
61353
61353
 
61354
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
61354
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
61355
61355
  var EN_LOCALE = {
61356
61356
  environment: {
61357
61357
  node_version: "please upgrade node to lts version",
@@ -61378,7 +61378,7 @@ var EN_LOCALE = {
61378
61378
  }
61379
61379
  };
61380
61380
 
61381
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
61381
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
61382
61382
  var ZH_LOCALE = {
61383
61383
  environment: {
61384
61384
  node_version: "请升级 Node 版本至 LIS",
@@ -61405,14 +61405,14 @@ var ZH_LOCALE = {
61405
61405
  }
61406
61406
  };
61407
61407
 
61408
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
61408
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
61409
61409
  var i18n = new I18n();
61410
61410
  var localeKeys = i18n.init("zh", {
61411
61411
  zh: ZH_LOCALE,
61412
61412
  en: EN_LOCALE
61413
61413
  });
61414
61414
 
61415
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
61415
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
61416
61416
  var import_path4 = __toESM(require("path"));
61417
61417
  var import_utils12 = require("@modern-js/utils");
61418
61418
  var NODE_MAJOR_VERSION_MAP = {
@@ -61460,7 +61460,7 @@ async function checkUseNvm(cwd, logger) {
61460
61460
  }
61461
61461
  }
61462
61462
 
61463
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
61463
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
61464
61464
  var import_lodash4 = require("@modern-js/utils/lodash");
61465
61465
  function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
61466
61466
  for (const question of questions) {
@@ -61488,7 +61488,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
61488
61488
  return questions;
61489
61489
  }
61490
61490
 
61491
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.0_@modern-js+codesmith@2.4.0_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61491
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.1_@modern-js+codesmith@2.4.1_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61492
61492
  var AppAPI = class {
61493
61493
  async checkEnvironment(nodeVersion) {
61494
61494
  if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
@@ -61720,10 +61720,6 @@ var AppAPI = class {
61720
61720
  }
61721
61721
  };
61722
61722
 
61723
- // ../../generator-utils/dist/esm/index.js
61724
- var import_path6 = __toESM(require("path"));
61725
- var import_utils16 = require("@modern-js/utils");
61726
-
61727
61723
  // ../../../cli/plugin-i18n/dist/esm-node/index.js
61728
61724
  var import_lodash7 = require("@modern-js/utils/lodash");
61729
61725
 
@@ -61787,98 +61783,6 @@ var I18n2 = class {
61787
61783
  }
61788
61784
  };
61789
61785
 
61790
- // ../../generator-common/dist/esm-node/locale/zh.js
61791
- var ZH_LOCALE2 = {
61792
- solution: {
61793
- self: "请选择你想创建的工程类型",
61794
- mwa: "Web 应用",
61795
- module: "Npm 模块",
61796
- custom: "自定义",
61797
- default: "默认"
61798
- },
61799
- scenes: {
61800
- self: "请选择项目场景"
61801
- },
61802
- sub_solution: {
61803
- self: "请选择你想创建的工程类型",
61804
- mwa: "Web 应用",
61805
- module: "Npm 模块"
61806
- },
61807
- action: {
61808
- self: "请选择你想要的操作",
61809
- function: {
61810
- self: "启用可选功能",
61811
- question: "请选择功能名称",
61812
- tailwindcss: "启用「Tailwind CSS」 支持",
61813
- bff: "启用「BFF」功能",
61814
- micro_frontend: "启用「微前端」模式",
61815
- i18n: "启用「国际化(i18n)」功能",
61816
- storybookV7: "启用「Storybook」V7",
61817
- runtime_api: "启用「Runtime API」",
61818
- ssg: "启用「SSG」功能",
61819
- polyfill: "启用「基于 UA 的 Polyfill」功能",
61820
- proxy: "启用「全局代理」",
61821
- swc: "启用「SWC 编译」",
61822
- module_doc: "启动「模块文档」功能"
61823
- },
61824
- element: {
61825
- self: "创建工程元素",
61826
- question: "请选择创建元素类型",
61827
- entry: "新建「应用入口」",
61828
- server: "新建「自定义 Web Server」源码目录"
61829
- },
61830
- refactor: {
61831
- self: "自动重构",
61832
- question: "请选择重构类型",
61833
- react_router_5: "使用 React Router v5"
61834
- }
61835
- },
61836
- boolean: {
61837
- yes: "是",
61838
- no: "否"
61839
- },
61840
- language: {
61841
- self: "请选择开发语言"
61842
- },
61843
- packageManager: {
61844
- self: "请选择包管理工具"
61845
- },
61846
- entry: {
61847
- name: "请填写入口名称",
61848
- no_empty: "入口名称不能为空!",
61849
- no_pages: '入口名称不支持 "pages"!'
61850
- },
61851
- packageName: {
61852
- self: "请填写项目名称",
61853
- sub_name: "请填写子项目名称",
61854
- no_empty: "项目名称不能为空!"
61855
- },
61856
- packagePath: {
61857
- self: "请填写子项目目录名称",
61858
- no_empty: "目录名称不能为空!",
61859
- format: "目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)"
61860
- },
61861
- framework: {
61862
- self: "请选择运行时框架",
61863
- egg: "Egg",
61864
- express: "Express",
61865
- koa: "Koa",
61866
- nest: "Nest"
61867
- },
61868
- bff: {
61869
- bffType: {
61870
- self: "请选择 BFF 类型",
61871
- func: "函数模式",
61872
- framework: "框架模式"
61873
- }
61874
- },
61875
- buildTools: {
61876
- self: "请选择构建工具",
61877
- webpack: "webpack",
61878
- rspack: "Rspack (实验性)"
61879
- }
61880
- };
61881
-
61882
61786
  // ../../generator-common/dist/esm-node/locale/en.js
61883
61787
  var EN_LOCALE2 = {
61884
61788
  solution: {
@@ -61971,6 +61875,98 @@ var EN_LOCALE2 = {
61971
61875
  }
61972
61876
  };
61973
61877
 
61878
+ // ../../generator-common/dist/esm-node/locale/zh.js
61879
+ var ZH_LOCALE2 = {
61880
+ solution: {
61881
+ self: "请选择你想创建的工程类型",
61882
+ mwa: "Web 应用",
61883
+ module: "Npm 模块",
61884
+ custom: "自定义",
61885
+ default: "默认"
61886
+ },
61887
+ scenes: {
61888
+ self: "请选择项目场景"
61889
+ },
61890
+ sub_solution: {
61891
+ self: "请选择你想创建的工程类型",
61892
+ mwa: "Web 应用",
61893
+ module: "Npm 模块"
61894
+ },
61895
+ action: {
61896
+ self: "请选择你想要的操作",
61897
+ function: {
61898
+ self: "启用可选功能",
61899
+ question: "请选择功能名称",
61900
+ tailwindcss: "启用「Tailwind CSS」 支持",
61901
+ bff: "启用「BFF」功能",
61902
+ micro_frontend: "启用「微前端」模式",
61903
+ i18n: "启用「国际化(i18n)」功能",
61904
+ storybookV7: "启用「Storybook」V7",
61905
+ runtime_api: "启用「Runtime API」",
61906
+ ssg: "启用「SSG」功能",
61907
+ polyfill: "启用「基于 UA 的 Polyfill」功能",
61908
+ proxy: "启用「全局代理」",
61909
+ swc: "启用「SWC 编译」",
61910
+ module_doc: "启动「模块文档」功能"
61911
+ },
61912
+ element: {
61913
+ self: "创建工程元素",
61914
+ question: "请选择创建元素类型",
61915
+ entry: "新建「应用入口」",
61916
+ server: "新建「自定义 Web Server」源码目录"
61917
+ },
61918
+ refactor: {
61919
+ self: "自动重构",
61920
+ question: "请选择重构类型",
61921
+ react_router_5: "使用 React Router v5"
61922
+ }
61923
+ },
61924
+ boolean: {
61925
+ yes: "是",
61926
+ no: "否"
61927
+ },
61928
+ language: {
61929
+ self: "请选择开发语言"
61930
+ },
61931
+ packageManager: {
61932
+ self: "请选择包管理工具"
61933
+ },
61934
+ entry: {
61935
+ name: "请填写入口名称",
61936
+ no_empty: "入口名称不能为空!",
61937
+ no_pages: '入口名称不支持 "pages"!'
61938
+ },
61939
+ packageName: {
61940
+ self: "请填写项目名称",
61941
+ sub_name: "请填写子项目名称",
61942
+ no_empty: "项目名称不能为空!"
61943
+ },
61944
+ packagePath: {
61945
+ self: "请填写子项目目录名称",
61946
+ no_empty: "目录名称不能为空!",
61947
+ format: "目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)"
61948
+ },
61949
+ framework: {
61950
+ self: "请选择运行时框架",
61951
+ egg: "Egg",
61952
+ express: "Express",
61953
+ koa: "Koa",
61954
+ nest: "Nest"
61955
+ },
61956
+ bff: {
61957
+ bffType: {
61958
+ self: "请选择 BFF 类型",
61959
+ func: "函数模式",
61960
+ framework: "框架模式"
61961
+ }
61962
+ },
61963
+ buildTools: {
61964
+ self: "请选择构建工具",
61965
+ webpack: "webpack",
61966
+ rspack: "Rspack (实验性)"
61967
+ }
61968
+ };
61969
+
61974
61970
  // ../../generator-common/dist/esm-node/locale/index.js
61975
61971
  var i18n2 = new I18n2();
61976
61972
  var localeKeys2 = i18n2.init("en", {
@@ -61986,6 +61982,10 @@ var Solution;
61986
61982
  })(Solution || (Solution = {}));
61987
61983
  var DependenceGenerator = "@modern-js/dependence-generator";
61988
61984
 
61985
+ // ../../generator-utils/dist/esm/index.js
61986
+ var import_path6 = __toESM(require("path"));
61987
+ var import_utils16 = require("@modern-js/utils");
61988
+
61989
61989
  // ../../generator-utils/dist/esm/utils/fsExist.js
61990
61990
  var import_utils15 = require("@modern-js/utils");
61991
61991
  async function fileExist(filePath) {
@@ -62032,13 +62032,6 @@ async function getModernConfigFile(appDir) {
62032
62032
  return isTsProject(appDir) ? "modern.config.ts" : "modern.config.js";
62033
62033
  }
62034
62034
 
62035
- // src/locale/zh.ts
62036
- var ZH_LOCALE3 = {
62037
- success: `安装插件依赖成功!请添加如下代码至`,
62038
- successTooltip: `添加完成后,你将在当前项目中使用 React Router v5,请使用 React Router v5 相关 API 并从`,
62039
- successTooltipSuffix: "导入。"
62040
- };
62041
-
62042
62035
  // src/locale/en.ts
62043
62036
  var EN_LOCALE3 = {
62044
62037
  success: `Plugin dependency installed successfully! Please add the following code to`,
@@ -62046,6 +62039,13 @@ var EN_LOCALE3 = {
62046
62039
  successTooltipSuffix: "."
62047
62040
  };
62048
62041
 
62042
+ // src/locale/zh.ts
62043
+ var ZH_LOCALE3 = {
62044
+ success: `安装插件依赖成功!请添加如下代码至`,
62045
+ successTooltip: `添加完成后,你将在当前项目中使用 React Router v5,请使用 React Router v5 相关 API 并从`,
62046
+ successTooltipSuffix: "导入。"
62047
+ };
62048
+
62049
62049
  // src/locale/index.ts
62050
62050
  var i18n3 = new I18n2();
62051
62051
  var localeKeys3 = i18n3.init("en", { zh: ZH_LOCALE3, en: EN_LOCALE3 });
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.4.15",
18
+ "version": "3.4.17",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -23,21 +23,21 @@
23
23
  "/dist/index.js"
24
24
  ],
25
25
  "dependencies": {
26
- "@modern-js/utils": "2.58.1"
26
+ "@modern-js/utils": "2.58.3"
27
27
  },
28
28
  "devDependencies": {
29
- "@modern-js/codesmith": "2.4.0",
30
- "@modern-js/codesmith-api-app": "2.4.0",
29
+ "@modern-js/codesmith": "2.4.1",
30
+ "@modern-js/codesmith-api-app": "2.4.1",
31
31
  "@types/jest": "^29",
32
32
  "@types/node": "^14",
33
33
  "jest": "^29",
34
34
  "typescript": "^5",
35
- "@modern-js/dependence-generator": "3.4.15",
36
- "@modern-js/generator-common": "3.4.15",
37
- "@modern-js/generator-utils": "3.4.15",
38
- "@scripts/build": "2.58.1",
39
- "@modern-js/plugin-i18n": "2.58.1",
40
- "@scripts/jest-config": "2.58.1"
35
+ "@modern-js/dependence-generator": "3.4.17",
36
+ "@modern-js/generator-common": "3.4.17",
37
+ "@modern-js/generator-utils": "3.4.17",
38
+ "@modern-js/plugin-i18n": "2.58.3",
39
+ "@scripts/build": "2.58.3",
40
+ "@scripts/jest-config": "2.58.3"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "publishConfig": {
package/src/index.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  import path from 'path';
2
- import { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
2
+ import type { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
3
3
  import { AppAPI } from '@modern-js/codesmith-api-app';
4
+ import {
5
+ DependenceGenerator,
6
+ i18n as commonI18n,
7
+ } from '@modern-js/generator-common';
4
8
  import {
5
9
  fs,
6
10
  chalk,
7
- getModernConfigFile,
8
11
  getGeneratorPath,
12
+ getModernConfigFile,
9
13
  } from '@modern-js/generator-utils';
10
- import {
11
- DependenceGenerator,
12
- i18n as commonI18n,
13
- } from '@modern-js/generator-common';
14
14
  import { i18n, localeKeys } from './locale';
15
15
 
16
16
  const ReactRouter6Type = `/// <reference types='@modern-js/runtime/types/router' />`;
@@ -64,7 +64,6 @@ export default async (context: GeneratorContext, generator: GeneratorCore) => {
64
64
  i18n.changeLanguage(locale);
65
65
 
66
66
  if (!(await appApi.checkEnvironment())) {
67
- // eslint-disable-next-line no-process-exit
68
67
  process.exit(1);
69
68
  }
70
69