@modern-js/repo-generator 0.0.0-canary-2021116121737 → 0.0.0-canary-2021118101453
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/js/node/main.js +791 -115
- package/package.json +7 -7
package/dist/js/node/main.js
CHANGED
|
@@ -101665,12 +101665,14 @@ const SolutionSchema = {
|
|
|
101665
101665
|
type: ['string'],
|
|
101666
101666
|
mutualExclusion: true,
|
|
101667
101667
|
items: (_data, extra) => {
|
|
101668
|
+
var _extra$customPlugin, _extra$customPlugin$c;
|
|
101669
|
+
|
|
101668
101670
|
const items = Object.values(Solution).map(solution => ({
|
|
101669
101671
|
key: solution,
|
|
101670
101672
|
label: SolutionText[solution]
|
|
101671
101673
|
}));
|
|
101672
101674
|
|
|
101673
|
-
if (extra !== null && extra !== void 0 && extra.customPlugin &&
|
|
101675
|
+
if (extra !== null && extra !== void 0 && (_extra$customPlugin = extra.customPlugin) !== null && _extra$customPlugin !== void 0 && (_extra$customPlugin$c = _extra$customPlugin.custom) !== null && _extra$customPlugin$c !== void 0 && _extra$customPlugin$c.length) {
|
|
101674
101676
|
return [...items, {
|
|
101675
101677
|
key: 'custom',
|
|
101676
101678
|
label: _locale.i18n.t(_locale.localeKeys.solution.custom)
|
|
@@ -101703,6 +101705,19 @@ const SolutionSchema = {
|
|
|
101703
101705
|
}]
|
|
101704
101706
|
};
|
|
101705
101707
|
exports.SolutionSchema = SolutionSchema;
|
|
101708
|
+
|
|
101709
|
+
function getSolutionNameFromSubSolution(solution) {
|
|
101710
|
+
if (solution === SubSolution.MWATest) {
|
|
101711
|
+
return Solution.MWA;
|
|
101712
|
+
}
|
|
101713
|
+
|
|
101714
|
+
if (solution === SubSolution.InnerModule) {
|
|
101715
|
+
return Solution.Module;
|
|
101716
|
+
}
|
|
101717
|
+
|
|
101718
|
+
return solution;
|
|
101719
|
+
}
|
|
101720
|
+
|
|
101706
101721
|
const SubSolutionSchema = {
|
|
101707
101722
|
key: 'sub_solution_schema',
|
|
101708
101723
|
isObject: true,
|
|
@@ -101711,10 +101726,45 @@ const SubSolutionSchema = {
|
|
|
101711
101726
|
label: () => _locale.i18n.t(_locale.localeKeys.sub_solution.self),
|
|
101712
101727
|
type: ['string'],
|
|
101713
101728
|
mutualExclusion: true,
|
|
101714
|
-
items:
|
|
101715
|
-
|
|
101716
|
-
|
|
101717
|
-
|
|
101729
|
+
items: (_data, extra) => {
|
|
101730
|
+
var _extra$customPlugin2, _extra$customPlugin2$;
|
|
101731
|
+
|
|
101732
|
+
const items = Object.values(SubSolution).map(solution => ({
|
|
101733
|
+
key: solution,
|
|
101734
|
+
label: SubSolutionText[solution]
|
|
101735
|
+
}));
|
|
101736
|
+
|
|
101737
|
+
if (extra !== null && extra !== void 0 && (_extra$customPlugin2 = extra.customPlugin) !== null && _extra$customPlugin2 !== void 0 && (_extra$customPlugin2$ = _extra$customPlugin2.custom) !== null && _extra$customPlugin2$ !== void 0 && _extra$customPlugin2$.length) {
|
|
101738
|
+
return [...items, {
|
|
101739
|
+
key: 'custom',
|
|
101740
|
+
label: _locale.i18n.t(_locale.localeKeys.solution.custom)
|
|
101741
|
+
}];
|
|
101742
|
+
}
|
|
101743
|
+
|
|
101744
|
+
return items;
|
|
101745
|
+
}
|
|
101746
|
+
}, {
|
|
101747
|
+
key: 'scenes',
|
|
101748
|
+
label: () => _locale.i18n.t(_locale.localeKeys.scenes.self),
|
|
101749
|
+
type: ['string'],
|
|
101750
|
+
mutualExclusion: true,
|
|
101751
|
+
when: (data, extra) => (extra === null || extra === void 0 ? void 0 : extra.customPlugin) && extra.customPlugin[getSolutionNameFromSubSolution(data.solution)] && extra.customPlugin[getSolutionNameFromSubSolution(data.solution)].length > 0,
|
|
101752
|
+
items: (data, extra) => {
|
|
101753
|
+
const solution = getSolutionNameFromSubSolution(data.solution);
|
|
101754
|
+
const items = (extra !== null && extra !== void 0 && extra.customPlugin ? (extra === null || extra === void 0 ? void 0 : extra.customPlugin[solution]) || [] : []).map(plugin => ({
|
|
101755
|
+
key: plugin.key,
|
|
101756
|
+
label: plugin.name
|
|
101757
|
+
}));
|
|
101758
|
+
|
|
101759
|
+
if (data.solution && data.solution !== 'custom') {
|
|
101760
|
+
items.push({
|
|
101761
|
+
key: data.solution,
|
|
101762
|
+
label: SolutionText[data.solution]
|
|
101763
|
+
});
|
|
101764
|
+
}
|
|
101765
|
+
|
|
101766
|
+
return items;
|
|
101767
|
+
}
|
|
101718
101768
|
}]
|
|
101719
101769
|
};
|
|
101720
101770
|
exports.SubSolutionSchema = SubSolutionSchema;
|
|
@@ -103273,7 +103323,7 @@ exports.MWANewActionGenerators = MWANewActionGenerators;
|
|
|
103273
103323
|
|
|
103274
103324
|
/***/ }),
|
|
103275
103325
|
|
|
103276
|
-
/***/
|
|
103326
|
+
/***/ 40156:
|
|
103277
103327
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
103278
103328
|
|
|
103279
103329
|
"use strict";
|
|
@@ -103740,12 +103790,14 @@ const SolutionSchema = {
|
|
|
103740
103790
|
type: ['string'],
|
|
103741
103791
|
mutualExclusion: true,
|
|
103742
103792
|
items: (_data, extra) => {
|
|
103793
|
+
var _extra$customPlugin, _extra$customPlugin$c;
|
|
103794
|
+
|
|
103743
103795
|
const items = Object.values(Solution).map(solution => ({
|
|
103744
103796
|
key: solution,
|
|
103745
103797
|
label: SolutionText[solution]
|
|
103746
103798
|
}));
|
|
103747
103799
|
|
|
103748
|
-
if (extra !== null && extra !== void 0 && extra.customPlugin &&
|
|
103800
|
+
if (extra !== null && extra !== void 0 && (_extra$customPlugin = extra.customPlugin) !== null && _extra$customPlugin !== void 0 && (_extra$customPlugin$c = _extra$customPlugin.custom) !== null && _extra$customPlugin$c !== void 0 && _extra$customPlugin$c.length) {
|
|
103749
103801
|
return [...items, {
|
|
103750
103802
|
key: 'custom',
|
|
103751
103803
|
label: locale_i18n.t(locale_localeKeys.solution.custom)
|
|
@@ -103777,6 +103829,19 @@ const SolutionSchema = {
|
|
|
103777
103829
|
}
|
|
103778
103830
|
}]
|
|
103779
103831
|
};
|
|
103832
|
+
|
|
103833
|
+
function getSolutionNameFromSubSolution(solution) {
|
|
103834
|
+
if (solution === SubSolution.MWATest) {
|
|
103835
|
+
return Solution.MWA;
|
|
103836
|
+
}
|
|
103837
|
+
|
|
103838
|
+
if (solution === SubSolution.InnerModule) {
|
|
103839
|
+
return Solution.Module;
|
|
103840
|
+
}
|
|
103841
|
+
|
|
103842
|
+
return solution;
|
|
103843
|
+
}
|
|
103844
|
+
|
|
103780
103845
|
const SubSolutionSchema = {
|
|
103781
103846
|
key: 'sub_solution_schema',
|
|
103782
103847
|
isObject: true,
|
|
@@ -103785,10 +103850,45 @@ const SubSolutionSchema = {
|
|
|
103785
103850
|
label: () => locale_i18n.t(locale_localeKeys.sub_solution.self),
|
|
103786
103851
|
type: ['string'],
|
|
103787
103852
|
mutualExclusion: true,
|
|
103788
|
-
items:
|
|
103789
|
-
|
|
103790
|
-
|
|
103791
|
-
|
|
103853
|
+
items: (_data, extra) => {
|
|
103854
|
+
var _extra$customPlugin2, _extra$customPlugin2$;
|
|
103855
|
+
|
|
103856
|
+
const items = Object.values(SubSolution).map(solution => ({
|
|
103857
|
+
key: solution,
|
|
103858
|
+
label: SubSolutionText[solution]
|
|
103859
|
+
}));
|
|
103860
|
+
|
|
103861
|
+
if (extra !== null && extra !== void 0 && (_extra$customPlugin2 = extra.customPlugin) !== null && _extra$customPlugin2 !== void 0 && (_extra$customPlugin2$ = _extra$customPlugin2.custom) !== null && _extra$customPlugin2$ !== void 0 && _extra$customPlugin2$.length) {
|
|
103862
|
+
return [...items, {
|
|
103863
|
+
key: 'custom',
|
|
103864
|
+
label: locale_i18n.t(locale_localeKeys.solution.custom)
|
|
103865
|
+
}];
|
|
103866
|
+
}
|
|
103867
|
+
|
|
103868
|
+
return items;
|
|
103869
|
+
}
|
|
103870
|
+
}, {
|
|
103871
|
+
key: 'scenes',
|
|
103872
|
+
label: () => locale_i18n.t(locale_localeKeys.scenes.self),
|
|
103873
|
+
type: ['string'],
|
|
103874
|
+
mutualExclusion: true,
|
|
103875
|
+
when: (data, extra) => (extra === null || extra === void 0 ? void 0 : extra.customPlugin) && extra.customPlugin[getSolutionNameFromSubSolution(data.solution)] && extra.customPlugin[getSolutionNameFromSubSolution(data.solution)].length > 0,
|
|
103876
|
+
items: (data, extra) => {
|
|
103877
|
+
const solution = getSolutionNameFromSubSolution(data.solution);
|
|
103878
|
+
const items = (extra !== null && extra !== void 0 && extra.customPlugin ? (extra === null || extra === void 0 ? void 0 : extra.customPlugin[solution]) || [] : []).map(plugin => ({
|
|
103879
|
+
key: plugin.key,
|
|
103880
|
+
label: plugin.name
|
|
103881
|
+
}));
|
|
103882
|
+
|
|
103883
|
+
if (data.solution && data.solution !== 'custom') {
|
|
103884
|
+
items.push({
|
|
103885
|
+
key: data.solution,
|
|
103886
|
+
label: SolutionText[data.solution]
|
|
103887
|
+
});
|
|
103888
|
+
}
|
|
103889
|
+
|
|
103890
|
+
return items;
|
|
103891
|
+
}
|
|
103792
103892
|
}]
|
|
103793
103893
|
};
|
|
103794
103894
|
const BaseGenerator = '@modern-js/base-generator';
|
|
@@ -104746,32 +104846,61 @@ var PluginFileAPI = /*#__PURE__*/function () {
|
|
|
104746
104846
|
return updateJSONFile;
|
|
104747
104847
|
}()
|
|
104748
104848
|
}, {
|
|
104749
|
-
key: "
|
|
104849
|
+
key: "updateModernConfig",
|
|
104750
104850
|
value: function () {
|
|
104751
|
-
var
|
|
104752
|
-
var
|
|
104851
|
+
var _updateModernConfig = file_asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee4(updateInfo) {
|
|
104852
|
+
var update;
|
|
104753
104853
|
return regenerator_default().wrap(function _callee4$(_context4) {
|
|
104754
104854
|
while (1) {
|
|
104755
104855
|
switch (_context4.prev = _context4.next) {
|
|
104756
104856
|
case 0:
|
|
104757
|
-
|
|
104857
|
+
update = Object.keys(updateInfo).map(function (key) {
|
|
104858
|
+
return context_file_defineProperty({}, "modernConfig.".concat(key), updateInfo[key]);
|
|
104859
|
+
});
|
|
104860
|
+
_context4.next = 3;
|
|
104861
|
+
return this.updateJSONFile('package.json', update);
|
|
104862
|
+
|
|
104863
|
+
case 3:
|
|
104864
|
+
case "end":
|
|
104865
|
+
return _context4.stop();
|
|
104866
|
+
}
|
|
104867
|
+
}
|
|
104868
|
+
}, _callee4, this);
|
|
104869
|
+
}));
|
|
104870
|
+
|
|
104871
|
+
function updateModernConfig(_x5) {
|
|
104872
|
+
return _updateModernConfig.apply(this, arguments);
|
|
104873
|
+
}
|
|
104874
|
+
|
|
104875
|
+
return updateModernConfig;
|
|
104876
|
+
}()
|
|
104877
|
+
}, {
|
|
104878
|
+
key: "updateTextRawFile",
|
|
104879
|
+
value: function () {
|
|
104880
|
+
var _updateTextRawFile = file_asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee5(fileName, update) {
|
|
104881
|
+
var content, newContent;
|
|
104882
|
+
return regenerator_default().wrap(function _callee5$(_context5) {
|
|
104883
|
+
while (1) {
|
|
104884
|
+
switch (_context5.prev = _context5.next) {
|
|
104885
|
+
case 0:
|
|
104886
|
+
_context5.next = 2;
|
|
104758
104887
|
return lib.readFile(external_path_default().join(this.projectPath, fileName), 'utf-8');
|
|
104759
104888
|
|
|
104760
104889
|
case 2:
|
|
104761
|
-
content =
|
|
104890
|
+
content = _context5.sent;
|
|
104762
104891
|
newContent = update(content.split('\n'));
|
|
104763
|
-
|
|
104892
|
+
_context5.next = 6;
|
|
104764
104893
|
return lib.writeFile(external_path_default().join(this.projectPath, fileName), newContent.join('\n'), 'utf-8');
|
|
104765
104894
|
|
|
104766
104895
|
case 6:
|
|
104767
104896
|
case "end":
|
|
104768
|
-
return
|
|
104897
|
+
return _context5.stop();
|
|
104769
104898
|
}
|
|
104770
104899
|
}
|
|
104771
|
-
},
|
|
104900
|
+
}, _callee5, this);
|
|
104772
104901
|
}));
|
|
104773
104902
|
|
|
104774
|
-
function updateTextRawFile(
|
|
104903
|
+
function updateTextRawFile(_x6, _x7) {
|
|
104775
104904
|
return _updateTextRawFile.apply(this, arguments);
|
|
104776
104905
|
}
|
|
104777
104906
|
|
|
@@ -104780,34 +104909,34 @@ var PluginFileAPI = /*#__PURE__*/function () {
|
|
|
104780
104909
|
}, {
|
|
104781
104910
|
key: "rmFile",
|
|
104782
104911
|
value: function () {
|
|
104783
|
-
var _rmFile = file_asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function
|
|
104912
|
+
var _rmFile = file_asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee6(fileName) {
|
|
104784
104913
|
var file;
|
|
104785
|
-
return regenerator_default().wrap(function
|
|
104914
|
+
return regenerator_default().wrap(function _callee6$(_context6) {
|
|
104786
104915
|
while (1) {
|
|
104787
|
-
switch (
|
|
104916
|
+
switch (_context6.prev = _context6.next) {
|
|
104788
104917
|
case 0:
|
|
104789
104918
|
file = external_path_default().join(this.projectPath, fileName);
|
|
104790
|
-
|
|
104919
|
+
_context6.next = 3;
|
|
104791
104920
|
return fileExists(file);
|
|
104792
104921
|
|
|
104793
104922
|
case 3:
|
|
104794
|
-
if (!
|
|
104795
|
-
|
|
104923
|
+
if (!_context6.sent) {
|
|
104924
|
+
_context6.next = 6;
|
|
104796
104925
|
break;
|
|
104797
104926
|
}
|
|
104798
104927
|
|
|
104799
|
-
|
|
104928
|
+
_context6.next = 6;
|
|
104800
104929
|
return lib.rm(file);
|
|
104801
104930
|
|
|
104802
104931
|
case 6:
|
|
104803
104932
|
case "end":
|
|
104804
|
-
return
|
|
104933
|
+
return _context6.stop();
|
|
104805
104934
|
}
|
|
104806
104935
|
}
|
|
104807
|
-
},
|
|
104936
|
+
}, _callee6, this);
|
|
104808
104937
|
}));
|
|
104809
104938
|
|
|
104810
|
-
function rmFile(
|
|
104939
|
+
function rmFile(_x8) {
|
|
104811
104940
|
return _rmFile.apply(this, arguments);
|
|
104812
104941
|
}
|
|
104813
104942
|
|
|
@@ -104816,47 +104945,47 @@ var PluginFileAPI = /*#__PURE__*/function () {
|
|
|
104816
104945
|
}, {
|
|
104817
104946
|
key: "rmDir",
|
|
104818
104947
|
value: function () {
|
|
104819
|
-
var _rmDir = file_asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function
|
|
104948
|
+
var _rmDir = file_asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee7(dirName) {
|
|
104820
104949
|
var dir, stat;
|
|
104821
|
-
return regenerator_default().wrap(function
|
|
104950
|
+
return regenerator_default().wrap(function _callee7$(_context7) {
|
|
104822
104951
|
while (1) {
|
|
104823
|
-
switch (
|
|
104952
|
+
switch (_context7.prev = _context7.next) {
|
|
104824
104953
|
case 0:
|
|
104825
104954
|
dir = external_path_default().join(this.projectPath, dirName);
|
|
104826
|
-
|
|
104827
|
-
|
|
104955
|
+
_context7.prev = 1;
|
|
104956
|
+
_context7.next = 4;
|
|
104828
104957
|
return lib.stat(dir);
|
|
104829
104958
|
|
|
104830
104959
|
case 4:
|
|
104831
|
-
stat =
|
|
104960
|
+
stat = _context7.sent;
|
|
104832
104961
|
|
|
104833
104962
|
if (!stat.isDirectory()) {
|
|
104834
|
-
|
|
104963
|
+
_context7.next = 8;
|
|
104835
104964
|
break;
|
|
104836
104965
|
}
|
|
104837
104966
|
|
|
104838
|
-
|
|
104967
|
+
_context7.next = 8;
|
|
104839
104968
|
return lib.rmdir(dir, {
|
|
104840
104969
|
recursive: true
|
|
104841
104970
|
});
|
|
104842
104971
|
|
|
104843
104972
|
case 8:
|
|
104844
|
-
|
|
104973
|
+
_context7.next = 12;
|
|
104845
104974
|
break;
|
|
104846
104975
|
|
|
104847
104976
|
case 10:
|
|
104848
|
-
|
|
104849
|
-
|
|
104977
|
+
_context7.prev = 10;
|
|
104978
|
+
_context7.t0 = _context7["catch"](1);
|
|
104850
104979
|
|
|
104851
104980
|
case 12:
|
|
104852
104981
|
case "end":
|
|
104853
|
-
return
|
|
104982
|
+
return _context7.stop();
|
|
104854
104983
|
}
|
|
104855
104984
|
}
|
|
104856
|
-
},
|
|
104985
|
+
}, _callee7, this, [[1, 10]]);
|
|
104857
104986
|
}));
|
|
104858
104987
|
|
|
104859
|
-
function rmDir(
|
|
104988
|
+
function rmDir(_x9) {
|
|
104860
104989
|
return _rmDir.apply(this, arguments);
|
|
104861
104990
|
}
|
|
104862
104991
|
|
|
@@ -104865,22 +104994,22 @@ var PluginFileAPI = /*#__PURE__*/function () {
|
|
|
104865
104994
|
}, {
|
|
104866
104995
|
key: "isFileExit",
|
|
104867
104996
|
value: function () {
|
|
104868
|
-
var _isFileExit = file_asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function
|
|
104869
|
-
return regenerator_default().wrap(function
|
|
104997
|
+
var _isFileExit = file_asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee8(fileName) {
|
|
104998
|
+
return regenerator_default().wrap(function _callee8$(_context8) {
|
|
104870
104999
|
while (1) {
|
|
104871
|
-
switch (
|
|
105000
|
+
switch (_context8.prev = _context8.next) {
|
|
104872
105001
|
case 0:
|
|
104873
|
-
return
|
|
105002
|
+
return _context8.abrupt("return", fileExists(external_path_default().join(this.projectPath, fileName)));
|
|
104874
105003
|
|
|
104875
105004
|
case 1:
|
|
104876
105005
|
case "end":
|
|
104877
|
-
return
|
|
105006
|
+
return _context8.stop();
|
|
104878
105007
|
}
|
|
104879
105008
|
}
|
|
104880
|
-
},
|
|
105009
|
+
}, _callee8, this);
|
|
104881
105010
|
}));
|
|
104882
105011
|
|
|
104883
|
-
function isFileExit(
|
|
105012
|
+
function isFileExit(_x10) {
|
|
104884
105013
|
return _isFileExit.apply(this, arguments);
|
|
104885
105014
|
}
|
|
104886
105015
|
|
|
@@ -104889,22 +105018,22 @@ var PluginFileAPI = /*#__PURE__*/function () {
|
|
|
104889
105018
|
}, {
|
|
104890
105019
|
key: "readDir",
|
|
104891
105020
|
value: function () {
|
|
104892
|
-
var _readDir = file_asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function
|
|
104893
|
-
return regenerator_default().wrap(function
|
|
105021
|
+
var _readDir = file_asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee9(dir) {
|
|
105022
|
+
return regenerator_default().wrap(function _callee9$(_context9) {
|
|
104894
105023
|
while (1) {
|
|
104895
|
-
switch (
|
|
105024
|
+
switch (_context9.prev = _context9.next) {
|
|
104896
105025
|
case 0:
|
|
104897
|
-
return
|
|
105026
|
+
return _context9.abrupt("return", lib.readdir(external_path_default().join(this.projectPath, dir)));
|
|
104898
105027
|
|
|
104899
105028
|
case 1:
|
|
104900
105029
|
case "end":
|
|
104901
|
-
return
|
|
105030
|
+
return _context9.stop();
|
|
104902
105031
|
}
|
|
104903
105032
|
}
|
|
104904
|
-
},
|
|
105033
|
+
}, _callee9, this);
|
|
104905
105034
|
}));
|
|
104906
105035
|
|
|
104907
|
-
function readDir(
|
|
105036
|
+
function readDir(_x11) {
|
|
104908
105037
|
return _readDir.apply(this, arguments);
|
|
104909
105038
|
}
|
|
104910
105039
|
|
|
@@ -109206,7 +109335,420 @@ class AppAPI {
|
|
|
109206
109335
|
}
|
|
109207
109336
|
|
|
109208
109337
|
}
|
|
109209
|
-
;// CONCATENATED MODULE:
|
|
109338
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.1.3/node_modules/@modern-js/generator-common/dist/js/modern/locale/zh.js
|
|
109339
|
+
const locale_zh_ZH_LOCALE = {
|
|
109340
|
+
solution: {
|
|
109341
|
+
self: '请选择你想创建的工程类型',
|
|
109342
|
+
mwa: '应用',
|
|
109343
|
+
module: '模块',
|
|
109344
|
+
monorepo: '项目组'
|
|
109345
|
+
},
|
|
109346
|
+
sub_solution: {
|
|
109347
|
+
self: '请选择你想创建的工程类型',
|
|
109348
|
+
mwa: '应用',
|
|
109349
|
+
mwa_test: '应用(测试)',
|
|
109350
|
+
module: '模块',
|
|
109351
|
+
inner_module: '模块(内部)'
|
|
109352
|
+
},
|
|
109353
|
+
action: {
|
|
109354
|
+
self: '请选择你想要的操作',
|
|
109355
|
+
function: {
|
|
109356
|
+
self: '启用可选功能',
|
|
109357
|
+
unbundle: '启用「Unbundled 开发」模式',
|
|
109358
|
+
tailwindcss: '启用 Tailwind CSS 支持',
|
|
109359
|
+
less: '启用 Less 支持',
|
|
109360
|
+
sass: '启用 Sass 支持',
|
|
109361
|
+
bff: '启用「BFF」功能',
|
|
109362
|
+
micro_frontend: '启用「微前端」模式',
|
|
109363
|
+
electron: '启用「Electron」模式',
|
|
109364
|
+
i18n: '启用「国际化(i18n)」功能',
|
|
109365
|
+
test: '启用「单元测试 / 集成测试」功能',
|
|
109366
|
+
e2e_test: '启用「E2E 测试」功能',
|
|
109367
|
+
doc: '启用「文档站」功能',
|
|
109368
|
+
storybook: '启用「Storybook」',
|
|
109369
|
+
runtime_api: '启用「Rumtime API」',
|
|
109370
|
+
mwa_storybook: '启用「Visual Testing (Storybook)」模式',
|
|
109371
|
+
ssg: '启用「SSG」功能',
|
|
109372
|
+
deploy: '启用「部署」功能'
|
|
109373
|
+
},
|
|
109374
|
+
element: {
|
|
109375
|
+
self: '创建工程元素',
|
|
109376
|
+
entry: '新建「应用入口」',
|
|
109377
|
+
server: '新建「Server 自定义」源码目录'
|
|
109378
|
+
},
|
|
109379
|
+
refactor: {
|
|
109380
|
+
self: '自动重构',
|
|
109381
|
+
bff_to_app: 'BFF 切换框架模式'
|
|
109382
|
+
}
|
|
109383
|
+
},
|
|
109384
|
+
boolean: {
|
|
109385
|
+
yes: '是',
|
|
109386
|
+
no: '否'
|
|
109387
|
+
},
|
|
109388
|
+
language: {
|
|
109389
|
+
self: '请选择开发语言'
|
|
109390
|
+
},
|
|
109391
|
+
packageManager: {
|
|
109392
|
+
self: '请选择包管理工具'
|
|
109393
|
+
},
|
|
109394
|
+
runWay: {
|
|
109395
|
+
self: '是否需要支持以下类型应用',
|
|
109396
|
+
no: '不需要',
|
|
109397
|
+
electron: 'Electron'
|
|
109398
|
+
},
|
|
109399
|
+
needModifyConfig: {
|
|
109400
|
+
self: '是否需要调整默认配置?',
|
|
109401
|
+
enableLess: '是否启用 Less 支持?',
|
|
109402
|
+
enableSass: '是否启用 Sass 支持?'
|
|
109403
|
+
},
|
|
109404
|
+
entry: {
|
|
109405
|
+
name: '请填写入口名称',
|
|
109406
|
+
no_empty: '入口名称不能为空!',
|
|
109407
|
+
no_pages: '入口名称不支持 "pages"!',
|
|
109408
|
+
needModifyConfig: '是否需要调整默认配置?',
|
|
109409
|
+
disableStateManagement: '是否关闭「应用状态管理」功能?',
|
|
109410
|
+
clientRoute: {
|
|
109411
|
+
self: '请选择客户端路由方式',
|
|
109412
|
+
selfControlRoute: '启用自控路由',
|
|
109413
|
+
conventionalRoute: '启用约定式路由',
|
|
109414
|
+
no: '不启用'
|
|
109415
|
+
}
|
|
109416
|
+
},
|
|
109417
|
+
packageName: {
|
|
109418
|
+
self: '请填写项目名称',
|
|
109419
|
+
sub_name: '请填写子项目名称',
|
|
109420
|
+
no_empty: '项目名称不能为空!'
|
|
109421
|
+
},
|
|
109422
|
+
packagePath: {
|
|
109423
|
+
self: '请填写子项目目录名称',
|
|
109424
|
+
no_empty: '目录名称不能为空!',
|
|
109425
|
+
format: '目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)'
|
|
109426
|
+
},
|
|
109427
|
+
framework: {
|
|
109428
|
+
self: '请选择运行时框架',
|
|
109429
|
+
egg: 'Egg',
|
|
109430
|
+
express: 'Express',
|
|
109431
|
+
koa: 'Koa',
|
|
109432
|
+
nest: 'Nest'
|
|
109433
|
+
},
|
|
109434
|
+
bff: {
|
|
109435
|
+
bffType: {
|
|
109436
|
+
self: '请选择 BFF 类型',
|
|
109437
|
+
func: '函数模式',
|
|
109438
|
+
framework: '框架模式'
|
|
109439
|
+
}
|
|
109440
|
+
},
|
|
109441
|
+
deploy: {
|
|
109442
|
+
cloud: {
|
|
109443
|
+
self: '默认使用框架内置的产品级 Web 服务器,是否调整?'
|
|
109444
|
+
},
|
|
109445
|
+
cdn: {
|
|
109446
|
+
self: '请选择 CDN 平台',
|
|
109447
|
+
oss: '阿里云 OSS',
|
|
109448
|
+
cos: '腾讯云 COS',
|
|
109449
|
+
no: '不使用 CDN'
|
|
109450
|
+
},
|
|
109451
|
+
lambda: {
|
|
109452
|
+
self: '请选择云函数平台',
|
|
109453
|
+
fc: '阿里云 FC',
|
|
109454
|
+
scf: '腾讯云 SCF',
|
|
109455
|
+
no: '不使用云函数部署'
|
|
109456
|
+
}
|
|
109457
|
+
}
|
|
109458
|
+
};
|
|
109459
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.1.3/node_modules/@modern-js/generator-common/dist/js/modern/locale/en.js
|
|
109460
|
+
const locale_en_EN_LOCALE = {
|
|
109461
|
+
solution: {
|
|
109462
|
+
self: 'Please select the solution you want to create',
|
|
109463
|
+
mwa: 'MWA Solution',
|
|
109464
|
+
module: 'Module Solution',
|
|
109465
|
+
monorepo: 'Monorepo Solution'
|
|
109466
|
+
},
|
|
109467
|
+
sub_solution: {
|
|
109468
|
+
self: 'Please select the solution you want to create',
|
|
109469
|
+
mwa: 'MWA Solution',
|
|
109470
|
+
mwa_test: 'MWA Solution(Test)',
|
|
109471
|
+
module: 'Module Solution',
|
|
109472
|
+
inner_module: 'Module Solution(Inner)',
|
|
109473
|
+
monorepo: 'Monorepo Solution'
|
|
109474
|
+
},
|
|
109475
|
+
action: {
|
|
109476
|
+
self: 'Action',
|
|
109477
|
+
function: {
|
|
109478
|
+
self: 'Enable features',
|
|
109479
|
+
unbundle: 'Enable "Unbundled Development"',
|
|
109480
|
+
tailwindcss: 'Enable Tailwind CSS',
|
|
109481
|
+
less: 'Enable Less',
|
|
109482
|
+
sass: 'Enable Sass',
|
|
109483
|
+
bff: 'Enable "BFF"',
|
|
109484
|
+
micro_frontend: 'Enable "micro frontend"',
|
|
109485
|
+
electron: 'Enable "Electron"',
|
|
109486
|
+
i18n: 'Enable "Internationalization (i18n)"',
|
|
109487
|
+
test: 'Enable "Unit Test / Integration Test"',
|
|
109488
|
+
e2e_test: 'Enable "E2E Test"',
|
|
109489
|
+
doc: 'Enable "Document Station"',
|
|
109490
|
+
storybook: 'Enable "Storybook"',
|
|
109491
|
+
runtime_api: 'Enable "Runtime API"',
|
|
109492
|
+
mwa_storybook: 'Enable "Visual Testing (Storybook)"',
|
|
109493
|
+
ssg: 'Enable "SSG"',
|
|
109494
|
+
deploy: 'Enable "Deploy"'
|
|
109495
|
+
},
|
|
109496
|
+
element: {
|
|
109497
|
+
self: 'Create project element',
|
|
109498
|
+
entry: 'New "entry"',
|
|
109499
|
+
server: 'New "Server Custom" source code directory'
|
|
109500
|
+
},
|
|
109501
|
+
refactor: {
|
|
109502
|
+
self: 'Automatic refactor',
|
|
109503
|
+
bff_to_app: 'Transform BFF to frame mode'
|
|
109504
|
+
}
|
|
109505
|
+
},
|
|
109506
|
+
boolean: {
|
|
109507
|
+
yes: 'Yes',
|
|
109508
|
+
no: 'No'
|
|
109509
|
+
},
|
|
109510
|
+
language: {
|
|
109511
|
+
self: 'Development Language'
|
|
109512
|
+
},
|
|
109513
|
+
packageManager: {
|
|
109514
|
+
self: 'Package Management Tool'
|
|
109515
|
+
},
|
|
109516
|
+
packageName: {
|
|
109517
|
+
self: 'Package Name',
|
|
109518
|
+
sub_name: 'Package Name',
|
|
109519
|
+
no_empty: 'The package name cannot be empty!'
|
|
109520
|
+
},
|
|
109521
|
+
packagePath: {
|
|
109522
|
+
self: 'Package Path',
|
|
109523
|
+
no_empty: 'The package path cannot be empty!',
|
|
109524
|
+
format: 'Only lowercase letters, numbers and delimiters (-), and underscore(_), and directory delimiters (/) can be used in package path.'
|
|
109525
|
+
},
|
|
109526
|
+
runWay: {
|
|
109527
|
+
self: 'Do you need to support the following types of applications',
|
|
109528
|
+
no: 'Not Enabled',
|
|
109529
|
+
electron: 'Electron'
|
|
109530
|
+
},
|
|
109531
|
+
needModifyConfig: {
|
|
109532
|
+
self: 'Modify the Default Configuration?',
|
|
109533
|
+
enableLess: 'Enable Less?',
|
|
109534
|
+
enableSass: 'Enable Sass?'
|
|
109535
|
+
},
|
|
109536
|
+
entry: {
|
|
109537
|
+
name: 'Entry name',
|
|
109538
|
+
no_empty: 'The entry name cannot be empty!',
|
|
109539
|
+
no_pages: 'The entry name cannot be "pages"!',
|
|
109540
|
+
disableStateManagement: 'Disable App State Management?',
|
|
109541
|
+
clientRoute: {
|
|
109542
|
+
self: 'Client Routing',
|
|
109543
|
+
selfControlRoute: 'Enable Self Control Route',
|
|
109544
|
+
conventionalRoute: 'Enable Conventional Route',
|
|
109545
|
+
no: 'Not Enabled'
|
|
109546
|
+
}
|
|
109547
|
+
},
|
|
109548
|
+
framework: {
|
|
109549
|
+
self: 'Please select the framework you want to use',
|
|
109550
|
+
egg: 'Egg',
|
|
109551
|
+
express: 'Express',
|
|
109552
|
+
koa: 'Koa',
|
|
109553
|
+
nest: 'Nest'
|
|
109554
|
+
},
|
|
109555
|
+
bff: {
|
|
109556
|
+
bffType: {
|
|
109557
|
+
self: 'BFF Type',
|
|
109558
|
+
func: 'Function',
|
|
109559
|
+
framework: 'Framework'
|
|
109560
|
+
}
|
|
109561
|
+
},
|
|
109562
|
+
deploy: {
|
|
109563
|
+
cloud: {
|
|
109564
|
+
self: 'Modify the default Web Server?'
|
|
109565
|
+
},
|
|
109566
|
+
cdn: {
|
|
109567
|
+
self: 'Please select the cdn platform you want to use',
|
|
109568
|
+
oss: 'Aliyun OSS',
|
|
109569
|
+
cos: 'Tencent COS',
|
|
109570
|
+
no: 'Not Enabled'
|
|
109571
|
+
},
|
|
109572
|
+
lambda: {
|
|
109573
|
+
self: 'Please select the lambda you want to use',
|
|
109574
|
+
fc: 'Aliyun FC',
|
|
109575
|
+
scf: 'Tencent SCF',
|
|
109576
|
+
no: 'Not Enabled'
|
|
109577
|
+
}
|
|
109578
|
+
}
|
|
109579
|
+
};
|
|
109580
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.1.3/node_modules/@modern-js/generator-common/dist/js/modern/locale/index.js
|
|
109581
|
+
|
|
109582
|
+
|
|
109583
|
+
|
|
109584
|
+
const js_modern_locale_i18n = new modern_I18n();
|
|
109585
|
+
const js_modern_locale_localeKeys = js_modern_locale_i18n.init('zh', {
|
|
109586
|
+
zh: locale_zh_ZH_LOCALE,
|
|
109587
|
+
en: locale_en_EN_LOCALE
|
|
109588
|
+
});
|
|
109589
|
+
|
|
109590
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.1.3/node_modules/@modern-js/generator-common/dist/js/modern/newAction/common/index.js
|
|
109591
|
+
|
|
109592
|
+
let common_ActionType;
|
|
109593
|
+
|
|
109594
|
+
(function (ActionType) {
|
|
109595
|
+
ActionType["Function"] = "function";
|
|
109596
|
+
ActionType["Element"] = "element";
|
|
109597
|
+
ActionType["Refactor"] = "refactor";
|
|
109598
|
+
})(common_ActionType || (common_ActionType = {}));
|
|
109599
|
+
|
|
109600
|
+
let common_ActionElement;
|
|
109601
|
+
|
|
109602
|
+
(function (ActionElement) {
|
|
109603
|
+
ActionElement["Entry"] = "entry";
|
|
109604
|
+
ActionElement["Server"] = "server";
|
|
109605
|
+
})(common_ActionElement || (common_ActionElement = {}));
|
|
109606
|
+
|
|
109607
|
+
let common_ActionFunction;
|
|
109608
|
+
|
|
109609
|
+
(function (ActionFunction) {
|
|
109610
|
+
ActionFunction["UnBundle"] = "unbundle";
|
|
109611
|
+
ActionFunction["TailwindCSS"] = "tailwindcss";
|
|
109612
|
+
ActionFunction["Less"] = "less";
|
|
109613
|
+
ActionFunction["Sass"] = "sass";
|
|
109614
|
+
ActionFunction["BFF"] = "bff";
|
|
109615
|
+
ActionFunction["MicroFrontend"] = "micro_frontend";
|
|
109616
|
+
ActionFunction["Electron"] = "electron";
|
|
109617
|
+
ActionFunction["I18n"] = "i18n";
|
|
109618
|
+
ActionFunction["Test"] = "test";
|
|
109619
|
+
ActionFunction["E2ETest"] = "e2e_test";
|
|
109620
|
+
ActionFunction["Doc"] = "doc";
|
|
109621
|
+
ActionFunction["Storybook"] = "storybook";
|
|
109622
|
+
ActionFunction["RuntimeApi"] = "runtimeApi";
|
|
109623
|
+
ActionFunction["SSG"] = "ssg";
|
|
109624
|
+
ActionFunction["Deploy"] = "deploy";
|
|
109625
|
+
})(common_ActionFunction || (common_ActionFunction = {}));
|
|
109626
|
+
|
|
109627
|
+
let common_ActionRefactor;
|
|
109628
|
+
|
|
109629
|
+
(function (ActionRefactor) {
|
|
109630
|
+
ActionRefactor["BFFToApp"] = "bff_to_app";
|
|
109631
|
+
})(common_ActionRefactor || (common_ActionRefactor = {}));
|
|
109632
|
+
|
|
109633
|
+
const common_ActionTypeText = {
|
|
109634
|
+
[common_ActionType.Function]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].self),
|
|
109635
|
+
[common_ActionType.Element]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action.element.self),
|
|
109636
|
+
[common_ActionType.Refactor]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action.refactor.self)
|
|
109637
|
+
};
|
|
109638
|
+
const common_ActionElementText = {
|
|
109639
|
+
[common_ActionElement.Entry]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action.element.entry),
|
|
109640
|
+
[common_ActionElement.Server]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action.element.server)
|
|
109641
|
+
};
|
|
109642
|
+
const common_ActionFunctionText = {
|
|
109643
|
+
[common_ActionFunction.UnBundle]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].unbundle),
|
|
109644
|
+
[common_ActionFunction.TailwindCSS]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].tailwindcss),
|
|
109645
|
+
[common_ActionFunction.Less]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].less),
|
|
109646
|
+
[common_ActionFunction.Sass]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].sass),
|
|
109647
|
+
[common_ActionFunction.BFF]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].bff),
|
|
109648
|
+
[common_ActionFunction.MicroFrontend]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].micro_frontend),
|
|
109649
|
+
[common_ActionFunction.Electron]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].electron),
|
|
109650
|
+
[common_ActionFunction.I18n]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].i18n),
|
|
109651
|
+
[common_ActionFunction.Test]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].test),
|
|
109652
|
+
[common_ActionFunction.E2ETest]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].e2e_test),
|
|
109653
|
+
[common_ActionFunction.Doc]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].doc),
|
|
109654
|
+
[common_ActionFunction.Storybook]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].storybook),
|
|
109655
|
+
[common_ActionFunction.RuntimeApi]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].runtime_api),
|
|
109656
|
+
[common_ActionFunction.SSG]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].ssg),
|
|
109657
|
+
[common_ActionFunction.Deploy]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].deploy)
|
|
109658
|
+
};
|
|
109659
|
+
const common_ActionRefactorText = {
|
|
109660
|
+
[common_ActionRefactor.BFFToApp]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action.refactor.bff_to_app)
|
|
109661
|
+
};
|
|
109662
|
+
const common_ActionTypeTextMap = {
|
|
109663
|
+
[common_ActionType.Element]: common_ActionElementText,
|
|
109664
|
+
[common_ActionType.Function]: common_ActionFunctionText,
|
|
109665
|
+
[common_ActionType.Refactor]: common_ActionRefactorText
|
|
109666
|
+
};
|
|
109667
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.1.3/node_modules/@modern-js/generator-common/dist/js/modern/newAction/mwa/index.js
|
|
109668
|
+
|
|
109669
|
+
|
|
109670
|
+
const mwa_MWAActionTypes = [common_ActionType.Element, common_ActionType.Function // ActionType.Refactor,
|
|
109671
|
+
];
|
|
109672
|
+
const mwa_MWAActionFunctions = [common_ActionFunction.UnBundle, common_ActionFunction.TailwindCSS, common_ActionFunction.Less, common_ActionFunction.Sass, common_ActionFunction.BFF, common_ActionFunction.SSG, common_ActionFunction.MicroFrontend, common_ActionFunction.Electron, // ActionFunction.I18n,
|
|
109673
|
+
common_ActionFunction.Test, common_ActionFunction.Storybook, // ActionFunction.E2ETest,
|
|
109674
|
+
// ActionFunction.Doc,
|
|
109675
|
+
common_ActionFunction.Deploy];
|
|
109676
|
+
const mwa_MWAActionElements = [common_ActionElement.Entry, common_ActionElement.Server];
|
|
109677
|
+
const mwa_MWAActionReactors = [common_ActionRefactor.BFFToApp];
|
|
109678
|
+
const mwa_MWAActionTypesMap = {
|
|
109679
|
+
[common_ActionType.Element]: mwa_MWAActionElements,
|
|
109680
|
+
[common_ActionType.Function]: mwa_MWAActionFunctions,
|
|
109681
|
+
[common_ActionType.Refactor]: mwa_MWAActionReactors
|
|
109682
|
+
};
|
|
109683
|
+
const mwa_MWASpecialSchemaMap = {
|
|
109684
|
+
[common_ActionFunction.Storybook]: {
|
|
109685
|
+
key: common_ActionFunction.Storybook,
|
|
109686
|
+
label: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action["function"].mwa_storybook)
|
|
109687
|
+
}
|
|
109688
|
+
};
|
|
109689
|
+
const mwa_MWANewActionSchema = {
|
|
109690
|
+
key: 'mwa_new_action',
|
|
109691
|
+
isObject: true,
|
|
109692
|
+
items: [{
|
|
109693
|
+
key: 'actionType',
|
|
109694
|
+
label: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action.self),
|
|
109695
|
+
type: ['string'],
|
|
109696
|
+
mutualExclusion: true,
|
|
109697
|
+
items: mwa_MWAActionTypes.map(type => ({
|
|
109698
|
+
key: type,
|
|
109699
|
+
label: common_ActionTypeText[type],
|
|
109700
|
+
type: ['string'],
|
|
109701
|
+
mutualExclusion: true,
|
|
109702
|
+
items: mwa_MWAActionTypesMap[type].map(item => mwa_MWASpecialSchemaMap[item] || {
|
|
109703
|
+
key: item,
|
|
109704
|
+
label: common_ActionTypeTextMap[type][item]
|
|
109705
|
+
})
|
|
109706
|
+
}))
|
|
109707
|
+
}]
|
|
109708
|
+
};
|
|
109709
|
+
const mwa_MWAActionFunctionsDevDependencies = {
|
|
109710
|
+
[common_ActionFunction.UnBundle]: '@modern-js/plugin-unbundle',
|
|
109711
|
+
[common_ActionFunction.TailwindCSS]: '@modern-js/plugin-tailwindcss',
|
|
109712
|
+
[common_ActionFunction.Test]: '@modern-js/plugin-testing',
|
|
109713
|
+
[common_ActionFunction.E2ETest]: '@modern-js/plugin-e2e',
|
|
109714
|
+
[common_ActionFunction.Doc]: '@modern-js/plugin-docsite',
|
|
109715
|
+
[common_ActionFunction.Electron]: '@modern-js/plugin-electron',
|
|
109716
|
+
[common_ActionFunction.Storybook]: '@modern-js/plugin-storybook'
|
|
109717
|
+
};
|
|
109718
|
+
const mwa_MWAActionFunctionsDependencies = {
|
|
109719
|
+
[common_ActionFunction.Less]: '@modern-js/plugin-less',
|
|
109720
|
+
[common_ActionFunction.Sass]: '@modern-js/plugin-sass',
|
|
109721
|
+
[common_ActionFunction.BFF]: '@modern-js/plugin-bff',
|
|
109722
|
+
[common_ActionFunction.MicroFrontend]: '@modern-js/plugin-micro-frontend',
|
|
109723
|
+
[common_ActionFunction.I18n]: '@modern-js/plugin-i18n',
|
|
109724
|
+
[common_ActionFunction.SSG]: '@modern-js/plugin-ssg'
|
|
109725
|
+
};
|
|
109726
|
+
const mwa_MWANewActionGenerators = {
|
|
109727
|
+
[common_ActionType.Element]: {
|
|
109728
|
+
[common_ActionElement.Entry]: '@modern-js/entry-generator',
|
|
109729
|
+
[common_ActionElement.Server]: '@modern-js/server-generator'
|
|
109730
|
+
},
|
|
109731
|
+
[common_ActionType.Function]: {
|
|
109732
|
+
[common_ActionFunction.UnBundle]: '@modern-js/unbundle-generator',
|
|
109733
|
+
[common_ActionFunction.TailwindCSS]: '@modern-js/tailwindcss-generator',
|
|
109734
|
+
[common_ActionFunction.Less]: '@modern-js/dependence-generator',
|
|
109735
|
+
[common_ActionFunction.Sass]: '@modern-js/dependence-generator',
|
|
109736
|
+
[common_ActionFunction.BFF]: '@modern-js/bff-generator',
|
|
109737
|
+
[common_ActionFunction.MicroFrontend]: '@modern-js/dependence-generator',
|
|
109738
|
+
[common_ActionFunction.Electron]: '@modern-js/electron-generator',
|
|
109739
|
+
[common_ActionFunction.I18n]: '@modern-js/dependence-generator',
|
|
109740
|
+
[common_ActionFunction.Test]: '@modern-js/test-generator',
|
|
109741
|
+
[common_ActionFunction.E2ETest]: '@modern-js/dependence-generator',
|
|
109742
|
+
[common_ActionFunction.Doc]: '@modern-js/dependence-generator',
|
|
109743
|
+
[common_ActionFunction.Storybook]: '@modern-js/dependence-generator',
|
|
109744
|
+
[common_ActionFunction.SSG]: '@modern-js/ssg-generator',
|
|
109745
|
+
[common_ActionFunction.Deploy]: '@modern-js/cloud-deploy-generator'
|
|
109746
|
+
},
|
|
109747
|
+
[common_ActionType.Refactor]: {
|
|
109748
|
+
[common_ActionRefactor.BFFToApp]: '@modern-js/bff-refactor-generator'
|
|
109749
|
+
}
|
|
109750
|
+
};
|
|
109751
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-utils@1.1.1_typescript@4.5.2/node_modules/@modern-js/generator-utils/dist/js/modern/utils/env.js
|
|
109210
109752
|
|
|
109211
109753
|
async function env_canUseNpm() {
|
|
109212
109754
|
try {
|
|
@@ -109238,7 +109780,7 @@ async function env_canUsePnpm() {
|
|
|
109238
109780
|
return false;
|
|
109239
109781
|
}
|
|
109240
109782
|
}
|
|
109241
|
-
;// CONCATENATED MODULE:
|
|
109783
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-utils@1.1.1_typescript@4.5.2/node_modules/@modern-js/generator-utils/dist/js/modern/utils/strip-ansi.js
|
|
109242
109784
|
function ansiRegex({
|
|
109243
109785
|
onlyFirst = false
|
|
109244
109786
|
} = {}) {
|
|
@@ -109253,7 +109795,7 @@ function stripAnsi(string) {
|
|
|
109253
109795
|
|
|
109254
109796
|
return string.replace(ansiRegex(), '');
|
|
109255
109797
|
}
|
|
109256
|
-
;// CONCATENATED MODULE:
|
|
109798
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-utils@1.1.1_typescript@4.5.2/node_modules/@modern-js/generator-utils/dist/js/modern/index.js
|
|
109257
109799
|
|
|
109258
109800
|
|
|
109259
109801
|
|
|
@@ -110810,13 +111352,13 @@ var dist_lib = JSON5;
|
|
|
110810
111352
|
|
|
110811
111353
|
/* harmony default export */ const json5_dist = (dist_lib);
|
|
110812
111354
|
|
|
110813
|
-
;// CONCATENATED MODULE:
|
|
111355
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+new-action@1.1.4_typescript@4.5.2/node_modules/@modern-js/new-action/dist/js/modern/utils/index.js
|
|
110814
111356
|
|
|
110815
111357
|
|
|
110816
111358
|
|
|
110817
|
-
function alreadyRepo() {
|
|
111359
|
+
function alreadyRepo(cwd = process.cwd()) {
|
|
110818
111360
|
try {
|
|
110819
|
-
return lib.existsSync(external_path_default().resolve(
|
|
111361
|
+
return lib.existsSync(external_path_default().resolve(cwd, 'package.json'));
|
|
110820
111362
|
} catch (e) {
|
|
110821
111363
|
return false;
|
|
110822
111364
|
}
|
|
@@ -110859,7 +111401,7 @@ function hasEnabledFunction(action, dependencies, devDependencies, peerDependenc
|
|
|
110859
111401
|
|
|
110860
111402
|
return false;
|
|
110861
111403
|
}
|
|
110862
|
-
;// CONCATENATED MODULE:
|
|
111404
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+new-action@1.1.4_typescript@4.5.2/node_modules/@modern-js/new-action/dist/js/modern/mwa.js
|
|
110863
111405
|
|
|
110864
111406
|
|
|
110865
111407
|
|
|
@@ -110874,7 +111416,7 @@ const MWANewAction = async options => {
|
|
|
110874
111416
|
debug = false,
|
|
110875
111417
|
registry = '',
|
|
110876
111418
|
config = '{}',
|
|
110877
|
-
|
|
111419
|
+
cwd = process.cwd()
|
|
110878
111420
|
} = options;
|
|
110879
111421
|
let UserConfig = {};
|
|
110880
111422
|
|
|
@@ -110884,7 +111426,7 @@ const MWANewAction = async options => {
|
|
|
110884
111426
|
throw new Error('config is not a valid json');
|
|
110885
111427
|
}
|
|
110886
111428
|
|
|
110887
|
-
|
|
111429
|
+
js_modern_locale_i18n.changeLanguage({
|
|
110888
111430
|
locale: UserConfig.locale || locale
|
|
110889
111431
|
});
|
|
110890
111432
|
const smith = new CodeSmith({
|
|
@@ -110907,9 +111449,9 @@ const MWANewAction = async options => {
|
|
|
110907
111449
|
data: {},
|
|
110908
111450
|
current: null
|
|
110909
111451
|
}, mockGeneratorCore);
|
|
110910
|
-
const schema = forEach(
|
|
110911
|
-
if (
|
|
110912
|
-
const enable = hasEnabledFunction(schemaItem.key,
|
|
111452
|
+
const schema = forEach(mwa_MWANewActionSchema, schemaItem => {
|
|
111453
|
+
if (mwa_MWAActionFunctions.includes(schemaItem.key)) {
|
|
111454
|
+
const enable = hasEnabledFunction(schemaItem.key, mwa_MWAActionFunctionsDependencies, mwa_MWAActionFunctionsDevDependencies, {}, cwd);
|
|
110913
111455
|
const {
|
|
110914
111456
|
when
|
|
110915
111457
|
} = schemaItem;
|
|
@@ -110919,7 +111461,7 @@ const MWANewAction = async options => {
|
|
|
110919
111461
|
const ans = await appAPI.getInputBySchema(schema, UserConfig);
|
|
110920
111462
|
const actionType = ans.actionType;
|
|
110921
111463
|
const action = ans[actionType];
|
|
110922
|
-
let generator =
|
|
111464
|
+
let generator = mwa_MWANewActionGenerators[actionType][action];
|
|
110923
111465
|
|
|
110924
111466
|
if (!generator) {
|
|
110925
111467
|
throw new Error(`no valid option`);
|
|
@@ -110929,12 +111471,12 @@ const MWANewAction = async options => {
|
|
|
110929
111471
|
generator = `${generator}@${distTag}`;
|
|
110930
111472
|
}
|
|
110931
111473
|
|
|
110932
|
-
const devDependency =
|
|
110933
|
-
const dependency =
|
|
111474
|
+
const devDependency = mwa_MWAActionFunctionsDevDependencies[action];
|
|
111475
|
+
const dependency = mwa_MWAActionFunctionsDependencies[action];
|
|
110934
111476
|
|
|
110935
111477
|
const finalConfig = merge_default()(UserConfig, ans, {
|
|
110936
111478
|
locale: UserConfig.locale || locale,
|
|
110937
|
-
packageManager: getPackageManager(
|
|
111479
|
+
packageManager: getPackageManager(cwd)
|
|
110938
111480
|
}, {
|
|
110939
111481
|
devDependencies: devDependency ? {
|
|
110940
111482
|
[devDependency]: `^${await getPackageVersion(devDependency)}`
|
|
@@ -110953,10 +111495,69 @@ const MWANewAction = async options => {
|
|
|
110953
111495
|
generator: runner.name,
|
|
110954
111496
|
config: runner.config
|
|
110955
111497
|
})),
|
|
110956
|
-
pwd
|
|
111498
|
+
pwd: cwd
|
|
110957
111499
|
});
|
|
110958
111500
|
};
|
|
110959
|
-
;// CONCATENATED MODULE:
|
|
111501
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.1.3/node_modules/@modern-js/generator-common/dist/js/modern/newAction/module/index.js
|
|
111502
|
+
|
|
111503
|
+
|
|
111504
|
+
const module_ModuleActionTypes = [common_ActionType.Function];
|
|
111505
|
+
const module_ModuleActionFunctions = [common_ActionFunction.TailwindCSS, common_ActionFunction.Less, common_ActionFunction.Sass, // ActionFunction.I18n,
|
|
111506
|
+
// ActionFunction.Doc,
|
|
111507
|
+
common_ActionFunction.Storybook, common_ActionFunction.RuntimeApi];
|
|
111508
|
+
const module_ModuleActionTypesMap = {
|
|
111509
|
+
[common_ActionType.Function]: module_ModuleActionFunctions
|
|
111510
|
+
};
|
|
111511
|
+
const module_ModuleSpecialSchemaMap = {};
|
|
111512
|
+
const module_ModuleNewActionSchema = {
|
|
111513
|
+
key: 'Module_new_action',
|
|
111514
|
+
isObject: true,
|
|
111515
|
+
items: [{
|
|
111516
|
+
key: 'actionType',
|
|
111517
|
+
label: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.action.self),
|
|
111518
|
+
type: ['string'],
|
|
111519
|
+
mutualExclusion: true,
|
|
111520
|
+
items: module_ModuleActionTypes.map(type => ({
|
|
111521
|
+
key: type,
|
|
111522
|
+
label: common_ActionTypeText[type],
|
|
111523
|
+
type: ['string'],
|
|
111524
|
+
mutualExclusion: true,
|
|
111525
|
+
items: module_ModuleActionFunctions.map(func => module_ModuleSpecialSchemaMap[func] || {
|
|
111526
|
+
key: func,
|
|
111527
|
+
label: common_ActionFunctionText[func]
|
|
111528
|
+
})
|
|
111529
|
+
}))
|
|
111530
|
+
}]
|
|
111531
|
+
};
|
|
111532
|
+
const module_ModuleActionFunctionsDevDependencies = {
|
|
111533
|
+
[common_ActionFunction.Doc]: '@modern-js/plugin-docsite',
|
|
111534
|
+
[common_ActionFunction.Storybook]: '@modern-js/plugin-storybook',
|
|
111535
|
+
[common_ActionFunction.RuntimeApi]: '@modern-js/runtime',
|
|
111536
|
+
[common_ActionFunction.TailwindCSS]: 'tailwindcss'
|
|
111537
|
+
};
|
|
111538
|
+
const module_ModuleActionFunctionsPeerDependencies = {
|
|
111539
|
+
[common_ActionFunction.RuntimeApi]: '@modern-js/runtime',
|
|
111540
|
+
[common_ActionFunction.TailwindCSS]: 'tailwindcss'
|
|
111541
|
+
};
|
|
111542
|
+
const module_ModuleActionFunctionsDependencies = {
|
|
111543
|
+
[common_ActionFunction.I18n]: '@modern-js/plugin-i18n',
|
|
111544
|
+
[common_ActionFunction.TailwindCSS]: '@modern-js/plugin-tailwindcss',
|
|
111545
|
+
[common_ActionFunction.Less]: '@modern-js/plugin-less',
|
|
111546
|
+
[common_ActionFunction.Sass]: '@modern-js/plugin-sass'
|
|
111547
|
+
};
|
|
111548
|
+
const module_ModuleNewActionGenerators = {
|
|
111549
|
+
[common_ActionType.Function]: {
|
|
111550
|
+
[common_ActionFunction.TailwindCSS]: '@modern-js/dependence-generator',
|
|
111551
|
+
[common_ActionFunction.Less]: '@modern-js/dependence-generator',
|
|
111552
|
+
[common_ActionFunction.Sass]: '@modern-js/dependence-generator',
|
|
111553
|
+
[common_ActionFunction.I18n]: '@modern-js/dependence-generator',
|
|
111554
|
+
[common_ActionFunction.Test]: '@modern-js/dependence-generator',
|
|
111555
|
+
[common_ActionFunction.Doc]: '@modern-js/dependence-generator',
|
|
111556
|
+
[common_ActionFunction.Storybook]: '@modern-js/storybook-generator',
|
|
111557
|
+
[common_ActionFunction.RuntimeApi]: '@modern-js/dependence-generator'
|
|
111558
|
+
}
|
|
111559
|
+
};
|
|
111560
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+new-action@1.1.4_typescript@4.5.2/node_modules/@modern-js/new-action/dist/js/modern/module.js
|
|
110960
111561
|
|
|
110961
111562
|
|
|
110962
111563
|
|
|
@@ -110971,7 +111572,7 @@ const ModuleNewAction = async options => {
|
|
|
110971
111572
|
debug = false,
|
|
110972
111573
|
registry = '',
|
|
110973
111574
|
config = '{}',
|
|
110974
|
-
|
|
111575
|
+
cwd = process.cwd()
|
|
110975
111576
|
} = options;
|
|
110976
111577
|
let UserConfig = {};
|
|
110977
111578
|
|
|
@@ -110981,7 +111582,7 @@ const ModuleNewAction = async options => {
|
|
|
110981
111582
|
throw new Error('config is not a valid json');
|
|
110982
111583
|
}
|
|
110983
111584
|
|
|
110984
|
-
|
|
111585
|
+
js_modern_locale_i18n.changeLanguage({
|
|
110985
111586
|
locale: UserConfig.locale || locale
|
|
110986
111587
|
});
|
|
110987
111588
|
const smith = new CodeSmith({
|
|
@@ -111005,9 +111606,9 @@ const ModuleNewAction = async options => {
|
|
|
111005
111606
|
current: null
|
|
111006
111607
|
}, mockGeneratorCore);
|
|
111007
111608
|
let hasOption = false;
|
|
111008
|
-
const schema = forEach(
|
|
111009
|
-
if (
|
|
111010
|
-
const enable = hasEnabledFunction(schemaItem.key,
|
|
111609
|
+
const schema = forEach(module_ModuleNewActionSchema, schemaItem => {
|
|
111610
|
+
if (module_ModuleActionFunctions.includes(schemaItem.key)) {
|
|
111611
|
+
const enable = hasEnabledFunction(schemaItem.key, module_ModuleActionFunctionsDependencies, module_ModuleActionFunctionsDevDependencies, module_ModuleActionFunctionsPeerDependencies, cwd);
|
|
111011
111612
|
const {
|
|
111012
111613
|
when
|
|
111013
111614
|
} = schemaItem;
|
|
@@ -111028,7 +111629,7 @@ const ModuleNewAction = async options => {
|
|
|
111028
111629
|
const ans = await appAPI.getInputBySchema(schema, UserConfig);
|
|
111029
111630
|
const actionType = ans.actionType;
|
|
111030
111631
|
const action = ans[actionType];
|
|
111031
|
-
let generator =
|
|
111632
|
+
let generator = module_ModuleNewActionGenerators[actionType] && module_ModuleNewActionGenerators[actionType][action];
|
|
111032
111633
|
|
|
111033
111634
|
if (!generator) {
|
|
111034
111635
|
throw new Error(`no valid option`);
|
|
@@ -111038,13 +111639,13 @@ const ModuleNewAction = async options => {
|
|
|
111038
111639
|
generator = `${generator}@${distTag}`;
|
|
111039
111640
|
}
|
|
111040
111641
|
|
|
111041
|
-
const devDependency =
|
|
111042
|
-
const dependency =
|
|
111043
|
-
const peerDependency =
|
|
111642
|
+
const devDependency = module_ModuleActionFunctionsDevDependencies[action];
|
|
111643
|
+
const dependency = module_ModuleActionFunctionsDependencies[action];
|
|
111644
|
+
const peerDependency = module_ModuleActionFunctionsPeerDependencies[action];
|
|
111044
111645
|
|
|
111045
111646
|
const finalConfig = merge_default()(UserConfig, ans, {
|
|
111046
111647
|
locale: UserConfig.locale || locale,
|
|
111047
|
-
packageManager: getPackageManager(
|
|
111648
|
+
packageManager: getPackageManager(cwd)
|
|
111048
111649
|
}, {
|
|
111049
111650
|
devDependencies: devDependency ? {
|
|
111050
111651
|
[devDependency]: `^${await getPackageVersion(devDependency)}`
|
|
@@ -111066,35 +111667,110 @@ const ModuleNewAction = async options => {
|
|
|
111066
111667
|
generator: runner.name,
|
|
111067
111668
|
config: runner.config
|
|
111068
111669
|
})),
|
|
111069
|
-
pwd
|
|
111670
|
+
pwd: cwd
|
|
111070
111671
|
});
|
|
111071
111672
|
};
|
|
111072
|
-
;// CONCATENATED MODULE:
|
|
111673
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.1.3/node_modules/@modern-js/generator-common/dist/js/modern/common/solution.js
|
|
111674
|
+
|
|
111675
|
+
let solution_Solution;
|
|
111676
|
+
|
|
111677
|
+
(function (Solution) {
|
|
111678
|
+
Solution["MWA"] = "mwa";
|
|
111679
|
+
Solution["Module"] = "module";
|
|
111680
|
+
Solution["Monorepo"] = "monorepo";
|
|
111681
|
+
})(solution_Solution || (solution_Solution = {}));
|
|
111682
|
+
|
|
111683
|
+
let solution_SubSolution;
|
|
111684
|
+
|
|
111685
|
+
(function (SubSolution) {
|
|
111686
|
+
SubSolution["MWA"] = "mwa";
|
|
111687
|
+
SubSolution["MWATest"] = "mwa_test";
|
|
111688
|
+
SubSolution["Module"] = "module";
|
|
111689
|
+
SubSolution["InnerModule"] = "inner_module";
|
|
111690
|
+
})(solution_SubSolution || (solution_SubSolution = {}));
|
|
111691
|
+
|
|
111692
|
+
const solution_SolutionText = {
|
|
111693
|
+
[solution_Solution.MWA]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.solution.mwa),
|
|
111694
|
+
[solution_Solution.Module]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.solution.module),
|
|
111695
|
+
[solution_Solution.Monorepo]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.solution.monorepo)
|
|
111696
|
+
};
|
|
111697
|
+
const solution_SubSolutionText = {
|
|
111698
|
+
[solution_SubSolution.MWA]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.sub_solution.mwa),
|
|
111699
|
+
[solution_SubSolution.MWATest]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.sub_solution.mwa_test),
|
|
111700
|
+
[solution_SubSolution.Module]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.sub_solution.module),
|
|
111701
|
+
[solution_SubSolution.InnerModule]: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.sub_solution.inner_module)
|
|
111702
|
+
};
|
|
111703
|
+
const solution_SolutionSchema = {
|
|
111704
|
+
key: 'solution_schema',
|
|
111705
|
+
isObject: true,
|
|
111706
|
+
items: [{
|
|
111707
|
+
key: 'solution',
|
|
111708
|
+
label: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.solution.self),
|
|
111709
|
+
type: ['string'],
|
|
111710
|
+
mutualExclusion: true,
|
|
111711
|
+
items: Object.values(solution_Solution).map(solution => ({
|
|
111712
|
+
key: solution,
|
|
111713
|
+
label: solution_SolutionText[solution]
|
|
111714
|
+
}))
|
|
111715
|
+
}]
|
|
111716
|
+
};
|
|
111717
|
+
const solution_SubSolutionSchema = {
|
|
111718
|
+
key: 'sub_solution_schema',
|
|
111719
|
+
isObject: true,
|
|
111720
|
+
items: [{
|
|
111721
|
+
key: 'solution',
|
|
111722
|
+
label: () => js_modern_locale_i18n.t(js_modern_locale_localeKeys.sub_solution.self),
|
|
111723
|
+
type: ['string'],
|
|
111724
|
+
mutualExclusion: true,
|
|
111725
|
+
items: Object.values(solution_SubSolution).map(solution => ({
|
|
111726
|
+
key: solution,
|
|
111727
|
+
label: solution_SubSolutionText[solution]
|
|
111728
|
+
}))
|
|
111729
|
+
}]
|
|
111730
|
+
};
|
|
111731
|
+
const solution_BaseGenerator = '@modern-js/base-generator';
|
|
111732
|
+
const solution_SolutionGenerator = {
|
|
111733
|
+
[solution_Solution.MWA]: '@modern-js/mwa-generator',
|
|
111734
|
+
[solution_Solution.Module]: '@modern-js/module-generator',
|
|
111735
|
+
[solution_Solution.Monorepo]: '@modern-js/monorepo-generator'
|
|
111736
|
+
};
|
|
111737
|
+
const solution_SubSolutionGenerator = {
|
|
111738
|
+
[solution_SubSolution.MWA]: '@modern-js/mwa-generator',
|
|
111739
|
+
[solution_SubSolution.MWATest]: '@modern-js/mwa-generator',
|
|
111740
|
+
[solution_SubSolution.Module]: '@modern-js/module-generator',
|
|
111741
|
+
[solution_SubSolution.InnerModule]: '@modern-js/module-generator'
|
|
111742
|
+
};
|
|
111743
|
+
const solution_ChangesetGenerator = '@modern-js/changeset-generator';
|
|
111744
|
+
const solution_DependenceGenerator = '@modern-js/dependence-generator';
|
|
111745
|
+
const solution_EntryGenerator = '@modern-js/entry-generator';
|
|
111746
|
+
const solution_ElectronGenerator = '@modern-js/electron-generator';
|
|
111747
|
+
const solution_EslintGenerator = '@modern-js/eslint-generator';
|
|
111748
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.1.3/node_modules/@modern-js/generator-common/dist/js/modern/newAction/monorepo/index.js
|
|
111073
111749
|
|
|
111074
111750
|
const MonorepoNewActionSchema = {
|
|
111075
111751
|
key: 'monorepo_new_action',
|
|
111076
111752
|
isObject: true,
|
|
111077
|
-
items: [
|
|
111753
|
+
items: [solution_SubSolutionSchema]
|
|
111078
111754
|
};
|
|
111079
111755
|
const MonorepoNewActionConfig = {
|
|
111080
|
-
[
|
|
111756
|
+
[solution_SubSolution.MWA]: {
|
|
111081
111757
|
isMonorepoSubProject: true,
|
|
111082
111758
|
isTest: false
|
|
111083
111759
|
},
|
|
111084
|
-
[
|
|
111760
|
+
[solution_SubSolution.MWATest]: {
|
|
111085
111761
|
isMonorepoSubProject: true,
|
|
111086
111762
|
isTest: true
|
|
111087
111763
|
},
|
|
111088
|
-
[
|
|
111764
|
+
[solution_SubSolution.Module]: {
|
|
111089
111765
|
isMonorepoSubProject: true,
|
|
111090
111766
|
isPublic: true
|
|
111091
111767
|
},
|
|
111092
|
-
[
|
|
111768
|
+
[solution_SubSolution.InnerModule]: {
|
|
111093
111769
|
isMonorepoSubProject: true,
|
|
111094
111770
|
isPublic: false
|
|
111095
111771
|
}
|
|
111096
111772
|
};
|
|
111097
|
-
;// CONCATENATED MODULE:
|
|
111773
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+new-action@1.1.4_typescript@4.5.2/node_modules/@modern-js/new-action/dist/js/modern/monorepo.js
|
|
111098
111774
|
|
|
111099
111775
|
|
|
111100
111776
|
|
|
@@ -111109,7 +111785,7 @@ const MonorepoNewAction = async options => {
|
|
|
111109
111785
|
debug = false,
|
|
111110
111786
|
registry = '',
|
|
111111
111787
|
config = '{}',
|
|
111112
|
-
|
|
111788
|
+
cwd = process.cwd()
|
|
111113
111789
|
} = options;
|
|
111114
111790
|
let UserConfig = {};
|
|
111115
111791
|
|
|
@@ -111119,7 +111795,7 @@ const MonorepoNewAction = async options => {
|
|
|
111119
111795
|
throw new Error('config is not a valid json');
|
|
111120
111796
|
}
|
|
111121
111797
|
|
|
111122
|
-
|
|
111798
|
+
js_modern_locale_i18n.changeLanguage({
|
|
111123
111799
|
locale: UserConfig.locale || locale
|
|
111124
111800
|
});
|
|
111125
111801
|
const smith = new CodeSmith({
|
|
@@ -111144,7 +111820,7 @@ const MonorepoNewAction = async options => {
|
|
|
111144
111820
|
}, mockGeneratorCore);
|
|
111145
111821
|
const ans = await appAPI.getInputBySchema(MonorepoNewActionSchema, UserConfig);
|
|
111146
111822
|
const solution = ans.solution;
|
|
111147
|
-
let generator =
|
|
111823
|
+
let generator = solution_SubSolutionGenerator[solution];
|
|
111148
111824
|
|
|
111149
111825
|
if (!generator) {
|
|
111150
111826
|
throw new Error(`no valid repotype`);
|
|
@@ -111156,7 +111832,7 @@ const MonorepoNewAction = async options => {
|
|
|
111156
111832
|
|
|
111157
111833
|
const finalConfig = merge_default()(UserConfig, ans, MonorepoNewActionConfig[solution], {
|
|
111158
111834
|
locale: UserConfig.locale || locale,
|
|
111159
|
-
packageManager: getPackageManager(
|
|
111835
|
+
packageManager: getPackageManager(cwd)
|
|
111160
111836
|
});
|
|
111161
111837
|
|
|
111162
111838
|
const task = [{
|
|
@@ -111168,7 +111844,7 @@ const MonorepoNewAction = async options => {
|
|
|
111168
111844
|
generator: runner.name,
|
|
111169
111845
|
config: runner.config
|
|
111170
111846
|
})),
|
|
111171
|
-
pwd
|
|
111847
|
+
pwd: cwd
|
|
111172
111848
|
});
|
|
111173
111849
|
};
|
|
111174
111850
|
;// CONCATENATED MODULE: ../../generator-plugin/dist/js/treeshaking/context/new.js
|
|
@@ -111235,10 +111911,10 @@ var PluginNewAPI = /*#__PURE__*/function () {
|
|
|
111235
111911
|
_context.next = 5;
|
|
111236
111912
|
return MWANewAction({
|
|
111237
111913
|
config: JSON.stringify(new_objectSpread({
|
|
111238
|
-
|
|
111239
|
-
element: element
|
|
111240
|
-
|
|
111241
|
-
|
|
111914
|
+
actionType: ActionType.Element,
|
|
111915
|
+
element: element
|
|
111916
|
+
}, params)),
|
|
111917
|
+
cwd: this.projectPath
|
|
111242
111918
|
});
|
|
111243
111919
|
|
|
111244
111920
|
case 5:
|
|
@@ -111285,10 +111961,10 @@ var PluginNewAPI = /*#__PURE__*/function () {
|
|
|
111285
111961
|
_context2.next = 5;
|
|
111286
111962
|
return MWANewAction({
|
|
111287
111963
|
config: JSON.stringify(new_objectSpread({
|
|
111288
|
-
|
|
111289
|
-
"function": func
|
|
111290
|
-
|
|
111291
|
-
|
|
111964
|
+
actionType: ActionType.Function,
|
|
111965
|
+
"function": func
|
|
111966
|
+
}, params)),
|
|
111967
|
+
cwd: this.projectPath
|
|
111292
111968
|
});
|
|
111293
111969
|
|
|
111294
111970
|
case 5:
|
|
@@ -111311,10 +111987,10 @@ var PluginNewAPI = /*#__PURE__*/function () {
|
|
|
111311
111987
|
_context2.next = 11;
|
|
111312
111988
|
return ModuleNewAction({
|
|
111313
111989
|
config: JSON.stringify(new_objectSpread({
|
|
111314
|
-
|
|
111315
|
-
"function": func
|
|
111316
|
-
|
|
111317
|
-
|
|
111990
|
+
actionType: ActionType.Function,
|
|
111991
|
+
"function": func
|
|
111992
|
+
}, params)),
|
|
111993
|
+
cwd: this.projectPath
|
|
111318
111994
|
});
|
|
111319
111995
|
|
|
111320
111996
|
case 11:
|
|
@@ -111353,9 +112029,9 @@ var PluginNewAPI = /*#__PURE__*/function () {
|
|
|
111353
112029
|
_context3.next = 3;
|
|
111354
112030
|
return MonorepoNewAction({
|
|
111355
112031
|
config: JSON.stringify(new_objectSpread({
|
|
111356
|
-
solution: solution
|
|
111357
|
-
|
|
111358
|
-
|
|
112032
|
+
solution: solution
|
|
112033
|
+
}, params)),
|
|
112034
|
+
cwd: this.projectPath
|
|
111359
112035
|
});
|
|
111360
112036
|
|
|
111361
112037
|
case 3:
|
|
@@ -112329,7 +113005,7 @@ var _codesmithApiApp = __webpack_require__(3437);
|
|
|
112329
113005
|
|
|
112330
113006
|
var _generatorCommon = __webpack_require__(50828);
|
|
112331
113007
|
|
|
112332
|
-
var _generatorPlugin = __webpack_require__(
|
|
113008
|
+
var _generatorPlugin = __webpack_require__(40156);
|
|
112333
113009
|
|
|
112334
113010
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
112335
113011
|
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-canary-
|
|
14
|
+
"version": "0.0.0-canary-2021118101453",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"main": "./dist/js/node/main.js",
|
|
17
17
|
"files": [
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"@modern-js/codesmith": "^1.0.0",
|
|
24
24
|
"@modern-js/codesmith-api-app": "^1.0.0",
|
|
25
25
|
"@modern-js/codesmith-tools": "^1.0.0",
|
|
26
|
-
"@modern-js/generator-common": "^0.0.0-canary-
|
|
26
|
+
"@modern-js/generator-common": "^0.0.0-canary-2021118101453",
|
|
27
27
|
"@modern-js/generator-utils": "^1.1.1",
|
|
28
|
-
"@modern-js/module-generator": "^0.0.0-canary-
|
|
29
|
-
"@modern-js/monorepo-generator": "^0.0.0-canary-
|
|
30
|
-
"@modern-js/mwa-generator": "^0.0.0-canary-
|
|
31
|
-
"@modern-js/base-generator": "^0.0.0-canary-
|
|
32
|
-
"@modern-js/generator-plugin": "^0.0.0-canary-
|
|
28
|
+
"@modern-js/module-generator": "^0.0.0-canary-2021118101453",
|
|
29
|
+
"@modern-js/monorepo-generator": "^0.0.0-canary-2021118101453",
|
|
30
|
+
"@modern-js/mwa-generator": "^0.0.0-canary-2021118101453",
|
|
31
|
+
"@modern-js/base-generator": "^0.0.0-canary-2021118101453",
|
|
32
|
+
"@modern-js/generator-plugin": "^0.0.0-canary-2021118101453",
|
|
33
33
|
"@types/jest": "^26",
|
|
34
34
|
"@types/lodash": "^4.14.168",
|
|
35
35
|
"@types/node": "^14",
|