@modern-js/repo-generator 0.0.0-next-1687764171352 → 0.0.0-next-1687766264699

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 -2
  2. package/package.json +12 -12
package/dist/index.js CHANGED
@@ -124099,6 +124099,9 @@ var require_path = __commonJS({
124099
124099
  },
124100
124100
  removeSlash: function() {
124101
124101
  return removeSlash;
124102
+ },
124103
+ cutNameByHyphen: function() {
124104
+ return cutNameByHyphen;
124102
124105
  }
124103
124106
  });
124104
124107
  var _interop_require_default = require_interop_require_default();
@@ -124148,6 +124151,9 @@ var require_path = __commonJS({
124148
124151
  var removeLeadingSlash = (s) => s.replace(/^\/+/, "");
124149
124152
  var removeTailSlash = (s) => s.replace(/\/+$/, "");
124150
124153
  var removeSlash = (s) => removeLeadingSlash(removeTailSlash(s));
124154
+ var cutNameByHyphen = (s) => {
124155
+ return s.split(/[-_]/)[0];
124156
+ };
124151
124157
  }
124152
124158
  });
124153
124159
 
@@ -147159,6 +147165,15 @@ function getGeneratorPath(generator, distTag) {
147159
147165
  }
147160
147166
  return generator;
147161
147167
  }
147168
+ function usePluginNameExport(solution, options) {
147169
+ return __async(this, null, function* () {
147170
+ const solutionVersion = yield getModernPluginVersion(solution, SolutionToolsMap[Solution.MWA], options);
147171
+ if (import_utils30.semver.valid(solutionVersion) && import_utils30.semver.gte(solutionVersion, "2.0.0")) {
147172
+ return import_utils30.semver.gt(solutionVersion, "2.24.0");
147173
+ }
147174
+ return true;
147175
+ });
147176
+ }
147162
147177
 
147163
147178
  // ../../new-action/dist/esm/mwa.js
147164
147179
  var import_lodash11 = __toESM(require_lodash2());
@@ -147215,6 +147230,11 @@ var MWANewAction = (options) => __async(void 0, null, function* () {
147215
147230
  };
147216
147231
  const devDependency = MWAActionFunctionsDevDependencies[action2];
147217
147232
  const dependency = MWAActionFunctionsDependencies[action2] || MWAActionRefactorDependencies[action2];
147233
+ const shouldUsePluginNameExport = yield usePluginNameExport(Solution.MWA, {
147234
+ registry: registry2,
147235
+ distTag,
147236
+ cwd
147237
+ });
147218
147238
  const finalConfig = (0, import_lodash11.merge)(UserConfig, ans, {
147219
147239
  locale: UserConfig.locale || locale,
147220
147240
  packageManager: UserConfig.packageManager || (yield (0, import_utils27.getPackageManager)(cwd)),
@@ -147228,7 +147248,8 @@ var MWANewAction = (options) => __async(void 0, null, function* () {
147228
147248
  } : {},
147229
147249
  appendTypeContent: MWAActionFunctionsAppendTypeContent[action2] || MWAActionReactorAppendTypeContent[action2],
147230
147250
  pluginName: MWANewActionPluginName[actionType][action2],
147231
- pluginDependence: MWANewActionPluginDependence[actionType][action2]
147251
+ pluginDependence: MWANewActionPluginDependence[actionType][action2],
147252
+ shouldUsePluginNameExport
147232
147253
  });
147233
147254
  const task = [
147234
147255
  {
@@ -147303,6 +147324,11 @@ var ModuleNewAction = (options) => __async(void 0, null, function* () {
147303
147324
  cwd
147304
147325
  });
147305
147326
  };
147327
+ const shouldUsePluginNameExport = yield usePluginNameExport(Solution.Module, {
147328
+ registry: registry2,
147329
+ distTag,
147330
+ cwd
147331
+ });
147306
147332
  const finalConfig = (0, import_lodash12.merge)(UserConfig, ans, {
147307
147333
  locale: UserConfig.locale || locale,
147308
147334
  packageManager: UserConfig.packageManager || (yield (0, import_utils27.getPackageManager)(cwd)),
@@ -147318,7 +147344,8 @@ var ModuleNewAction = (options) => __async(void 0, null, function* () {
147318
147344
  [peerDependency]: `${yield getModulePluginVersion(peerDependency)}`
147319
147345
  } : {},
147320
147346
  pluginName: ModuleNewActionPluginName[actionType][action2],
147321
- pluginDependence: ModuleNewActionPluginDependence[actionType][action2]
147347
+ pluginDependence: ModuleNewActionPluginDependence[actionType][action2],
147348
+ shouldUsePluginNameExport
147322
147349
  });
147323
147350
  const task = [
147324
147351
  {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-next-1687764171352",
18
+ "version": "0.0.0-next-1687766264699",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -29,17 +29,17 @@
29
29
  "@types/node": "^14",
30
30
  "jest": "^29",
31
31
  "typescript": "^5",
32
- "@modern-js/base-generator": "0.0.0-next-1687764171352",
33
- "@modern-js/generator-common": "0.0.0-next-1687764171352",
34
- "@modern-js/generator-plugin": "0.0.0-next-1687764171352",
35
- "@modern-js/generator-utils": "0.0.0-next-1687764171352",
36
- "@modern-js/module-generator": "0.0.0-next-1687764171352",
37
- "@modern-js/monorepo-generator": "0.0.0-next-1687764171352",
38
- "@modern-js/mwa-generator": "0.0.0-next-1687764171352",
39
- "@modern-js/doc-generator": "0.0.0-next-1687764171352",
40
- "@scripts/build": "0.0.0-next-1687764171352",
41
- "@modern-js/utils": "0.0.0-next-1687764171352",
42
- "@scripts/jest-config": "0.0.0-next-1687764171352"
32
+ "@modern-js/base-generator": "0.0.0-next-1687766264699",
33
+ "@modern-js/generator-common": "0.0.0-next-1687766264699",
34
+ "@modern-js/generator-plugin": "0.0.0-next-1687766264699",
35
+ "@modern-js/generator-utils": "0.0.0-next-1687766264699",
36
+ "@modern-js/module-generator": "0.0.0-next-1687766264699",
37
+ "@modern-js/monorepo-generator": "0.0.0-next-1687766264699",
38
+ "@modern-js/mwa-generator": "0.0.0-next-1687766264699",
39
+ "@modern-js/doc-generator": "0.0.0-next-1687766264699",
40
+ "@scripts/build": "0.0.0-next-1687766264699",
41
+ "@scripts/jest-config": "0.0.0-next-1687766264699",
42
+ "@modern-js/utils": "0.0.0-next-1687766264699"
43
43
  },
44
44
  "sideEffects": false,
45
45
  "publishConfig": {