@modern-js/repo-generator 3.1.38 → 3.2.0
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.
- package/dist/index.js +82 -61
- package/package.json +11 -11
package/dist/index.js
CHANGED
@@ -107823,7 +107823,7 @@ var require_js_yaml2 = __commonJS({
|
|
107823
107823
|
var require_debug3 = __commonJS({
|
107824
107824
|
"../../../toolkit/utils/dist/compiled/debug/index.js"(exports, module2) {
|
107825
107825
|
(() => {
|
107826
|
-
var e = {
|
107826
|
+
var e = { 434: (e2, t2, r2) => {
|
107827
107827
|
t2.formatArgs = formatArgs;
|
107828
107828
|
t2.save = save;
|
107829
107829
|
t2.load = load;
|
@@ -107897,7 +107897,7 @@ var require_debug3 = __commonJS({
|
|
107897
107897
|
} catch (e3) {
|
107898
107898
|
}
|
107899
107899
|
}
|
107900
|
-
e2.exports = r2(
|
107900
|
+
e2.exports = r2(290)(t2);
|
107901
107901
|
const { formatters: s } = e2.exports;
|
107902
107902
|
s.j = function(e3) {
|
107903
107903
|
try {
|
@@ -107906,7 +107906,7 @@ var require_debug3 = __commonJS({
|
|
107906
107906
|
return "[UnexpectedJSONParseError]: " + e4.message;
|
107907
107907
|
}
|
107908
107908
|
};
|
107909
|
-
},
|
107909
|
+
}, 290: (e2, t2, r2) => {
|
107910
107910
|
function setup(e3) {
|
107911
107911
|
createDebug.debug = createDebug;
|
107912
107912
|
createDebug.default = createDebug;
|
@@ -108056,13 +108056,13 @@ var require_debug3 = __commonJS({
|
|
108056
108056
|
return createDebug;
|
108057
108057
|
}
|
108058
108058
|
e2.exports = setup;
|
108059
|
-
},
|
108059
|
+
}, 372: (e2, t2, r2) => {
|
108060
108060
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
108061
|
-
e2.exports = r2(
|
108061
|
+
e2.exports = r2(434);
|
108062
108062
|
} else {
|
108063
|
-
e2.exports = r2(
|
108063
|
+
e2.exports = r2(970);
|
108064
108064
|
}
|
108065
|
-
},
|
108065
|
+
}, 970: (e2, t2, r2) => {
|
108066
108066
|
const s = r2(224);
|
108067
108067
|
const n = r2(837);
|
108068
108068
|
t2.init = init;
|
@@ -108075,7 +108075,7 @@ var require_debug3 = __commonJS({
|
|
108075
108075
|
}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
108076
108076
|
t2.colors = [6, 2, 3, 4, 5, 1];
|
108077
108077
|
try {
|
108078
|
-
const e3 = r2(
|
108078
|
+
const e3 = r2(332);
|
108079
108079
|
if (e3 && (e3.stderr || e3).level >= 2) {
|
108080
108080
|
t2.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
|
108081
108081
|
}
|
@@ -108137,7 +108137,7 @@ var require_debug3 = __commonJS({
|
|
108137
108137
|
e3.inspectOpts[r3[s2]] = t2.inspectOpts[r3[s2]];
|
108138
108138
|
}
|
108139
108139
|
}
|
108140
|
-
e2.exports = r2(
|
108140
|
+
e2.exports = r2(290)(t2);
|
108141
108141
|
const { formatters: o } = e2.exports;
|
108142
108142
|
o.o = function(e3) {
|
108143
108143
|
this.inspectOpts.colors = this.useColors;
|
@@ -108147,13 +108147,14 @@ var require_debug3 = __commonJS({
|
|
108147
108147
|
this.inspectOpts.colors = this.useColors;
|
108148
108148
|
return n.inspect(e3, this.inspectOpts);
|
108149
108149
|
};
|
108150
|
-
},
|
108150
|
+
}, 419: (e2) => {
|
108151
108151
|
"use strict";
|
108152
|
-
e2.exports = (e3, t2
|
108152
|
+
e2.exports = (e3, t2) => {
|
108153
|
+
t2 = t2 || process.argv;
|
108153
108154
|
const r2 = e3.startsWith("-") ? "" : e3.length === 1 ? "-" : "--";
|
108154
108155
|
const s = t2.indexOf(r2 + e3);
|
108155
108156
|
const n = t2.indexOf("--");
|
108156
|
-
return s !== -1 && (n === -1
|
108157
|
+
return s !== -1 && (n === -1 ? true : s < n);
|
108157
108158
|
};
|
108158
108159
|
}, 367: (e2) => {
|
108159
108160
|
var t2 = 1e3;
|
@@ -108262,26 +108263,19 @@ var require_debug3 = __commonJS({
|
|
108262
108263
|
var n2 = t3 >= r3 * 1.5;
|
108263
108264
|
return Math.round(e3 / r3) + " " + s2 + (n2 ? "s" : "");
|
108264
108265
|
}
|
108265
|
-
},
|
108266
|
+
}, 332: (e2, t2, r2) => {
|
108266
108267
|
"use strict";
|
108267
108268
|
const s = r2(37);
|
108268
|
-
const n = r2(
|
108269
|
-
const o =
|
108270
|
-
|
108271
|
-
|
108272
|
-
|
108273
|
-
|
108274
|
-
|
108275
|
-
c = 1;
|
108269
|
+
const n = r2(419);
|
108270
|
+
const o = process.env;
|
108271
|
+
let a;
|
108272
|
+
if (n("no-color") || n("no-colors") || n("color=false")) {
|
108273
|
+
a = false;
|
108274
|
+
} else if (n("color") || n("colors") || n("color=true") || n("color=always")) {
|
108275
|
+
a = true;
|
108276
108276
|
}
|
108277
|
-
if ("FORCE_COLOR" in
|
108278
|
-
|
108279
|
-
c = 1;
|
108280
|
-
} else if (a.FORCE_COLOR === "false") {
|
108281
|
-
c = 0;
|
108282
|
-
} else {
|
108283
|
-
c = a.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(a.FORCE_COLOR, 10), 3);
|
108284
|
-
}
|
108277
|
+
if ("FORCE_COLOR" in o) {
|
108278
|
+
a = o.FORCE_COLOR.length === 0 || parseInt(o.FORCE_COLOR, 10) !== 0;
|
108285
108279
|
}
|
108286
108280
|
function translateLevel(e3) {
|
108287
108281
|
if (e3 === 0) {
|
@@ -108289,67 +108283,67 @@ var require_debug3 = __commonJS({
|
|
108289
108283
|
}
|
108290
108284
|
return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
|
108291
108285
|
}
|
108292
|
-
function supportsColor(e3
|
108293
|
-
if (
|
108286
|
+
function supportsColor(e3) {
|
108287
|
+
if (a === false) {
|
108294
108288
|
return 0;
|
108295
108289
|
}
|
108296
|
-
if (
|
108290
|
+
if (n("color=16m") || n("color=full") || n("color=truecolor")) {
|
108297
108291
|
return 3;
|
108298
108292
|
}
|
108299
|
-
if (
|
108293
|
+
if (n("color=256")) {
|
108300
108294
|
return 2;
|
108301
108295
|
}
|
108302
|
-
if (e3 && !
|
108296
|
+
if (e3 && !e3.isTTY && a !== true) {
|
108303
108297
|
return 0;
|
108304
108298
|
}
|
108305
|
-
const
|
108306
|
-
if (a.TERM === "dumb") {
|
108307
|
-
return r3;
|
108308
|
-
}
|
108299
|
+
const t3 = a ? 1 : 0;
|
108309
108300
|
if (process.platform === "win32") {
|
108310
108301
|
const e4 = s.release().split(".");
|
108311
|
-
if (Number(e4[0]) >= 10 && Number(e4[2]) >= 10586) {
|
108302
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(e4[0]) >= 10 && Number(e4[2]) >= 10586) {
|
108312
108303
|
return Number(e4[2]) >= 14931 ? 3 : 2;
|
108313
108304
|
}
|
108314
108305
|
return 1;
|
108315
108306
|
}
|
108316
|
-
if ("CI" in
|
108317
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"
|
108307
|
+
if ("CI" in o) {
|
108308
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((e4) => e4 in o) || o.CI_NAME === "codeship") {
|
108318
108309
|
return 1;
|
108319
108310
|
}
|
108320
|
-
return
|
108311
|
+
return t3;
|
108321
108312
|
}
|
108322
|
-
if ("TEAMCITY_VERSION" in
|
108323
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(
|
108313
|
+
if ("TEAMCITY_VERSION" in o) {
|
108314
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION) ? 1 : 0;
|
108324
108315
|
}
|
108325
|
-
if (
|
108316
|
+
if (o.COLORTERM === "truecolor") {
|
108326
108317
|
return 3;
|
108327
108318
|
}
|
108328
|
-
if ("TERM_PROGRAM" in
|
108329
|
-
const e4 = parseInt((
|
108330
|
-
switch (
|
108319
|
+
if ("TERM_PROGRAM" in o) {
|
108320
|
+
const e4 = parseInt((o.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
108321
|
+
switch (o.TERM_PROGRAM) {
|
108331
108322
|
case "iTerm.app":
|
108332
108323
|
return e4 >= 3 ? 3 : 2;
|
108333
108324
|
case "Apple_Terminal":
|
108334
108325
|
return 2;
|
108335
108326
|
}
|
108336
108327
|
}
|
108337
|
-
if (/-256(color)?$/i.test(
|
108328
|
+
if (/-256(color)?$/i.test(o.TERM)) {
|
108338
108329
|
return 2;
|
108339
108330
|
}
|
108340
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(
|
108331
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)) {
|
108341
108332
|
return 1;
|
108342
108333
|
}
|
108343
|
-
if ("COLORTERM" in
|
108334
|
+
if ("COLORTERM" in o) {
|
108344
108335
|
return 1;
|
108345
108336
|
}
|
108346
|
-
|
108337
|
+
if (o.TERM === "dumb") {
|
108338
|
+
return t3;
|
108339
|
+
}
|
108340
|
+
return t3;
|
108347
108341
|
}
|
108348
108342
|
function getSupportLevel(e3) {
|
108349
|
-
const t3 = supportsColor(e3
|
108343
|
+
const t3 = supportsColor(e3);
|
108350
108344
|
return translateLevel(t3);
|
108351
108345
|
}
|
108352
|
-
e2.exports = { supportsColor: getSupportLevel, stdout:
|
108346
|
+
e2.exports = { supportsColor: getSupportLevel, stdout: getSupportLevel(process.stdout), stderr: getSupportLevel(process.stderr) };
|
108353
108347
|
}, 37: (e2) => {
|
108354
108348
|
"use strict";
|
108355
108349
|
e2.exports = require("os");
|
@@ -108379,7 +108373,7 @@ var require_debug3 = __commonJS({
|
|
108379
108373
|
}
|
108380
108374
|
if (typeof __nccwpck_require__ !== "undefined")
|
108381
108375
|
__nccwpck_require__.ab = __dirname + "/";
|
108382
|
-
var r = __nccwpck_require__(
|
108376
|
+
var r = __nccwpck_require__(372);
|
108383
108377
|
module2.exports = r;
|
108384
108378
|
})();
|
108385
108379
|
}
|
@@ -126217,6 +126211,27 @@ var require_watch2 = __commonJS({
|
|
126217
126211
|
}
|
126218
126212
|
});
|
126219
126213
|
|
126214
|
+
// ../../../toolkit/utils/dist/cjs/cli/config.js
|
126215
|
+
var require_config6 = __commonJS({
|
126216
|
+
"../../../toolkit/utils/dist/cjs/cli/config.js"(exports) {
|
126217
|
+
"use strict";
|
126218
|
+
Object.defineProperty(exports, "__esModule", {
|
126219
|
+
value: true
|
126220
|
+
});
|
126221
|
+
Object.defineProperty(exports, "isOverriddenConfigKey", {
|
126222
|
+
enumerable: true,
|
126223
|
+
get: function() {
|
126224
|
+
return isOverriddenConfigKey;
|
126225
|
+
}
|
126226
|
+
});
|
126227
|
+
var isOverriddenConfigKey = (key) => [
|
126228
|
+
"removeConsole",
|
126229
|
+
"enableInlineScripts",
|
126230
|
+
"enableInlineStyles"
|
126231
|
+
].includes(key);
|
126232
|
+
}
|
126233
|
+
});
|
126234
|
+
|
126220
126235
|
// ../../../toolkit/utils/dist/cjs/cli/index.js
|
126221
126236
|
var require_cli2 = __commonJS({
|
126222
126237
|
"../../../toolkit/utils/dist/cjs/cli/index.js"(exports) {
|
@@ -126244,6 +126259,7 @@ var require_cli2 = __commonJS({
|
|
126244
126259
|
_export_star._(require_require2(), exports);
|
126245
126260
|
_export_star._(require_runtimeExports2(), exports);
|
126246
126261
|
_export_star._(require_watch2(), exports);
|
126262
|
+
_export_star._(require_config6(), exports);
|
126247
126263
|
}
|
126248
126264
|
});
|
126249
126265
|
|
@@ -148463,7 +148479,7 @@ async function usePluginNameExport(solution, options) {
|
|
148463
148479
|
// ../../new-action/dist/esm/mwa.js
|
148464
148480
|
var import_lodash10 = __toESM(require_lodash2());
|
148465
148481
|
var MWANewAction = async (options) => {
|
148466
|
-
const { locale = "zh", distTag = "", debug = false, registry: registry2 = "", config = "{}", cwd = process.cwd() } = options;
|
148482
|
+
const { locale = "zh", distTag = "", debug = false, registry: registry2 = "", config = "{}", cwd = process.cwd(), needInstall = true } = options;
|
148467
148483
|
let UserConfig = {};
|
148468
148484
|
try {
|
148469
148485
|
UserConfig = JSON.parse(config);
|
@@ -148521,7 +148537,9 @@ var MWANewAction = async (options) => {
|
|
148521
148537
|
distTag,
|
148522
148538
|
cwd
|
148523
148539
|
});
|
148524
|
-
const finalConfig = (0, import_lodash10.merge)(UserConfig,
|
148540
|
+
const finalConfig = (0, import_lodash10.merge)(UserConfig, {
|
148541
|
+
noNeedInstall: !needInstall
|
148542
|
+
}, ans, {
|
148525
148543
|
locale: UserConfig.locale || locale,
|
148526
148544
|
packageManager: UserConfig.packageManager || await (0, import_utils27.getPackageManager)(cwd),
|
148527
148545
|
distTag
|
@@ -148555,7 +148573,7 @@ var MWANewAction = async (options) => {
|
|
148555
148573
|
// ../../new-action/dist/esm/module.js
|
148556
148574
|
var import_lodash11 = __toESM(require_lodash2());
|
148557
148575
|
var ModuleNewAction = async (options) => {
|
148558
|
-
const { locale = "zh", distTag = "", debug = false, registry: registry2 = "", config = "{}", cwd = process.cwd() } = options;
|
148576
|
+
const { locale = "zh", distTag = "", debug = false, registry: registry2 = "", config = "{}", cwd = process.cwd(), needInstall = true } = options;
|
148559
148577
|
let UserConfig = {};
|
148560
148578
|
try {
|
148561
148579
|
UserConfig = JSON.parse(config);
|
@@ -148616,7 +148634,9 @@ var ModuleNewAction = async (options) => {
|
|
148616
148634
|
distTag,
|
148617
148635
|
cwd
|
148618
148636
|
});
|
148619
|
-
const finalConfig = (0, import_lodash11.merge)(UserConfig,
|
148637
|
+
const finalConfig = (0, import_lodash11.merge)(UserConfig, {
|
148638
|
+
noNeedInstall: !needInstall
|
148639
|
+
}, ans, {
|
148620
148640
|
locale: UserConfig.locale || locale,
|
148621
148641
|
packageManager: UserConfig.packageManager || await (0, import_utils27.getPackageManager)(cwd),
|
148622
148642
|
distTag
|
@@ -148654,7 +148674,7 @@ var import_path15 = __toESM(require("path"));
|
|
148654
148674
|
var import_lodash12 = __toESM(require_lodash2());
|
148655
148675
|
var REPO_GENERATOR = "@modern-js/repo-generator";
|
148656
148676
|
var MonorepoNewAction = async (options) => {
|
148657
|
-
const { locale = "zh", distTag = "", debug = false, registry: registry2 = "", config = "{}", plugin = [], cwd = process.cwd() } = options;
|
148677
|
+
const { locale = "zh", distTag = "", debug = false, registry: registry2 = "", config = "{}", plugin = [], cwd = process.cwd(), needInstall = true } = options;
|
148658
148678
|
let UserConfig = {};
|
148659
148679
|
try {
|
148660
148680
|
UserConfig = JSON.parse(config);
|
@@ -148687,7 +148707,8 @@ var MonorepoNewAction = async (options) => {
|
|
148687
148707
|
packageManager: UserConfig.packageManager || await (0, import_utils27.getPackageManager)(cwd),
|
148688
148708
|
isMonorepo: true,
|
148689
148709
|
distTag,
|
148690
|
-
plugins
|
148710
|
+
plugins,
|
148711
|
+
noNeedInstall: !needInstall
|
148691
148712
|
});
|
148692
148713
|
let generator = REPO_GENERATOR;
|
148693
148714
|
if (process.env.CODESMITH_ENV === "development") {
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "3.
|
18
|
+
"version": "3.2.0",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"main": "./dist/index.js",
|
21
21
|
"files": [
|
@@ -29,16 +29,16 @@
|
|
29
29
|
"@types/node": "^14",
|
30
30
|
"jest": "^29",
|
31
31
|
"typescript": "^5",
|
32
|
-
"@modern-js/generator-
|
33
|
-
"@modern-js/module-generator": "3.
|
34
|
-
"@modern-js/monorepo-generator": "3.
|
35
|
-
"@modern-js/mwa-generator": "3.
|
36
|
-
"@modern-js/utils": "2.
|
37
|
-
"@modern-js/generator-
|
38
|
-
"@modern-js/
|
39
|
-
"@modern-js/generator
|
40
|
-
"@scripts/jest-config": "2.
|
41
|
-
"@scripts/build": "2.
|
32
|
+
"@modern-js/generator-plugin": "3.2.0",
|
33
|
+
"@modern-js/module-generator": "3.2.0",
|
34
|
+
"@modern-js/monorepo-generator": "3.2.0",
|
35
|
+
"@modern-js/mwa-generator": "3.2.0",
|
36
|
+
"@modern-js/utils": "2.34.0",
|
37
|
+
"@modern-js/generator-common": "3.2.0",
|
38
|
+
"@modern-js/generator-utils": "3.2.0",
|
39
|
+
"@modern-js/base-generator": "3.2.0",
|
40
|
+
"@scripts/jest-config": "2.34.0",
|
41
|
+
"@scripts/build": "2.34.0"
|
42
42
|
},
|
43
43
|
"sideEffects": false,
|
44
44
|
"publishConfig": {
|