@modern-js/ssg-generator 3.4.15 → 3.4.17

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