@modern-js/monorepo-generator 3.0.11 → 3.1.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 +146 -1
- package/package.json +11 -11
package/dist/index.js
CHANGED
@@ -136168,7 +136168,7 @@ var require_format2 = __commonJS({
|
|
136168
136168
|
if (typeof stats === "object") {
|
136169
136169
|
const fileName = stats.moduleName ? `File: ${stats.moduleName}
|
136170
136170
|
` : "";
|
136171
|
-
const mainMessage = stats.message;
|
136171
|
+
const mainMessage = typeof stats.formatted === "string" ? stats.formatted : stats.message;
|
136172
136172
|
const details = stats.details ? `
|
136173
136173
|
Details: ${stats.details}
|
136174
136174
|
` : "";
|
@@ -139529,6 +139529,143 @@ var require_getTargetDir = __commonJS({
|
|
139529
139529
|
}
|
139530
139530
|
});
|
139531
139531
|
|
139532
|
+
// ../../../toolkit/utils/dist/babel.js
|
139533
|
+
var require_babel = __commonJS({
|
139534
|
+
"../../../toolkit/utils/dist/babel.js"(exports, module2) {
|
139535
|
+
var __defProp2 = Object.defineProperty;
|
139536
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
139537
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
139538
|
+
var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
|
139539
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
139540
|
+
var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
|
139541
|
+
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
139542
|
+
var __spreadValues2 = (a, b) => {
|
139543
|
+
for (var prop in b || (b = {}))
|
139544
|
+
if (__hasOwnProp2.call(b, prop))
|
139545
|
+
__defNormalProp2(a, prop, b[prop]);
|
139546
|
+
if (__getOwnPropSymbols2)
|
139547
|
+
for (var prop of __getOwnPropSymbols2(b)) {
|
139548
|
+
if (__propIsEnum2.call(b, prop))
|
139549
|
+
__defNormalProp2(a, prop, b[prop]);
|
139550
|
+
}
|
139551
|
+
return a;
|
139552
|
+
};
|
139553
|
+
var __export2 = (target, all) => {
|
139554
|
+
for (var name in all)
|
139555
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
139556
|
+
};
|
139557
|
+
var __copyProps2 = (to, from, except, desc) => {
|
139558
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
139559
|
+
for (let key of __getOwnPropNames2(from))
|
139560
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
139561
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
139562
|
+
}
|
139563
|
+
return to;
|
139564
|
+
};
|
139565
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
139566
|
+
var babel_exports = {};
|
139567
|
+
__export2(babel_exports, {
|
139568
|
+
applyUserBabelConfig: () => applyUserBabelConfig,
|
139569
|
+
getBabelUtils: () => getBabelUtils
|
139570
|
+
});
|
139571
|
+
module2.exports = __toCommonJS2(babel_exports);
|
139572
|
+
var import_path4 = require("path");
|
139573
|
+
var import_applyOptionsChain = require_applyOptionsChain2();
|
139574
|
+
var import_ensureArray = require_ensureArray2();
|
139575
|
+
var import_path22 = require_path2();
|
139576
|
+
var formatPath = (originPath) => {
|
139577
|
+
if ((0, import_path4.isAbsolute)(originPath)) {
|
139578
|
+
return originPath.split(import_path4.sep).join("/");
|
139579
|
+
}
|
139580
|
+
return originPath;
|
139581
|
+
};
|
139582
|
+
var getPluginItemName = (item) => {
|
139583
|
+
if (typeof item === "string") {
|
139584
|
+
return formatPath(item);
|
139585
|
+
}
|
139586
|
+
if (Array.isArray(item) && typeof item[0] === "string") {
|
139587
|
+
return formatPath(item[0]);
|
139588
|
+
}
|
139589
|
+
return null;
|
139590
|
+
};
|
139591
|
+
var addPlugins = (plugins, config) => {
|
139592
|
+
if (config.plugins) {
|
139593
|
+
config.plugins.push(...plugins);
|
139594
|
+
} else {
|
139595
|
+
config.plugins = plugins;
|
139596
|
+
}
|
139597
|
+
};
|
139598
|
+
var addPresets = (presets, config) => {
|
139599
|
+
if (config.presets) {
|
139600
|
+
config.presets.push(...presets);
|
139601
|
+
} else {
|
139602
|
+
config.presets = presets;
|
139603
|
+
}
|
139604
|
+
};
|
139605
|
+
var removePlugins = (plugins, config) => {
|
139606
|
+
if (!config.plugins) {
|
139607
|
+
return;
|
139608
|
+
}
|
139609
|
+
const removeList = (0, import_ensureArray.ensureArray)(plugins);
|
139610
|
+
config.plugins = config.plugins.filter((item) => {
|
139611
|
+
const name = getPluginItemName(item);
|
139612
|
+
if (name) {
|
139613
|
+
return !removeList.find((removeItem) => name.includes(removeItem));
|
139614
|
+
}
|
139615
|
+
return true;
|
139616
|
+
});
|
139617
|
+
};
|
139618
|
+
var removePresets = (presets, config) => {
|
139619
|
+
if (!config.presets) {
|
139620
|
+
return;
|
139621
|
+
}
|
139622
|
+
const removeList = (0, import_ensureArray.ensureArray)(presets);
|
139623
|
+
config.presets = config.presets.filter((item) => {
|
139624
|
+
const name = getPluginItemName(item);
|
139625
|
+
if (name) {
|
139626
|
+
return !removeList.find((removeItem) => name.includes(removeItem));
|
139627
|
+
}
|
139628
|
+
return true;
|
139629
|
+
});
|
139630
|
+
};
|
139631
|
+
var modifyPresetOptions = (presetName, options, presets = []) => {
|
139632
|
+
presets.forEach((preset, index) => {
|
139633
|
+
if (Array.isArray(preset)) {
|
139634
|
+
if (typeof preset[0] === "string" && (0, import_path22.normalizeToPosixPath)(preset[0]).includes(presetName)) {
|
139635
|
+
preset[1] = __spreadValues2(__spreadValues2({}, preset[1] || {}), options);
|
139636
|
+
}
|
139637
|
+
} else if (typeof preset === "string" && (0, import_path22.normalizeToPosixPath)(preset).includes(presetName)) {
|
139638
|
+
presets[index] = [preset, options];
|
139639
|
+
}
|
139640
|
+
});
|
139641
|
+
};
|
139642
|
+
var getBabelUtils = (config) => {
|
139643
|
+
const noop = () => {
|
139644
|
+
};
|
139645
|
+
return {
|
139646
|
+
addPlugins: (plugins) => addPlugins(plugins, config),
|
139647
|
+
addPresets: (presets) => addPresets(presets, config),
|
139648
|
+
removePlugins: (plugins) => removePlugins(plugins, config),
|
139649
|
+
removePresets: (presets) => removePresets(presets, config),
|
139650
|
+
// `addIncludes` and `addExcludes` are noop functions by default,
|
139651
|
+
// It can be overridden by `extraBabelUtils`.
|
139652
|
+
addIncludes: noop,
|
139653
|
+
addExcludes: noop,
|
139654
|
+
// Compat `presetEnvOptions` and `presetReactOptions` in Eden.
|
139655
|
+
modifyPresetEnvOptions: (options) => modifyPresetOptions("@babel/preset-env", options, config.presets || []),
|
139656
|
+
modifyPresetReactOptions: (options) => modifyPresetOptions("@babel/preset-react", options, config.presets || [])
|
139657
|
+
};
|
139658
|
+
};
|
139659
|
+
var applyUserBabelConfig = (defaultOptions, userBabelConfig, extraBabelUtils) => {
|
139660
|
+
if (userBabelConfig) {
|
139661
|
+
const babelUtils = __spreadValues2(__spreadValues2({}, getBabelUtils(defaultOptions)), extraBabelUtils);
|
139662
|
+
return (0, import_applyOptionsChain.applyOptionsChain)(defaultOptions, userBabelConfig || {}, babelUtils);
|
139663
|
+
}
|
139664
|
+
return defaultOptions;
|
139665
|
+
};
|
139666
|
+
}
|
139667
|
+
});
|
139668
|
+
|
139532
139669
|
// ../../../toolkit/utils/dist/index.js
|
139533
139670
|
var require_dist3 = __commonJS({
|
139534
139671
|
"../../../toolkit/utils/dist/index.js"(exports, module2) {
|
@@ -139592,6 +139729,7 @@ var require_dist3 = __commonJS({
|
|
139592
139729
|
__reExport(src_exports2, require_getCoreJsVersion(), module2.exports);
|
139593
139730
|
__reExport(src_exports2, require_react(), module2.exports);
|
139594
139731
|
__reExport(src_exports2, require_getTargetDir(), module2.exports);
|
139732
|
+
__reExport(src_exports2, require_babel(), module2.exports);
|
139595
139733
|
}
|
139596
139734
|
});
|
139597
139735
|
|
@@ -139682,6 +139820,7 @@ var ZH_LOCALE = {
|
|
139682
139820
|
self: "请选择你想创建的工程类型",
|
139683
139821
|
mwa: "Web 应用",
|
139684
139822
|
module: "Npm 模块",
|
139823
|
+
doc: "文档站",
|
139685
139824
|
monorepo: "Monorepo",
|
139686
139825
|
custom: "自定义",
|
139687
139826
|
default: "默认"
|
@@ -139778,6 +139917,7 @@ var EN_LOCALE = {
|
|
139778
139917
|
self: "Please select the solution you want to create",
|
139779
139918
|
mwa: "Web App",
|
139780
139919
|
module: "Npm Module",
|
139920
|
+
doc: "Doc Site",
|
139781
139921
|
monorepo: "Monorepo",
|
139782
139922
|
custom: "Custom Solution",
|
139783
139923
|
default: "Default"
|
@@ -139877,6 +140017,7 @@ var localeKeys = i18n.init("zh", { zh: ZH_LOCALE, en: EN_LOCALE });
|
|
139877
140017
|
var Solution = /* @__PURE__ */ ((Solution2) => {
|
139878
140018
|
Solution2["MWA"] = "mwa";
|
139879
140019
|
Solution2["Module"] = "module";
|
140020
|
+
Solution2["Doc"] = "doc";
|
139880
140021
|
Solution2["Monorepo"] = "monorepo";
|
139881
140022
|
return Solution2;
|
139882
140023
|
})(Solution || {});
|
@@ -139889,6 +140030,10 @@ var SolutionToolsMap = {
|
|
139889
140030
|
"module"
|
139890
140031
|
/* Module */
|
139891
140032
|
]: "@modern-js/module-tools",
|
140033
|
+
[
|
140034
|
+
"doc"
|
140035
|
+
/* Doc */
|
140036
|
+
]: "@modern-js/doc-tools",
|
139892
140037
|
[
|
139893
140038
|
"monorepo"
|
139894
140039
|
/* Monorepo */
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "3.0
|
14
|
+
"version": "3.1.0",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"main": "./dist/index.js",
|
17
17
|
"files": [
|
@@ -23,18 +23,18 @@
|
|
23
23
|
"@modern-js/codesmith": "2.0.5",
|
24
24
|
"@modern-js/codesmith-api-app": "2.0.5",
|
25
25
|
"@modern-js/codesmith-api-json": "2.0.5",
|
26
|
-
"@types/jest": "^
|
26
|
+
"@types/jest": "^29",
|
27
27
|
"@types/node": "^14",
|
28
|
-
"jest": "^
|
28
|
+
"jest": "^29",
|
29
29
|
"typescript": "^4",
|
30
|
-
"@modern-js/generator
|
31
|
-
"@modern-js/
|
32
|
-
"@modern-js/plugin-i18n": "2.
|
33
|
-
"@modern-js/packages-generator": "3.0
|
34
|
-
"@modern-js/generator
|
35
|
-
"@modern-js/
|
36
|
-
"@scripts/
|
37
|
-
"@scripts/
|
30
|
+
"@modern-js/base-generator": "3.1.0",
|
31
|
+
"@modern-js/generator-utils": "3.1.0",
|
32
|
+
"@modern-js/plugin-i18n": "2.10.0",
|
33
|
+
"@modern-js/packages-generator": "3.1.0",
|
34
|
+
"@modern-js/changeset-generator": "3.1.0",
|
35
|
+
"@modern-js/generator-common": "3.1.0",
|
36
|
+
"@scripts/build": "2.10.0",
|
37
|
+
"@scripts/jest-config": "2.10.0"
|
38
38
|
},
|
39
39
|
"sideEffects": false,
|
40
40
|
"publishConfig": {
|