@modern-js/tailwindcss-generator 3.3.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/index.js +32 -26
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -14524,9 +14524,9 @@ var require_ejs = __commonJS({
14524
14524
  }
14525
14525
  });
14526
14526
 
14527
- // ../../../../node_modules/.pnpm/@modern-js+utils@2.37.2/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
14527
+ // ../../../../node_modules/.pnpm/@modern-js+utils@2.39.2/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
14528
14528
  var require_chalk = __commonJS({
14529
- "../../../../node_modules/.pnpm/@modern-js+utils@2.37.2/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
14529
+ "../../../../node_modules/.pnpm/@modern-js+utils@2.39.2/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
14530
14530
  "use strict";
14531
14531
  (() => {
14532
14532
  var e = { 44: (e2, t2, n2) => {
@@ -51066,12 +51066,12 @@ function _define_property(obj, key, value) {
51066
51066
  return obj;
51067
51067
  }
51068
51068
 
51069
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
51069
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
51070
51070
  var import_utils13 = require("@modern-js/utils");
51071
51071
  var import_lodash5 = require("@modern-js/utils/lodash");
51072
51072
  var import_comment_json = __toESM(require_src2());
51073
51073
 
51074
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
51074
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
51075
51075
  var import_utils = require("@modern-js/utils");
51076
51076
  async function canUseNvm() {
51077
51077
  try {
@@ -51121,7 +51121,7 @@ async function canUsePnpm() {
51121
51121
  }
51122
51122
  }
51123
51123
 
51124
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
51124
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
51125
51125
  var import_utils2 = require("@modern-js/utils");
51126
51126
  function execaWithStreamLog(command, args, options) {
51127
51127
  const promise = (0, import_utils2.execa)(command, args, {
@@ -51217,7 +51217,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
51217
51217
  throw new Error("please install pnpm first");
51218
51218
  }
51219
51219
 
51220
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.0/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
51220
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
51221
51221
  var NpmAPI = class {
51222
51222
  npmInstall({ cwd, registryUrl, ignoreScripts }) {
51223
51223
  return npmInstall({
@@ -51246,7 +51246,7 @@ var NpmAPI = class {
51246
51246
  }
51247
51247
  };
51248
51248
 
51249
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.0_@modern-js+codesmith@2.3.0/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
51249
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
51250
51250
  var import_utils4 = require("@modern-js/utils");
51251
51251
  async function canUseGit() {
51252
51252
  try {
@@ -51321,7 +51321,7 @@ async function gitCommit(cwd, commitMessage) {
51321
51321
  });
51322
51322
  }
51323
51323
 
51324
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.0_@modern-js+codesmith@2.3.0/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
51324
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
51325
51325
  var GitAPI = class {
51326
51326
  async isInGitRepo(cwd = this.generatorCore.outputPath) {
51327
51327
  const canUse = await canUseGit();
@@ -51373,12 +51373,12 @@ var GitAPI = class {
51373
51373
  }
51374
51374
  };
51375
51375
 
51376
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.0/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
51376
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
51377
51377
  var import_path = __toESM(require("path"));
51378
51378
  var import_utils6 = require("@modern-js/utils");
51379
51379
  var FS_RESOURCE = "_codesmith_core_fs_resource";
51380
51380
 
51381
- // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.0/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
51381
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
51382
51382
  var import_utils7 = require("@modern-js/utils");
51383
51383
  async function fsExists(path6) {
51384
51384
  try {
@@ -51389,7 +51389,7 @@ async function fsExists(path6) {
51389
51389
  }
51390
51390
  }
51391
51391
 
51392
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.0_@modern-js+codesmith@2.3.0/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
51392
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
51393
51393
  var import_handlebars = __toESM(require_lib());
51394
51394
  function renderString(template, fullData, registers) {
51395
51395
  const helpers = {
@@ -51403,7 +51403,7 @@ function renderString(template, fullData, registers) {
51403
51403
  return import_handlebars.default.compile(template)(fullData) || "";
51404
51404
  }
51405
51405
 
51406
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.0_@modern-js+codesmith@2.3.0/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
51406
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
51407
51407
  var HandlebarsAPI = class {
51408
51408
  async registerHelp(helpers) {
51409
51409
  this.registers.helpers = {
@@ -51453,13 +51453,13 @@ var HandlebarsAPI = class {
51453
51453
  }
51454
51454
  };
51455
51455
 
51456
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.0_@modern-js+codesmith@2.3.0/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
51456
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
51457
51457
  var import_ejs = __toESM(require_ejs());
51458
51458
  function renderString2(template, fullData) {
51459
51459
  return import_ejs.default.render(template, fullData) || "";
51460
51460
  }
51461
51461
 
51462
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.0_@modern-js+codesmith@2.3.0/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
51462
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
51463
51463
  var EjsAPI = class {
51464
51464
  async renderTemplate(templateResource, target, parameters = {}) {
51465
51465
  if (templateResource._type !== FS_RESOURCE) {
@@ -51492,7 +51492,7 @@ var EjsAPI = class {
51492
51492
  }
51493
51493
  };
51494
51494
 
51495
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.0_@modern-js+codesmith@2.3.0/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
51495
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
51496
51496
  var import_path2 = __toESM(require("path"));
51497
51497
  var import_utils10 = require("@modern-js/utils");
51498
51498
  var FsAPI = class {
@@ -61076,10 +61076,10 @@ var Schema = (
61076
61076
  }()
61077
61077
  );
61078
61078
 
61079
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61079
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61080
61080
  var import_inquirer = __toESM(require_inquirer());
61081
61081
 
61082
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
61082
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
61083
61083
  var import_lodash = require("@modern-js/utils/lodash");
61084
61084
  function validateSchema(schema) {
61085
61085
  const { type, properties } = schema;
@@ -61171,7 +61171,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
61171
61171
  return getQuestionFromSchema(schema, configValue, validateMap, initValue);
61172
61172
  }
61173
61173
 
61174
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61174
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
61175
61175
  var compileRule = (rule, scope) => {
61176
61176
  const state = Schema.compile(rule, {
61177
61177
  $self: {},
@@ -61275,7 +61275,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
61275
61275
  return answers;
61276
61276
  }
61277
61277
 
61278
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
61278
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
61279
61279
  var CLIReader = class {
61280
61280
  getAnswers() {
61281
61281
  return this.answers;
@@ -61306,7 +61306,7 @@ var CLIReader = class {
61306
61306
  }
61307
61307
  };
61308
61308
 
61309
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61309
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61310
61310
  var import_inquirer2 = __toESM(require_inquirer2());
61311
61311
 
61312
61312
  // ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
@@ -61372,7 +61372,7 @@ var I18n = class {
61372
61372
  }
61373
61373
  };
61374
61374
 
61375
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
61375
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
61376
61376
  var ZH_LOCALE = {
61377
61377
  environment: {
61378
61378
  node_version: "请升级 Node 版本至 LIS",
@@ -61399,7 +61399,7 @@ var ZH_LOCALE = {
61399
61399
  }
61400
61400
  };
61401
61401
 
61402
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
61402
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
61403
61403
  var EN_LOCALE = {
61404
61404
  environment: {
61405
61405
  node_version: "please upgrade node to lts version",
@@ -61426,14 +61426,14 @@ var EN_LOCALE = {
61426
61426
  }
61427
61427
  };
61428
61428
 
61429
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
61429
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
61430
61430
  var i18n = new I18n();
61431
61431
  var localeKeys = i18n.init("zh", {
61432
61432
  zh: ZH_LOCALE,
61433
61433
  en: EN_LOCALE
61434
61434
  });
61435
61435
 
61436
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
61436
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
61437
61437
  var import_lodash4 = require("@modern-js/utils/lodash");
61438
61438
  function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
61439
61439
  for (const question of questions) {
@@ -61461,7 +61461,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
61461
61461
  return questions;
61462
61462
  }
61463
61463
 
61464
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
61464
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
61465
61465
  var import_path4 = __toESM(require("path"));
61466
61466
  var import_utils12 = require("@modern-js/utils");
61467
61467
  var NODE_MAJOR_VERSION_MAP = {
@@ -61509,7 +61509,7 @@ async function checkUseNvm(cwd, logger) {
61509
61509
  }
61510
61510
  }
61511
61511
 
61512
- // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.0_@modern-js+codesmith@2.3.0_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61512
+ // ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
61513
61513
  var AppAPI = class {
61514
61514
  async checkEnvironment(nodeVersion) {
61515
61515
  if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
@@ -61598,6 +61598,7 @@ var AppAPI = class {
61598
61598
  }
61599
61599
  async forgeTemplate(templatePattern, filter, rename, parameters, type = "handlebars") {
61600
61600
  try {
61601
+ this.generatorCore.logger.timing(`forgeTemplate`);
61601
61602
  const { material } = this.generatorContext.current;
61602
61603
  const resourceMap = await material.find(templatePattern, {
61603
61604
  nodir: true,
@@ -61618,10 +61619,13 @@ var AppAPI = class {
61618
61619
  this.generatorCore.logger.debug("base forging failed:", e);
61619
61620
  this.generatorCore.logger.warn(i18n.t(localeKeys.templated.failed));
61620
61621
  throw new Error("base forging failed");
61622
+ } finally {
61623
+ this.generatorCore.logger.timing(`forgeTemplate`, true);
61621
61624
  }
61622
61625
  }
61623
61626
  async renderTemplateByFileType(templatePattern, filter, rename, parameters) {
61624
61627
  try {
61628
+ this.generatorCore.logger.timing(`renderTemplateByFileType`);
61625
61629
  const { material } = this.generatorContext.current;
61626
61630
  const resourceMap = await material.find(templatePattern, {
61627
61631
  nodir: true,
@@ -61652,6 +61656,8 @@ var AppAPI = class {
61652
61656
  this.generatorCore.logger.debug("base forging failed:", e);
61653
61657
  this.generatorCore.logger.warn(i18n.t(localeKeys.templated.failed));
61654
61658
  throw new Error("base forging failed");
61659
+ } finally {
61660
+ this.generatorCore.logger.timing(`renderTemplateByFileType`, true);
61655
61661
  }
61656
61662
  }
61657
61663
  async updateWorkspace(folder, workspaceName = "monorepo.code-workspace") {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.3.0",
18
+ "version": "3.3.1",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -23,20 +23,20 @@
23
23
  "/dist/index.js"
24
24
  ],
25
25
  "dependencies": {
26
- "@modern-js/utils": "2.41.0"
26
+ "@modern-js/utils": "2.42.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@modern-js/codesmith": "2.3.0",
30
- "@modern-js/codesmith-api-app": "2.3.0",
29
+ "@modern-js/codesmith": "2.3.1",
30
+ "@modern-js/codesmith-api-app": "2.3.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.3.0",
36
- "@modern-js/dependence-generator": "3.3.0",
37
- "@scripts/build": "2.41.0",
38
- "@scripts/jest-config": "2.41.0",
39
- "@modern-js/generator-utils": "3.3.0"
35
+ "@modern-js/generator-utils": "3.3.1",
36
+ "@scripts/build": "2.42.0",
37
+ "@modern-js/generator-common": "3.3.1",
38
+ "@modern-js/dependence-generator": "3.3.1",
39
+ "@scripts/jest-config": "2.42.0"
40
40
  },
41
41
  "sideEffects": false,
42
42
  "publishConfig": {