@modern-js/repo-generator 1.4.4 → 1.4.5
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 +19 -29
- package/package.json +8 -8
package/dist/js/node/main.js
CHANGED
@@ -94153,7 +94153,6 @@ const EN_LOCALE = {
|
|
94153
94153
|
self: 'Action',
|
94154
94154
|
function: {
|
94155
94155
|
self: 'Enable features',
|
94156
|
-
unbundle: 'Enable Unbundled Development',
|
94157
94156
|
tailwindcss: 'Enable Tailwind CSS',
|
94158
94157
|
less: 'Enable Less',
|
94159
94158
|
sass: 'Enable Sass',
|
@@ -94320,7 +94319,6 @@ const ZH_LOCALE = {
|
|
94320
94319
|
self: '请选择你想要的操作',
|
94321
94320
|
function: {
|
94322
94321
|
self: '启用可选功能',
|
94323
|
-
unbundle: '启用「Unbundled 开发」模式',
|
94324
94322
|
tailwindcss: '启用 Tailwind CSS 支持',
|
94325
94323
|
less: '启用 Less 支持',
|
94326
94324
|
sass: '启用 Sass 支持',
|
@@ -95110,7 +95108,6 @@ let ActionFunction;
|
|
95110
95108
|
exports.ActionFunction = ActionFunction;
|
95111
95109
|
|
95112
95110
|
(function (ActionFunction) {
|
95113
|
-
ActionFunction["UnBundle"] = "unbundle";
|
95114
95111
|
ActionFunction["TailwindCSS"] = "tailwindcss";
|
95115
95112
|
ActionFunction["Less"] = "less";
|
95116
95113
|
ActionFunction["Sass"] = "sass";
|
@@ -95148,7 +95145,6 @@ const ActionElementText = {
|
|
95148
95145
|
};
|
95149
95146
|
exports.ActionElementText = ActionElementText;
|
95150
95147
|
const ActionFunctionText = {
|
95151
|
-
[ActionFunction.UnBundle]: () => _locale.i18n.t(_locale.localeKeys.action.function.unbundle),
|
95152
95148
|
[ActionFunction.TailwindCSS]: () => _locale.i18n.t(_locale.localeKeys.action.function.tailwindcss),
|
95153
95149
|
[ActionFunction.Less]: () => _locale.i18n.t(_locale.localeKeys.action.function.less),
|
95154
95150
|
[ActionFunction.Sass]: () => _locale.i18n.t(_locale.localeKeys.action.function.sass),
|
@@ -95386,7 +95382,7 @@ var _locale = __webpack_require__(94646);
|
|
95386
95382
|
const MWAActionTypes = [_common.ActionType.Element, _common.ActionType.Function // ActionType.Refactor,
|
95387
95383
|
];
|
95388
95384
|
exports.MWAActionTypes = MWAActionTypes;
|
95389
|
-
const MWAActionFunctions = [_common.ActionFunction.
|
95385
|
+
const MWAActionFunctions = [_common.ActionFunction.TailwindCSS, _common.ActionFunction.Less, _common.ActionFunction.Sass, _common.ActionFunction.BFF, _common.ActionFunction.SSG, _common.ActionFunction.MicroFrontend, _common.ActionFunction.Electron, // ActionFunction.I18n,
|
95390
95386
|
_common.ActionFunction.Test, _common.ActionFunction.Storybook, // ActionFunction.E2ETest,
|
95391
95387
|
// ActionFunction.Doc,
|
95392
95388
|
_common.ActionFunction.Polyfill, _common.ActionFunction.Deploy, _common.ActionFunction.Proxy];
|
@@ -95430,7 +95426,6 @@ const MWANewActionSchema = {
|
|
95430
95426
|
};
|
95431
95427
|
exports.MWANewActionSchema = MWANewActionSchema;
|
95432
95428
|
const MWAActionFunctionsDevDependencies = {
|
95433
|
-
[_common.ActionFunction.UnBundle]: '@modern-js/plugin-unbundle',
|
95434
95429
|
[_common.ActionFunction.TailwindCSS]: '@modern-js/plugin-tailwindcss',
|
95435
95430
|
[_common.ActionFunction.Test]: '@modern-js/plugin-testing',
|
95436
95431
|
[_common.ActionFunction.E2ETest]: '@modern-js/plugin-e2e',
|
@@ -95461,7 +95456,6 @@ const MWANewActionGenerators = {
|
|
95461
95456
|
[_common.ActionElement.Server]: '@modern-js/server-generator'
|
95462
95457
|
},
|
95463
95458
|
[_common.ActionType.Function]: {
|
95464
|
-
[_common.ActionFunction.UnBundle]: '@modern-js/unbundle-generator',
|
95465
95459
|
[_common.ActionFunction.TailwindCSS]: '@modern-js/tailwindcss-generator',
|
95466
95460
|
[_common.ActionFunction.Less]: '@modern-js/dependence-generator',
|
95467
95461
|
[_common.ActionFunction.Sass]: '@modern-js/dependence-generator',
|
@@ -95486,7 +95480,7 @@ exports.MWANewActionGenerators = MWANewActionGenerators;
|
|
95486
95480
|
|
95487
95481
|
/***/ }),
|
95488
95482
|
|
95489
|
-
/***/
|
95483
|
+
/***/ 78754:
|
95490
95484
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
95491
95485
|
|
95492
95486
|
"use strict";
|
@@ -96309,7 +96303,6 @@ const zh_ZH_LOCALE = {
|
|
96309
96303
|
self: '请选择你想要的操作',
|
96310
96304
|
function: {
|
96311
96305
|
self: '启用可选功能',
|
96312
|
-
unbundle: '启用「Unbundled 开发」模式',
|
96313
96306
|
tailwindcss: '启用 Tailwind CSS 支持',
|
96314
96307
|
less: '启用 Less 支持',
|
96315
96308
|
sass: '启用 Sass 支持',
|
@@ -96438,7 +96431,6 @@ const en_EN_LOCALE = {
|
|
96438
96431
|
self: 'Action',
|
96439
96432
|
function: {
|
96440
96433
|
self: 'Enable features',
|
96441
|
-
unbundle: 'Enable Unbundled Development',
|
96442
96434
|
tailwindcss: 'Enable Tailwind CSS',
|
96443
96435
|
less: 'Enable Less',
|
96444
96436
|
sass: 'Enable Sass',
|
@@ -97080,7 +97072,7 @@ var src = __webpack_require__(13922);
|
|
97080
97072
|
var src_default = /*#__PURE__*/__webpack_require__.n(src);
|
97081
97073
|
// EXTERNAL MODULE: ../../../../node_modules/.pnpm/declaration-update@0.0.2/node_modules/declaration-update/dist/index.js
|
97082
97074
|
var declaration_update_dist = __webpack_require__(8200);
|
97083
|
-
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@1.2.
|
97075
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@1.2.2/node_modules/@modern-js/codesmith-api-json/dist/js/modern/utils/index.js
|
97084
97076
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
97085
97077
|
const originJsonValue = await resource.value();
|
97086
97078
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
@@ -97089,12 +97081,12 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
97089
97081
|
throw new Error('get new json string is undefined');
|
97090
97082
|
}
|
97091
97083
|
|
97092
|
-
await generatorCore.output.fs(resource.
|
97084
|
+
await generatorCore.output.fs(resource.filePath, newJsonString, {
|
97093
97085
|
encoding: 'utf-8'
|
97094
97086
|
});
|
97095
97087
|
return newJsonString;
|
97096
97088
|
}
|
97097
|
-
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@1.2.
|
97089
|
+
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@1.2.2/node_modules/@modern-js/codesmith-api-json/dist/js/modern/index.js
|
97098
97090
|
function js_modern_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
97099
97091
|
|
97100
97092
|
|
@@ -97391,7 +97383,7 @@ function _addManyFiles() {
|
|
97391
97383
|
case 0:
|
97392
97384
|
dest = config.destination;
|
97393
97385
|
|
97394
|
-
if (!(typeof dest !== 'string'
|
97386
|
+
if (!(typeof dest !== 'string')) {
|
97395
97387
|
_context3.next = 3;
|
97396
97388
|
break;
|
97397
97389
|
}
|
@@ -98765,7 +98757,6 @@ let ActionElement;
|
|
98765
98757
|
let ActionFunction;
|
98766
98758
|
|
98767
98759
|
(function (ActionFunction) {
|
98768
|
-
ActionFunction["UnBundle"] = "unbundle";
|
98769
98760
|
ActionFunction["TailwindCSS"] = "tailwindcss";
|
98770
98761
|
ActionFunction["Less"] = "less";
|
98771
98762
|
ActionFunction["Sass"] = "sass";
|
@@ -98800,7 +98791,6 @@ const ActionElementText = {
|
|
98800
98791
|
[ActionElement.Server]: () => modern_locale_i18n.t(modern_locale_localeKeys.action.element.server)
|
98801
98792
|
};
|
98802
98793
|
const ActionFunctionText = {
|
98803
|
-
[ActionFunction.UnBundle]: () => modern_locale_i18n.t(modern_locale_localeKeys.action["function"].unbundle),
|
98804
98794
|
[ActionFunction.TailwindCSS]: () => modern_locale_i18n.t(modern_locale_localeKeys.action["function"].tailwindcss),
|
98805
98795
|
[ActionFunction.Less]: () => modern_locale_i18n.t(modern_locale_localeKeys.action["function"].less),
|
98806
98796
|
[ActionFunction.Sass]: () => modern_locale_i18n.t(modern_locale_localeKeys.action["function"].sass),
|
@@ -98831,7 +98821,7 @@ const ActionTypeTextMap = {
|
|
98831
98821
|
|
98832
98822
|
const MWAActionTypes = [ActionType.Element, ActionType.Function // ActionType.Refactor,
|
98833
98823
|
];
|
98834
|
-
const MWAActionFunctions = [ActionFunction.
|
98824
|
+
const MWAActionFunctions = [ActionFunction.TailwindCSS, ActionFunction.Less, ActionFunction.Sass, ActionFunction.BFF, ActionFunction.SSG, ActionFunction.MicroFrontend, ActionFunction.Electron, // ActionFunction.I18n,
|
98835
98825
|
ActionFunction.Test, ActionFunction.Storybook, // ActionFunction.E2ETest,
|
98836
98826
|
// ActionFunction.Doc,
|
98837
98827
|
ActionFunction.Polyfill, ActionFunction.Deploy, ActionFunction.Proxy];
|
@@ -98869,7 +98859,6 @@ const MWANewActionSchema = {
|
|
98869
98859
|
}]
|
98870
98860
|
};
|
98871
98861
|
const MWAActionFunctionsDevDependencies = {
|
98872
|
-
[ActionFunction.UnBundle]: '@modern-js/plugin-unbundle',
|
98873
98862
|
[ActionFunction.TailwindCSS]: '@modern-js/plugin-tailwindcss',
|
98874
98863
|
[ActionFunction.Test]: '@modern-js/plugin-testing',
|
98875
98864
|
[ActionFunction.E2ETest]: '@modern-js/plugin-e2e',
|
@@ -98897,7 +98886,6 @@ const MWANewActionGenerators = {
|
|
98897
98886
|
[ActionElement.Server]: '@modern-js/server-generator'
|
98898
98887
|
},
|
98899
98888
|
[ActionType.Function]: {
|
98900
|
-
[ActionFunction.UnBundle]: '@modern-js/unbundle-generator',
|
98901
98889
|
[ActionFunction.TailwindCSS]: '@modern-js/tailwindcss-generator',
|
98902
98890
|
[ActionFunction.Less]: '@modern-js/dependence-generator',
|
98903
98891
|
[ActionFunction.Sass]: '@modern-js/dependence-generator',
|
@@ -102628,6 +102616,7 @@ const ModuleNewAction = async options => {
|
|
102628
102616
|
|
102629
102617
|
|
102630
102618
|
|
102619
|
+
|
102631
102620
|
const REPO_GENERATOR = '@modern-js/repo-generator';
|
102632
102621
|
const MonorepoNewAction = async options => {
|
102633
102622
|
const {
|
@@ -102636,7 +102625,7 @@ const MonorepoNewAction = async options => {
|
|
102636
102625
|
debug = false,
|
102637
102626
|
registry = '',
|
102638
102627
|
config = '{}',
|
102639
|
-
|
102628
|
+
plugin = [],
|
102640
102629
|
cwd = process.cwd()
|
102641
102630
|
} = options;
|
102642
102631
|
let UserConfig = {};
|
@@ -102657,8 +102646,16 @@ const MonorepoNewAction = async options => {
|
|
102657
102646
|
|
102658
102647
|
if (!alreadyRepo(cwd)) {
|
102659
102648
|
smith.logger.warn('not valid modern.js repo');
|
102660
|
-
}
|
102649
|
+
} // Determine if the plugin is a Monorepo dependency
|
102661
102650
|
|
102651
|
+
|
102652
|
+
const plugins = plugin.map(plugin => {
|
102653
|
+
try {
|
102654
|
+
return external_path_default().join(/*require.resolve*/(__webpack_require__(30794).resolve(plugin)), '../../../../');
|
102655
|
+
} catch (e) {
|
102656
|
+
return plugin;
|
102657
|
+
}
|
102658
|
+
});
|
102662
102659
|
const finalConfig = (0,lodash.merge)(UserConfig, {
|
102663
102660
|
locale: UserConfig.locale || locale,
|
102664
102661
|
packageManager: UserConfig.packageManager || (await (0,utils_dist.getPackageManager)(cwd)),
|
@@ -103624,7 +103621,7 @@ var _codesmithApiApp = __webpack_require__(26046);
|
|
103624
103621
|
|
103625
103622
|
var _generatorCommon = __webpack_require__(50828);
|
103626
103623
|
|
103627
|
-
var _generatorPlugin = __webpack_require__(
|
103624
|
+
var _generatorPlugin = __webpack_require__(78754);
|
103628
103625
|
|
103629
103626
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
103630
103627
|
|
@@ -104730,7 +104727,6 @@ exports.INTERNAL_PLUGINS = {
|
|
104730
104727
|
server: '@modern-js/plugin-nest/server',
|
104731
104728
|
},
|
104732
104729
|
'@modern-js/plugin-unbundle': { cli: '@modern-js/plugin-unbundle' },
|
104733
|
-
'@modern-js/plugin-server-build': { cli: '@modern-js/plugin-server-build' },
|
104734
104730
|
'@modern-js/plugin-server': {
|
104735
104731
|
cli: '@modern-js/plugin-server/cli',
|
104736
104732
|
server: '@modern-js/plugin-server/server',
|
@@ -104860,12 +104856,6 @@ exports.PLUGIN_SCHEMAS = {
|
|
104860
104856
|
},
|
104861
104857
|
},
|
104862
104858
|
],
|
104863
|
-
'@modern-js/plugin-ssr': [
|
104864
|
-
{
|
104865
|
-
target: 'runtime.ssr',
|
104866
|
-
schema: { type: ['boolean', 'object'] },
|
104867
|
-
},
|
104868
|
-
],
|
104869
104859
|
'@modern-js/plugin-state': [
|
104870
104860
|
{
|
104871
104861
|
target: 'runtime.state',
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "1.4.
|
14
|
+
"version": "1.4.5",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"main": "./dist/js/node/main.js",
|
17
17
|
"files": [
|
@@ -26,14 +26,14 @@
|
|
26
26
|
"@modern-js/codesmith": "^1.3.0",
|
27
27
|
"@modern-js/codesmith-api-app": "^1.2.5",
|
28
28
|
"@modern-js/codesmith-tools": "^1.2.1",
|
29
|
-
"@modern-js/generator-common": "1.
|
30
|
-
"@modern-js/generator-utils": "1.
|
31
|
-
"@modern-js/module-generator": "2.1.
|
32
|
-
"@modern-js/monorepo-generator": "2.1.
|
33
|
-
"@modern-js/mwa-generator": "2.0.
|
29
|
+
"@modern-js/generator-common": "1.5.0",
|
30
|
+
"@modern-js/generator-utils": "1.3.0",
|
31
|
+
"@modern-js/module-generator": "2.1.3",
|
32
|
+
"@modern-js/monorepo-generator": "2.1.3",
|
33
|
+
"@modern-js/mwa-generator": "2.0.5",
|
34
34
|
"@modern-js/base-generator": "1.4.5",
|
35
|
-
"@modern-js/generator-plugin": "1.
|
36
|
-
"@modern-js/utils": "1.7.
|
35
|
+
"@modern-js/generator-plugin": "1.3.0",
|
36
|
+
"@modern-js/utils": "1.7.12",
|
37
37
|
"@types/jest": "^27",
|
38
38
|
"@types/node": "^14",
|
39
39
|
"typescript": "^4",
|