@modern-js/repo-generator 1.2.6 → 1.3.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/js/node/main.js +60 -530
- package/package.json +13 -11
package/dist/js/node/main.js
CHANGED
@@ -5604,21 +5604,6 @@ exports.pointer = pointer;
|
|
5604
5604
|
|
5605
5605
|
/***/ }),
|
5606
5606
|
|
5607
|
-
/***/ 28119:
|
5608
|
-
/***/ ((module) => {
|
5609
|
-
|
5610
|
-
function webpackEmptyContext(req) {
|
5611
|
-
var e = new Error("Cannot find module '" + req + "'");
|
5612
|
-
e.code = 'MODULE_NOT_FOUND';
|
5613
|
-
throw e;
|
5614
|
-
}
|
5615
|
-
webpackEmptyContext.keys = () => ([]);
|
5616
|
-
webpackEmptyContext.resolve = webpackEmptyContext;
|
5617
|
-
webpackEmptyContext.id = 28119;
|
5618
|
-
module.exports = webpackEmptyContext;
|
5619
|
-
|
5620
|
-
/***/ }),
|
5621
|
-
|
5622
5607
|
/***/ 80539:
|
5623
5608
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
5624
5609
|
|
@@ -100684,6 +100669,7 @@ const EN_LOCALE = {
|
|
100684
100669
|
runtime_api: 'Enable "Runtime API"',
|
100685
100670
|
mwa_storybook: 'Enable "Visual Testing (Storybook)"',
|
100686
100671
|
ssg: 'Enable "SSG"',
|
100672
|
+
polyfill: 'Enable "UA-based Polyfill feature"',
|
100687
100673
|
deploy: 'Enable "Deploy"'
|
100688
100674
|
},
|
100689
100675
|
element: {
|
@@ -100849,6 +100835,7 @@ const ZH_LOCALE = {
|
|
100849
100835
|
runtime_api: '启用「Rumtime API」',
|
100850
100836
|
mwa_storybook: '启用「Visual Testing (Storybook)」模式',
|
100851
100837
|
ssg: '启用「SSG」功能',
|
100838
|
+
polyfill: '启用基于「UA 的 Polyfill」功能',
|
100852
100839
|
deploy: '启用「部署」功能'
|
100853
100840
|
},
|
100854
100841
|
element: {
|
@@ -101336,7 +101323,6 @@ const LambdaTypeSchema = {
|
|
101336
101323
|
type: ['string'],
|
101337
101324
|
label: () => _locale.i18n.t(_locale.localeKeys.deploy.lambda.self),
|
101338
101325
|
mutualExclusion: true,
|
101339
|
-
when: values => values.disableModernServer === _common.BooleanConfig.NO,
|
101340
101326
|
items: Object.values(LambdaType).map(deployType => ({
|
101341
101327
|
key: deployType,
|
101342
101328
|
label: () => _locale.i18n.t(_locale.localeKeys.deploy.lambda[deployType])
|
@@ -101627,6 +101613,7 @@ exports.ActionFunction = ActionFunction;
|
|
101627
101613
|
ActionFunction["Storybook"] = "storybook";
|
101628
101614
|
ActionFunction["RuntimeApi"] = "runtimeApi";
|
101629
101615
|
ActionFunction["SSG"] = "ssg";
|
101616
|
+
ActionFunction["Polyfill"] = "polyfill";
|
101630
101617
|
ActionFunction["Deploy"] = "deploy";
|
101631
101618
|
})(ActionFunction || (exports.ActionFunction = ActionFunction = {}));
|
101632
101619
|
|
@@ -101663,6 +101650,7 @@ const ActionFunctionText = {
|
|
101663
101650
|
[ActionFunction.Storybook]: () => _locale.i18n.t(_locale.localeKeys.action.function.storybook),
|
101664
101651
|
[ActionFunction.RuntimeApi]: () => _locale.i18n.t(_locale.localeKeys.action.function.runtime_api),
|
101665
101652
|
[ActionFunction.SSG]: () => _locale.i18n.t(_locale.localeKeys.action.function.ssg),
|
101653
|
+
[ActionFunction.Polyfill]: () => _locale.i18n.t(_locale.localeKeys.action.function.polyfill),
|
101666
101654
|
[ActionFunction.Deploy]: () => _locale.i18n.t(_locale.localeKeys.action.function.deploy)
|
101667
101655
|
};
|
101668
101656
|
exports.ActionFunctionText = ActionFunctionText;
|
@@ -101888,7 +101876,7 @@ exports.MWAActionTypes = MWAActionTypes;
|
|
101888
101876
|
const 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,
|
101889
101877
|
_common.ActionFunction.Test, _common.ActionFunction.Storybook, // ActionFunction.E2ETest,
|
101890
101878
|
// ActionFunction.Doc,
|
101891
|
-
_common.ActionFunction.Deploy];
|
101879
|
+
_common.ActionFunction.Polyfill, _common.ActionFunction.Deploy];
|
101892
101880
|
exports.MWAActionFunctions = MWAActionFunctions;
|
101893
101881
|
const MWAActionElements = [_common.ActionElement.Entry, _common.ActionElement.Server];
|
101894
101882
|
exports.MWAActionElements = MWAActionElements;
|
@@ -101944,7 +101932,8 @@ const MWAActionFunctionsDependencies = {
|
|
101944
101932
|
[_common.ActionFunction.BFF]: '@modern-js/plugin-bff',
|
101945
101933
|
[_common.ActionFunction.MicroFrontend]: '@modern-js/plugin-micro-frontend',
|
101946
101934
|
[_common.ActionFunction.I18n]: '@modern-js/plugin-i18n',
|
101947
|
-
[_common.ActionFunction.SSG]: '@modern-js/plugin-ssg'
|
101935
|
+
[_common.ActionFunction.SSG]: '@modern-js/plugin-ssg',
|
101936
|
+
[_common.ActionFunction.Polyfill]: '@modern-js/plugin-polyfill'
|
101948
101937
|
};
|
101949
101938
|
exports.MWAActionFunctionsDependencies = MWAActionFunctionsDependencies;
|
101950
101939
|
const MWAActionFunctionsAppendTypeContent = {
|
@@ -101971,6 +101960,7 @@ const MWANewActionGenerators = {
|
|
101971
101960
|
[_common.ActionFunction.Doc]: '@modern-js/dependence-generator',
|
101972
101961
|
[_common.ActionFunction.Storybook]: '@modern-js/dependence-generator',
|
101973
101962
|
[_common.ActionFunction.SSG]: '@modern-js/ssg-generator',
|
101963
|
+
[_common.ActionFunction.Polyfill]: '@modern-js/dependence-generator',
|
101974
101964
|
[_common.ActionFunction.Deploy]: '@modern-js/cloud-deploy-generator'
|
101975
101965
|
},
|
101976
101966
|
[_common.ActionType.Refactor]: {
|
@@ -101981,7 +101971,7 @@ exports.MWANewActionGenerators = MWANewActionGenerators;
|
|
101981
101971
|
|
101982
101972
|
/***/ }),
|
101983
101973
|
|
101984
|
-
/***/
|
101974
|
+
/***/ 99457:
|
101985
101975
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
101986
101976
|
|
101987
101977
|
"use strict";
|
@@ -102237,6 +102227,7 @@ const zh_ZH_LOCALE = {
|
|
102237
102227
|
runtime_api: '启用「Rumtime API」',
|
102238
102228
|
mwa_storybook: '启用「Visual Testing (Storybook)」模式',
|
102239
102229
|
ssg: '启用「SSG」功能',
|
102230
|
+
polyfill: '启用基于「UA 的 Polyfill」功能',
|
102240
102231
|
deploy: '启用「部署」功能'
|
102241
102232
|
},
|
102242
102233
|
element: {
|
@@ -102364,6 +102355,7 @@ const en_EN_LOCALE = {
|
|
102364
102355
|
runtime_api: 'Enable "Runtime API"',
|
102365
102356
|
mwa_storybook: 'Enable "Visual Testing (Storybook)"',
|
102366
102357
|
ssg: 'Enable "SSG"',
|
102358
|
+
polyfill: 'Enable "UA-based Polyfill feature"',
|
102367
102359
|
deploy: 'Enable "Deploy"'
|
102368
102360
|
},
|
102369
102361
|
element: {
|
@@ -104700,6 +104692,7 @@ let ActionFunction;
|
|
104700
104692
|
ActionFunction["Storybook"] = "storybook";
|
104701
104693
|
ActionFunction["RuntimeApi"] = "runtimeApi";
|
104702
104694
|
ActionFunction["SSG"] = "ssg";
|
104695
|
+
ActionFunction["Polyfill"] = "polyfill";
|
104703
104696
|
ActionFunction["Deploy"] = "deploy";
|
104704
104697
|
})(ActionFunction || (ActionFunction = {}));
|
104705
104698
|
|
@@ -104733,6 +104726,7 @@ const ActionFunctionText = {
|
|
104733
104726
|
[ActionFunction.Storybook]: () => modern_locale_i18n.t(modern_locale_localeKeys.action["function"].storybook),
|
104734
104727
|
[ActionFunction.RuntimeApi]: () => modern_locale_i18n.t(modern_locale_localeKeys.action["function"].runtime_api),
|
104735
104728
|
[ActionFunction.SSG]: () => modern_locale_i18n.t(modern_locale_localeKeys.action["function"].ssg),
|
104729
|
+
[ActionFunction.Polyfill]: () => modern_locale_i18n.t(modern_locale_localeKeys.action["function"].polyfill),
|
104736
104730
|
[ActionFunction.Deploy]: () => modern_locale_i18n.t(modern_locale_localeKeys.action["function"].deploy)
|
104737
104731
|
};
|
104738
104732
|
const ActionRefactorText = {
|
@@ -104751,7 +104745,7 @@ const MWAActionTypes = [ActionType.Element, ActionType.Function // ActionType.Re
|
|
104751
104745
|
const MWAActionFunctions = [ActionFunction.UnBundle, ActionFunction.TailwindCSS, ActionFunction.Less, ActionFunction.Sass, ActionFunction.BFF, ActionFunction.SSG, ActionFunction.MicroFrontend, ActionFunction.Electron, // ActionFunction.I18n,
|
104752
104746
|
ActionFunction.Test, ActionFunction.Storybook, // ActionFunction.E2ETest,
|
104753
104747
|
// ActionFunction.Doc,
|
104754
|
-
ActionFunction.Deploy];
|
104748
|
+
ActionFunction.Polyfill, ActionFunction.Deploy];
|
104755
104749
|
const MWAActionElements = [ActionElement.Entry, ActionElement.Server];
|
104756
104750
|
const MWAActionReactors = [ActionRefactor.BFFToApp];
|
104757
104751
|
const MWAActionTypesMap = {
|
@@ -104800,7 +104794,8 @@ const MWAActionFunctionsDependencies = {
|
|
104800
104794
|
[ActionFunction.BFF]: '@modern-js/plugin-bff',
|
104801
104795
|
[ActionFunction.MicroFrontend]: '@modern-js/plugin-micro-frontend',
|
104802
104796
|
[ActionFunction.I18n]: '@modern-js/plugin-i18n',
|
104803
|
-
[ActionFunction.SSG]: '@modern-js/plugin-ssg'
|
104797
|
+
[ActionFunction.SSG]: '@modern-js/plugin-ssg',
|
104798
|
+
[ActionFunction.Polyfill]: '@modern-js/plugin-polyfill'
|
104804
104799
|
};
|
104805
104800
|
const MWAActionFunctionsAppendTypeContent = {
|
104806
104801
|
[ActionFunction.Test]: `/// <reference types='@modern-js/plugin-testing/type' />`,
|
@@ -104825,6 +104820,7 @@ const MWANewActionGenerators = {
|
|
104825
104820
|
[ActionFunction.Doc]: '@modern-js/dependence-generator',
|
104826
104821
|
[ActionFunction.Storybook]: '@modern-js/dependence-generator',
|
104827
104822
|
[ActionFunction.SSG]: '@modern-js/ssg-generator',
|
104823
|
+
[ActionFunction.Polyfill]: '@modern-js/dependence-generator',
|
104828
104824
|
[ActionFunction.Deploy]: '@modern-js/cloud-deploy-generator'
|
104829
104825
|
},
|
104830
104826
|
[ActionType.Refactor]: {
|
@@ -108064,430 +108060,7 @@ class AppAPI {
|
|
108064
108060
|
}
|
108065
108061
|
|
108066
108062
|
}
|
108067
|
-
;// CONCATENATED MODULE:
|
108068
|
-
const modern_locale_zh_ZH_LOCALE = {
|
108069
|
-
solution: {
|
108070
|
-
self: '请选择你想创建的工程类型',
|
108071
|
-
mwa: '应用',
|
108072
|
-
module: '模块',
|
108073
|
-
monorepo: '项目组',
|
108074
|
-
custom: '自定义',
|
108075
|
-
default: '默认'
|
108076
|
-
},
|
108077
|
-
scenes: {
|
108078
|
-
self: '请选择项目场景'
|
108079
|
-
},
|
108080
|
-
sub_solution: {
|
108081
|
-
self: '请选择你想创建的工程类型',
|
108082
|
-
mwa: '应用',
|
108083
|
-
mwa_test: '应用(测试)',
|
108084
|
-
module: '模块',
|
108085
|
-
inner_module: '模块(内部)'
|
108086
|
-
},
|
108087
|
-
action: {
|
108088
|
-
self: '请选择你想要的操作',
|
108089
|
-
function: {
|
108090
|
-
self: '启用可选功能',
|
108091
|
-
unbundle: '启用「Unbundled 开发」模式',
|
108092
|
-
tailwindcss: '启用 Tailwind CSS 支持',
|
108093
|
-
less: '启用 Less 支持',
|
108094
|
-
sass: '启用 Sass 支持',
|
108095
|
-
bff: '启用「BFF」功能',
|
108096
|
-
micro_frontend: '启用「微前端」模式',
|
108097
|
-
electron: '启用「Electron」模式',
|
108098
|
-
i18n: '启用「国际化(i18n)」功能',
|
108099
|
-
test: '启用「单元测试 / 集成测试」功能',
|
108100
|
-
e2e_test: '启用「E2E 测试」功能',
|
108101
|
-
doc: '启用「文档站」功能',
|
108102
|
-
storybook: '启用「Storybook」',
|
108103
|
-
runtime_api: '启用「Rumtime API」',
|
108104
|
-
mwa_storybook: '启用「Visual Testing (Storybook)」模式',
|
108105
|
-
ssg: '启用「SSG」功能',
|
108106
|
-
deploy: '启用「部署」功能'
|
108107
|
-
},
|
108108
|
-
element: {
|
108109
|
-
self: '创建工程元素',
|
108110
|
-
entry: '新建「应用入口」',
|
108111
|
-
server: '新建「Server 自定义」源码目录'
|
108112
|
-
},
|
108113
|
-
refactor: {
|
108114
|
-
self: '自动重构',
|
108115
|
-
bff_to_app: 'BFF 切换框架模式'
|
108116
|
-
}
|
108117
|
-
},
|
108118
|
-
boolean: {
|
108119
|
-
yes: '是',
|
108120
|
-
no: '否'
|
108121
|
-
},
|
108122
|
-
language: {
|
108123
|
-
self: '请选择开发语言'
|
108124
|
-
},
|
108125
|
-
packageManager: {
|
108126
|
-
self: '请选择包管理工具'
|
108127
|
-
},
|
108128
|
-
runWay: {
|
108129
|
-
self: '是否需要支持以下类型应用',
|
108130
|
-
no: '不需要',
|
108131
|
-
electron: 'Electron'
|
108132
|
-
},
|
108133
|
-
needModifyConfig: {
|
108134
|
-
self: '是否需要调整默认配置?',
|
108135
|
-
enableLess: '是否启用 Less 支持?',
|
108136
|
-
enableSass: '是否启用 Sass 支持?'
|
108137
|
-
},
|
108138
|
-
entry: {
|
108139
|
-
name: '请填写入口名称',
|
108140
|
-
no_empty: '入口名称不能为空!',
|
108141
|
-
no_pages: '入口名称不支持 "pages"!',
|
108142
|
-
needModifyConfig: '是否需要调整默认配置?',
|
108143
|
-
disableStateManagement: '是否关闭「应用状态管理」功能?',
|
108144
|
-
clientRoute: {
|
108145
|
-
self: '请选择客户端路由方式',
|
108146
|
-
selfControlRoute: '启用自控路由',
|
108147
|
-
conventionalRoute: '启用约定式路由',
|
108148
|
-
no: '不启用'
|
108149
|
-
}
|
108150
|
-
},
|
108151
|
-
packageName: {
|
108152
|
-
self: '请填写项目名称',
|
108153
|
-
sub_name: '请填写子项目名称',
|
108154
|
-
no_empty: '项目名称不能为空!'
|
108155
|
-
},
|
108156
|
-
packagePath: {
|
108157
|
-
self: '请填写子项目目录名称',
|
108158
|
-
no_empty: '目录名称不能为空!',
|
108159
|
-
format: '目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)'
|
108160
|
-
},
|
108161
|
-
framework: {
|
108162
|
-
self: '请选择运行时框架',
|
108163
|
-
egg: 'Egg',
|
108164
|
-
express: 'Express',
|
108165
|
-
koa: 'Koa',
|
108166
|
-
nest: 'Nest'
|
108167
|
-
},
|
108168
|
-
bff: {
|
108169
|
-
bffType: {
|
108170
|
-
self: '请选择 BFF 类型',
|
108171
|
-
func: '函数模式',
|
108172
|
-
framework: '框架模式'
|
108173
|
-
}
|
108174
|
-
},
|
108175
|
-
deploy: {
|
108176
|
-
cloud: {
|
108177
|
-
self: '默认使用框架内置的产品级 Web 服务器,是否调整?'
|
108178
|
-
},
|
108179
|
-
cdn: {
|
108180
|
-
self: '请选择 CDN 平台',
|
108181
|
-
oss: '阿里云 OSS',
|
108182
|
-
cos: '腾讯云 COS',
|
108183
|
-
no: '不使用 CDN'
|
108184
|
-
},
|
108185
|
-
lambda: {
|
108186
|
-
self: '请选择云函数平台',
|
108187
|
-
fc: '阿里云 FC',
|
108188
|
-
scf: '腾讯云 SCF',
|
108189
|
-
no: '不使用云函数部署'
|
108190
|
-
}
|
108191
|
-
}
|
108192
|
-
};
|
108193
|
-
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.2.3/node_modules/@modern-js/generator-common/dist/js/modern/locale/en.js
|
108194
|
-
const modern_locale_en_EN_LOCALE = {
|
108195
|
-
solution: {
|
108196
|
-
self: 'Please select the solution you want to create',
|
108197
|
-
mwa: 'MWA Solution',
|
108198
|
-
module: 'Module Solution',
|
108199
|
-
monorepo: 'Monorepo Solution',
|
108200
|
-
custom: 'Custom Solution',
|
108201
|
-
default: 'Default'
|
108202
|
-
},
|
108203
|
-
scenes: {
|
108204
|
-
self: 'Please select the scense you want to create'
|
108205
|
-
},
|
108206
|
-
sub_solution: {
|
108207
|
-
self: 'Please select the solution you want to create',
|
108208
|
-
mwa: 'MWA Solution',
|
108209
|
-
mwa_test: 'MWA Solution(Test)',
|
108210
|
-
module: 'Module Solution',
|
108211
|
-
inner_module: 'Module Solution(Inner)',
|
108212
|
-
monorepo: 'Monorepo Solution'
|
108213
|
-
},
|
108214
|
-
action: {
|
108215
|
-
self: 'Action',
|
108216
|
-
function: {
|
108217
|
-
self: 'Enable features',
|
108218
|
-
unbundle: 'Enable "Unbundled Development"',
|
108219
|
-
tailwindcss: 'Enable Tailwind CSS',
|
108220
|
-
less: 'Enable Less',
|
108221
|
-
sass: 'Enable Sass',
|
108222
|
-
bff: 'Enable "BFF"',
|
108223
|
-
micro_frontend: 'Enable "micro frontend"',
|
108224
|
-
electron: 'Enable "Electron"',
|
108225
|
-
i18n: 'Enable "Internationalization (i18n)"',
|
108226
|
-
test: 'Enable "Unit Test / Integration Test"',
|
108227
|
-
e2e_test: 'Enable "E2E Test"',
|
108228
|
-
doc: 'Enable "Document Station"',
|
108229
|
-
storybook: 'Enable "Storybook"',
|
108230
|
-
runtime_api: 'Enable "Runtime API"',
|
108231
|
-
mwa_storybook: 'Enable "Visual Testing (Storybook)"',
|
108232
|
-
ssg: 'Enable "SSG"',
|
108233
|
-
deploy: 'Enable "Deploy"'
|
108234
|
-
},
|
108235
|
-
element: {
|
108236
|
-
self: 'Create project element',
|
108237
|
-
entry: 'New "entry"',
|
108238
|
-
server: 'New "Server Custom" source code directory'
|
108239
|
-
},
|
108240
|
-
refactor: {
|
108241
|
-
self: 'Automatic refactor',
|
108242
|
-
bff_to_app: 'Transform BFF to frame mode'
|
108243
|
-
}
|
108244
|
-
},
|
108245
|
-
boolean: {
|
108246
|
-
yes: 'Yes',
|
108247
|
-
no: 'No'
|
108248
|
-
},
|
108249
|
-
language: {
|
108250
|
-
self: 'Development Language'
|
108251
|
-
},
|
108252
|
-
packageManager: {
|
108253
|
-
self: 'Package Management Tool'
|
108254
|
-
},
|
108255
|
-
packageName: {
|
108256
|
-
self: 'Package Name',
|
108257
|
-
sub_name: 'Package Name',
|
108258
|
-
no_empty: 'The package name cannot be empty!'
|
108259
|
-
},
|
108260
|
-
packagePath: {
|
108261
|
-
self: 'Package Path',
|
108262
|
-
no_empty: 'The package path cannot be empty!',
|
108263
|
-
format: 'Only lowercase letters, numbers and delimiters (-), and underscore(_), and directory delimiters (/) can be used in package path.'
|
108264
|
-
},
|
108265
|
-
runWay: {
|
108266
|
-
self: 'Do you need to support the following types of applications',
|
108267
|
-
no: 'Not Enabled',
|
108268
|
-
electron: 'Electron'
|
108269
|
-
},
|
108270
|
-
needModifyConfig: {
|
108271
|
-
self: 'Modify the Default Configuration?',
|
108272
|
-
enableLess: 'Enable Less?',
|
108273
|
-
enableSass: 'Enable Sass?'
|
108274
|
-
},
|
108275
|
-
entry: {
|
108276
|
-
name: 'Entry name',
|
108277
|
-
no_empty: 'The entry name cannot be empty!',
|
108278
|
-
no_pages: 'The entry name cannot be "pages"!',
|
108279
|
-
disableStateManagement: 'Disable App State Management?',
|
108280
|
-
clientRoute: {
|
108281
|
-
self: 'Client Routing',
|
108282
|
-
selfControlRoute: 'Enable Self Control Route',
|
108283
|
-
conventionalRoute: 'Enable Conventional Route',
|
108284
|
-
no: 'Not Enabled'
|
108285
|
-
}
|
108286
|
-
},
|
108287
|
-
framework: {
|
108288
|
-
self: 'Please select the framework you want to use',
|
108289
|
-
egg: 'Egg',
|
108290
|
-
express: 'Express',
|
108291
|
-
koa: 'Koa',
|
108292
|
-
nest: 'Nest'
|
108293
|
-
},
|
108294
|
-
bff: {
|
108295
|
-
bffType: {
|
108296
|
-
self: 'BFF Type',
|
108297
|
-
func: 'Function',
|
108298
|
-
framework: 'Framework'
|
108299
|
-
}
|
108300
|
-
},
|
108301
|
-
deploy: {
|
108302
|
-
cloud: {
|
108303
|
-
self: 'Modify the default Web Server?'
|
108304
|
-
},
|
108305
|
-
cdn: {
|
108306
|
-
self: 'Please select the cdn platform you want to use',
|
108307
|
-
oss: 'Aliyun OSS',
|
108308
|
-
cos: 'Tencent COS',
|
108309
|
-
no: 'Not Enabled'
|
108310
|
-
},
|
108311
|
-
lambda: {
|
108312
|
-
self: 'Please select the lambda you want to use',
|
108313
|
-
fc: 'Aliyun FC',
|
108314
|
-
scf: 'Tencent SCF',
|
108315
|
-
no: 'Not Enabled'
|
108316
|
-
}
|
108317
|
-
}
|
108318
|
-
};
|
108319
|
-
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.2.3/node_modules/@modern-js/generator-common/dist/js/modern/locale/index.js
|
108320
|
-
|
108321
|
-
|
108322
|
-
|
108323
|
-
const dist_js_modern_locale_i18n = new modern_I18n();
|
108324
|
-
const dist_js_modern_locale_localeKeys = dist_js_modern_locale_i18n.init('zh', {
|
108325
|
-
zh: modern_locale_zh_ZH_LOCALE,
|
108326
|
-
en: modern_locale_en_EN_LOCALE
|
108327
|
-
});
|
108328
|
-
|
108329
|
-
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.2.3/node_modules/@modern-js/generator-common/dist/js/modern/newAction/common/index.js
|
108330
|
-
|
108331
|
-
let common_ActionType;
|
108332
|
-
|
108333
|
-
(function (ActionType) {
|
108334
|
-
ActionType["Function"] = "function";
|
108335
|
-
ActionType["Element"] = "element";
|
108336
|
-
ActionType["Refactor"] = "refactor";
|
108337
|
-
})(common_ActionType || (common_ActionType = {}));
|
108338
|
-
|
108339
|
-
let common_ActionElement;
|
108340
|
-
|
108341
|
-
(function (ActionElement) {
|
108342
|
-
ActionElement["Entry"] = "entry";
|
108343
|
-
ActionElement["Server"] = "server";
|
108344
|
-
})(common_ActionElement || (common_ActionElement = {}));
|
108345
|
-
|
108346
|
-
let common_ActionFunction;
|
108347
|
-
|
108348
|
-
(function (ActionFunction) {
|
108349
|
-
ActionFunction["UnBundle"] = "unbundle";
|
108350
|
-
ActionFunction["TailwindCSS"] = "tailwindcss";
|
108351
|
-
ActionFunction["Less"] = "less";
|
108352
|
-
ActionFunction["Sass"] = "sass";
|
108353
|
-
ActionFunction["BFF"] = "bff";
|
108354
|
-
ActionFunction["MicroFrontend"] = "micro_frontend";
|
108355
|
-
ActionFunction["Electron"] = "electron";
|
108356
|
-
ActionFunction["I18n"] = "i18n";
|
108357
|
-
ActionFunction["Test"] = "test";
|
108358
|
-
ActionFunction["E2ETest"] = "e2e_test";
|
108359
|
-
ActionFunction["Doc"] = "doc";
|
108360
|
-
ActionFunction["Storybook"] = "storybook";
|
108361
|
-
ActionFunction["RuntimeApi"] = "runtimeApi";
|
108362
|
-
ActionFunction["SSG"] = "ssg";
|
108363
|
-
ActionFunction["Deploy"] = "deploy";
|
108364
|
-
})(common_ActionFunction || (common_ActionFunction = {}));
|
108365
|
-
|
108366
|
-
let common_ActionRefactor;
|
108367
|
-
|
108368
|
-
(function (ActionRefactor) {
|
108369
|
-
ActionRefactor["BFFToApp"] = "bff_to_app";
|
108370
|
-
})(common_ActionRefactor || (common_ActionRefactor = {}));
|
108371
|
-
|
108372
|
-
const common_ActionTypeText = {
|
108373
|
-
[common_ActionType.Function]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].self),
|
108374
|
-
[common_ActionType.Element]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action.element.self),
|
108375
|
-
[common_ActionType.Refactor]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action.refactor.self)
|
108376
|
-
};
|
108377
|
-
const common_ActionElementText = {
|
108378
|
-
[common_ActionElement.Entry]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action.element.entry),
|
108379
|
-
[common_ActionElement.Server]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action.element.server)
|
108380
|
-
};
|
108381
|
-
const common_ActionFunctionText = {
|
108382
|
-
[common_ActionFunction.UnBundle]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].unbundle),
|
108383
|
-
[common_ActionFunction.TailwindCSS]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].tailwindcss),
|
108384
|
-
[common_ActionFunction.Less]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].less),
|
108385
|
-
[common_ActionFunction.Sass]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].sass),
|
108386
|
-
[common_ActionFunction.BFF]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].bff),
|
108387
|
-
[common_ActionFunction.MicroFrontend]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].micro_frontend),
|
108388
|
-
[common_ActionFunction.Electron]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].electron),
|
108389
|
-
[common_ActionFunction.I18n]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].i18n),
|
108390
|
-
[common_ActionFunction.Test]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].test),
|
108391
|
-
[common_ActionFunction.E2ETest]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].e2e_test),
|
108392
|
-
[common_ActionFunction.Doc]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].doc),
|
108393
|
-
[common_ActionFunction.Storybook]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].storybook),
|
108394
|
-
[common_ActionFunction.RuntimeApi]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].runtime_api),
|
108395
|
-
[common_ActionFunction.SSG]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].ssg),
|
108396
|
-
[common_ActionFunction.Deploy]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].deploy)
|
108397
|
-
};
|
108398
|
-
const common_ActionRefactorText = {
|
108399
|
-
[common_ActionRefactor.BFFToApp]: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action.refactor.bff_to_app)
|
108400
|
-
};
|
108401
|
-
const common_ActionTypeTextMap = {
|
108402
|
-
[common_ActionType.Element]: common_ActionElementText,
|
108403
|
-
[common_ActionType.Function]: common_ActionFunctionText,
|
108404
|
-
[common_ActionType.Refactor]: common_ActionRefactorText
|
108405
|
-
};
|
108406
|
-
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+generator-common@1.2.3/node_modules/@modern-js/generator-common/dist/js/modern/newAction/mwa/index.js
|
108407
|
-
|
108408
|
-
|
108409
|
-
const mwa_MWAActionTypes = [common_ActionType.Element, common_ActionType.Function // ActionType.Refactor,
|
108410
|
-
];
|
108411
|
-
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,
|
108412
|
-
common_ActionFunction.Test, common_ActionFunction.Storybook, // ActionFunction.E2ETest,
|
108413
|
-
// ActionFunction.Doc,
|
108414
|
-
common_ActionFunction.Deploy];
|
108415
|
-
const mwa_MWAActionElements = [common_ActionElement.Entry, common_ActionElement.Server];
|
108416
|
-
const mwa_MWAActionReactors = [common_ActionRefactor.BFFToApp];
|
108417
|
-
const mwa_MWAActionTypesMap = {
|
108418
|
-
[common_ActionType.Element]: mwa_MWAActionElements,
|
108419
|
-
[common_ActionType.Function]: mwa_MWAActionFunctions,
|
108420
|
-
[common_ActionType.Refactor]: mwa_MWAActionReactors
|
108421
|
-
};
|
108422
|
-
const mwa_MWASpecialSchemaMap = {
|
108423
|
-
[common_ActionFunction.Storybook]: {
|
108424
|
-
key: common_ActionFunction.Storybook,
|
108425
|
-
label: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action["function"].mwa_storybook)
|
108426
|
-
}
|
108427
|
-
};
|
108428
|
-
const mwa_MWANewActionSchema = {
|
108429
|
-
key: 'mwa_new_action',
|
108430
|
-
isObject: true,
|
108431
|
-
items: [{
|
108432
|
-
key: 'actionType',
|
108433
|
-
label: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action.self),
|
108434
|
-
type: ['string'],
|
108435
|
-
mutualExclusion: true,
|
108436
|
-
items: mwa_MWAActionTypes.map(type => ({
|
108437
|
-
key: type,
|
108438
|
-
label: common_ActionTypeText[type],
|
108439
|
-
type: ['string'],
|
108440
|
-
mutualExclusion: true,
|
108441
|
-
items: mwa_MWAActionTypesMap[type].map(item => mwa_MWASpecialSchemaMap[item] || {
|
108442
|
-
key: item,
|
108443
|
-
label: common_ActionTypeTextMap[type][item]
|
108444
|
-
})
|
108445
|
-
}))
|
108446
|
-
}]
|
108447
|
-
};
|
108448
|
-
const mwa_MWAActionFunctionsDevDependencies = {
|
108449
|
-
[common_ActionFunction.UnBundle]: '@modern-js/plugin-unbundle',
|
108450
|
-
[common_ActionFunction.TailwindCSS]: '@modern-js/plugin-tailwindcss',
|
108451
|
-
[common_ActionFunction.Test]: '@modern-js/plugin-testing',
|
108452
|
-
[common_ActionFunction.E2ETest]: '@modern-js/plugin-e2e',
|
108453
|
-
[common_ActionFunction.Doc]: '@modern-js/plugin-docsite',
|
108454
|
-
[common_ActionFunction.Electron]: '@modern-js/plugin-electron',
|
108455
|
-
[common_ActionFunction.Storybook]: '@modern-js/plugin-storybook'
|
108456
|
-
};
|
108457
|
-
const mwa_MWAActionFunctionsDependencies = {
|
108458
|
-
[common_ActionFunction.Less]: '@modern-js/plugin-less',
|
108459
|
-
[common_ActionFunction.Sass]: '@modern-js/plugin-sass',
|
108460
|
-
[common_ActionFunction.BFF]: '@modern-js/plugin-bff',
|
108461
|
-
[common_ActionFunction.MicroFrontend]: '@modern-js/plugin-micro-frontend',
|
108462
|
-
[common_ActionFunction.I18n]: '@modern-js/plugin-i18n',
|
108463
|
-
[common_ActionFunction.SSG]: '@modern-js/plugin-ssg'
|
108464
|
-
};
|
108465
|
-
const mwa_MWANewActionGenerators = {
|
108466
|
-
[common_ActionType.Element]: {
|
108467
|
-
[common_ActionElement.Entry]: '@modern-js/entry-generator',
|
108468
|
-
[common_ActionElement.Server]: '@modern-js/server-generator'
|
108469
|
-
},
|
108470
|
-
[common_ActionType.Function]: {
|
108471
|
-
[common_ActionFunction.UnBundle]: '@modern-js/unbundle-generator',
|
108472
|
-
[common_ActionFunction.TailwindCSS]: '@modern-js/tailwindcss-generator',
|
108473
|
-
[common_ActionFunction.Less]: '@modern-js/dependence-generator',
|
108474
|
-
[common_ActionFunction.Sass]: '@modern-js/dependence-generator',
|
108475
|
-
[common_ActionFunction.BFF]: '@modern-js/bff-generator',
|
108476
|
-
[common_ActionFunction.MicroFrontend]: '@modern-js/dependence-generator',
|
108477
|
-
[common_ActionFunction.Electron]: '@modern-js/electron-generator',
|
108478
|
-
[common_ActionFunction.I18n]: '@modern-js/dependence-generator',
|
108479
|
-
[common_ActionFunction.Test]: '@modern-js/test-generator',
|
108480
|
-
[common_ActionFunction.E2ETest]: '@modern-js/dependence-generator',
|
108481
|
-
[common_ActionFunction.Doc]: '@modern-js/dependence-generator',
|
108482
|
-
[common_ActionFunction.Storybook]: '@modern-js/dependence-generator',
|
108483
|
-
[common_ActionFunction.SSG]: '@modern-js/ssg-generator',
|
108484
|
-
[common_ActionFunction.Deploy]: '@modern-js/cloud-deploy-generator'
|
108485
|
-
},
|
108486
|
-
[common_ActionType.Refactor]: {
|
108487
|
-
[common_ActionRefactor.BFFToApp]: '@modern-js/bff-refactor-generator'
|
108488
|
-
}
|
108489
|
-
};
|
108490
|
-
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+utils@1.1.6_typescript@4.5.4/node_modules/@modern-js/utils/dist/js/modern/nodeEnv.js
|
108063
|
+
;// CONCATENATED MODULE: ../../../toolkit/utils/dist/js/modern/nodeEnv.js
|
108491
108064
|
|
108492
108065
|
async function nodeEnv_canUseNpm() {
|
108493
108066
|
try {
|
@@ -108519,7 +108092,7 @@ async function nodeEnv_canUsePnpm() {
|
|
108519
108092
|
return false;
|
108520
108093
|
}
|
108521
108094
|
}
|
108522
|
-
;// CONCATENATED MODULE:
|
108095
|
+
;// CONCATENATED MODULE: ../../generator-utils/dist/js/modern/utils/strip-ansi.js
|
108523
108096
|
function ansiRegex({
|
108524
108097
|
onlyFirst = false
|
108525
108098
|
} = {}) {
|
@@ -108534,7 +108107,7 @@ function stripAnsi(string) {
|
|
108534
108107
|
|
108535
108108
|
return string.replace(ansiRegex(), '');
|
108536
108109
|
}
|
108537
|
-
;// CONCATENATED MODULE:
|
108110
|
+
;// CONCATENATED MODULE: ../../generator-utils/dist/js/modern/index.js
|
108538
108111
|
|
108539
108112
|
|
108540
108113
|
|
@@ -108667,7 +108240,7 @@ function getMWAProjectPath(packagePath, isMonorepoSubProject, isTest = false) {
|
|
108667
108240
|
|
108668
108241
|
return '';
|
108669
108242
|
}
|
108670
|
-
;// CONCATENATED MODULE:
|
108243
|
+
;// CONCATENATED MODULE: ../../../toolkit/utils/dist/js/modern/getPackageManager.js
|
108671
108244
|
|
108672
108245
|
|
108673
108246
|
|
@@ -110106,7 +109679,7 @@ var dist_lib = JSON5;
|
|
110106
109679
|
|
110107
109680
|
/* harmony default export */ const json5_dist = (dist_lib);
|
110108
109681
|
|
110109
|
-
;// CONCATENATED MODULE:
|
109682
|
+
;// CONCATENATED MODULE: ../../new-action/dist/js/modern/utils/index.js
|
110110
109683
|
|
110111
109684
|
|
110112
109685
|
|
@@ -110155,7 +109728,7 @@ function hasEnabledFunction(action, dependencies, devDependencies, peerDependenc
|
|
110155
109728
|
|
110156
109729
|
return false;
|
110157
109730
|
}
|
110158
|
-
;// CONCATENATED MODULE:
|
109731
|
+
;// CONCATENATED MODULE: ../../new-action/dist/js/modern/mwa.js
|
110159
109732
|
|
110160
109733
|
|
110161
109734
|
|
@@ -110180,7 +109753,7 @@ const MWANewAction = async options => {
|
|
110180
109753
|
throw new Error('config is not a valid json');
|
110181
109754
|
}
|
110182
109755
|
|
110183
|
-
|
109756
|
+
modern_locale_i18n.changeLanguage({
|
110184
109757
|
locale: UserConfig.locale || locale
|
110185
109758
|
});
|
110186
109759
|
const smith = new CodeSmith({
|
@@ -110203,9 +109776,9 @@ const MWANewAction = async options => {
|
|
110203
109776
|
data: {},
|
110204
109777
|
current: null
|
110205
109778
|
}, mockGeneratorCore);
|
110206
|
-
const schema = forEach(
|
110207
|
-
if (
|
110208
|
-
const enable = hasEnabledFunction(schemaItem.key,
|
109779
|
+
const schema = forEach(MWANewActionSchema, schemaItem => {
|
109780
|
+
if (MWAActionFunctions.includes(schemaItem.key)) {
|
109781
|
+
const enable = hasEnabledFunction(schemaItem.key, MWAActionFunctionsDependencies, MWAActionFunctionsDevDependencies, {}, cwd);
|
110209
109782
|
const {
|
110210
109783
|
when
|
110211
109784
|
} = schemaItem;
|
@@ -110215,7 +109788,7 @@ const MWANewAction = async options => {
|
|
110215
109788
|
const ans = await appAPI.getInputBySchema(schema, UserConfig);
|
110216
109789
|
const actionType = ans.actionType;
|
110217
109790
|
const action = ans[actionType];
|
110218
|
-
let generator =
|
109791
|
+
let generator = MWANewActionGenerators[actionType][action];
|
110219
109792
|
|
110220
109793
|
if (!generator) {
|
110221
109794
|
throw new Error(`no valid option`);
|
@@ -110225,8 +109798,8 @@ const MWANewAction = async options => {
|
|
110225
109798
|
generator = `${generator}@${distTag}`;
|
110226
109799
|
}
|
110227
109800
|
|
110228
|
-
const devDependency =
|
110229
|
-
const dependency =
|
109801
|
+
const devDependency = MWAActionFunctionsDevDependencies[action];
|
109802
|
+
const dependency = MWAActionFunctionsDependencies[action];
|
110230
109803
|
|
110231
109804
|
const finalConfig = merge_default()(UserConfig, ans, {
|
110232
109805
|
locale: UserConfig.locale || locale,
|
@@ -110237,7 +109810,8 @@ const MWANewAction = async options => {
|
|
110237
109810
|
} : {},
|
110238
109811
|
dependencies: dependency ? {
|
110239
109812
|
[dependency]: `^${await getPackageVersion(dependency)}`
|
110240
|
-
} : {}
|
109813
|
+
} : {},
|
109814
|
+
appendTypeContent: MWAActionFunctionsAppendTypeContent[action]
|
110241
109815
|
});
|
110242
109816
|
|
110243
109817
|
const task = [{
|
@@ -110252,66 +109826,7 @@ const MWANewAction = async options => {
|
|
110252
109826
|
pwd: cwd
|
110253
109827
|
});
|
110254
109828
|
};
|
110255
|
-
;// CONCATENATED MODULE:
|
110256
|
-
|
110257
|
-
|
110258
|
-
const module_ModuleActionTypes = [common_ActionType.Function];
|
110259
|
-
const module_ModuleActionFunctions = [common_ActionFunction.TailwindCSS, common_ActionFunction.Less, common_ActionFunction.Sass, // ActionFunction.I18n,
|
110260
|
-
// ActionFunction.Doc,
|
110261
|
-
common_ActionFunction.Storybook, common_ActionFunction.RuntimeApi];
|
110262
|
-
const module_ModuleActionTypesMap = {
|
110263
|
-
[common_ActionType.Function]: module_ModuleActionFunctions
|
110264
|
-
};
|
110265
|
-
const module_ModuleSpecialSchemaMap = {};
|
110266
|
-
const module_ModuleNewActionSchema = {
|
110267
|
-
key: 'Module_new_action',
|
110268
|
-
isObject: true,
|
110269
|
-
items: [{
|
110270
|
-
key: 'actionType',
|
110271
|
-
label: () => dist_js_modern_locale_i18n.t(dist_js_modern_locale_localeKeys.action.self),
|
110272
|
-
type: ['string'],
|
110273
|
-
mutualExclusion: true,
|
110274
|
-
items: module_ModuleActionTypes.map(type => ({
|
110275
|
-
key: type,
|
110276
|
-
label: common_ActionTypeText[type],
|
110277
|
-
type: ['string'],
|
110278
|
-
mutualExclusion: true,
|
110279
|
-
items: module_ModuleActionFunctions.map(func => module_ModuleSpecialSchemaMap[func] || {
|
110280
|
-
key: func,
|
110281
|
-
label: common_ActionFunctionText[func]
|
110282
|
-
})
|
110283
|
-
}))
|
110284
|
-
}]
|
110285
|
-
};
|
110286
|
-
const module_ModuleActionFunctionsDevDependencies = {
|
110287
|
-
[common_ActionFunction.Doc]: '@modern-js/plugin-docsite',
|
110288
|
-
[common_ActionFunction.Storybook]: '@modern-js/plugin-storybook',
|
110289
|
-
[common_ActionFunction.RuntimeApi]: '@modern-js/runtime',
|
110290
|
-
[common_ActionFunction.TailwindCSS]: 'tailwindcss'
|
110291
|
-
};
|
110292
|
-
const module_ModuleActionFunctionsPeerDependencies = {
|
110293
|
-
[common_ActionFunction.RuntimeApi]: '@modern-js/runtime',
|
110294
|
-
[common_ActionFunction.TailwindCSS]: 'tailwindcss'
|
110295
|
-
};
|
110296
|
-
const module_ModuleActionFunctionsDependencies = {
|
110297
|
-
[common_ActionFunction.I18n]: '@modern-js/plugin-i18n',
|
110298
|
-
[common_ActionFunction.TailwindCSS]: '@modern-js/plugin-tailwindcss',
|
110299
|
-
[common_ActionFunction.Less]: '@modern-js/plugin-less',
|
110300
|
-
[common_ActionFunction.Sass]: '@modern-js/plugin-sass'
|
110301
|
-
};
|
110302
|
-
const module_ModuleNewActionGenerators = {
|
110303
|
-
[common_ActionType.Function]: {
|
110304
|
-
[common_ActionFunction.TailwindCSS]: '@modern-js/dependence-generator',
|
110305
|
-
[common_ActionFunction.Less]: '@modern-js/dependence-generator',
|
110306
|
-
[common_ActionFunction.Sass]: '@modern-js/dependence-generator',
|
110307
|
-
[common_ActionFunction.I18n]: '@modern-js/dependence-generator',
|
110308
|
-
[common_ActionFunction.Test]: '@modern-js/dependence-generator',
|
110309
|
-
[common_ActionFunction.Doc]: '@modern-js/dependence-generator',
|
110310
|
-
[common_ActionFunction.Storybook]: '@modern-js/storybook-generator',
|
110311
|
-
[common_ActionFunction.RuntimeApi]: '@modern-js/dependence-generator'
|
110312
|
-
}
|
110313
|
-
};
|
110314
|
-
;// CONCATENATED MODULE: ../../../../node_modules/.pnpm/@modern-js+new-action@1.2.2_typescript@4.5.4/node_modules/@modern-js/new-action/dist/js/modern/module.js
|
109829
|
+
;// CONCATENATED MODULE: ../../new-action/dist/js/modern/module.js
|
110315
109830
|
|
110316
109831
|
|
110317
109832
|
|
@@ -110336,7 +109851,7 @@ const ModuleNewAction = async options => {
|
|
110336
109851
|
throw new Error('config is not a valid json');
|
110337
109852
|
}
|
110338
109853
|
|
110339
|
-
|
109854
|
+
modern_locale_i18n.changeLanguage({
|
110340
109855
|
locale: UserConfig.locale || locale
|
110341
109856
|
});
|
110342
109857
|
const smith = new CodeSmith({
|
@@ -110360,9 +109875,9 @@ const ModuleNewAction = async options => {
|
|
110360
109875
|
current: null
|
110361
109876
|
}, mockGeneratorCore);
|
110362
109877
|
let hasOption = false;
|
110363
|
-
const schema = forEach(
|
110364
|
-
if (
|
110365
|
-
const enable = hasEnabledFunction(schemaItem.key,
|
109878
|
+
const schema = forEach(ModuleNewActionSchema, schemaItem => {
|
109879
|
+
if (ModuleActionFunctions.includes(schemaItem.key)) {
|
109880
|
+
const enable = hasEnabledFunction(schemaItem.key, ModuleActionFunctionsDependencies, ModuleActionFunctionsDevDependencies, ModuleActionFunctionsPeerDependencies, cwd);
|
110366
109881
|
const {
|
110367
109882
|
when
|
110368
109883
|
} = schemaItem;
|
@@ -110383,7 +109898,7 @@ const ModuleNewAction = async options => {
|
|
110383
109898
|
const ans = await appAPI.getInputBySchema(schema, UserConfig);
|
110384
109899
|
const actionType = ans.actionType;
|
110385
109900
|
const action = ans[actionType];
|
110386
|
-
let generator =
|
109901
|
+
let generator = ModuleNewActionGenerators[actionType] && ModuleNewActionGenerators[actionType][action];
|
110387
109902
|
|
110388
109903
|
if (!generator) {
|
110389
109904
|
throw new Error(`no valid option`);
|
@@ -110393,9 +109908,9 @@ const ModuleNewAction = async options => {
|
|
110393
109908
|
generator = `${generator}@${distTag}`;
|
110394
109909
|
}
|
110395
109910
|
|
110396
|
-
const devDependency =
|
110397
|
-
const dependency =
|
110398
|
-
const peerDependency =
|
109911
|
+
const devDependency = ModuleActionFunctionsDevDependencies[action];
|
109912
|
+
const dependency = ModuleActionFunctionsDependencies[action];
|
109913
|
+
const peerDependency = ModuleActionFunctionsPeerDependencies[action];
|
110399
109914
|
|
110400
109915
|
const finalConfig = merge_default()(UserConfig, ans, {
|
110401
109916
|
locale: UserConfig.locale || locale,
|
@@ -110424,7 +109939,7 @@ const ModuleNewAction = async options => {
|
|
110424
109939
|
pwd: cwd
|
110425
109940
|
});
|
110426
109941
|
};
|
110427
|
-
;// CONCATENATED MODULE:
|
109942
|
+
;// CONCATENATED MODULE: ../../new-action/dist/js/modern/monorepo.js
|
110428
109943
|
|
110429
109944
|
|
110430
109945
|
|
@@ -110449,7 +109964,7 @@ const MonorepoNewAction = async options => {
|
|
110449
109964
|
throw new Error('config is not a valid json');
|
110450
109965
|
}
|
110451
109966
|
|
110452
|
-
|
109967
|
+
modern_locale_i18n.changeLanguage({
|
110453
109968
|
locale: UserConfig.locale || locale
|
110454
109969
|
});
|
110455
109970
|
const smith = new CodeSmith({
|
@@ -110472,7 +109987,7 @@ const MonorepoNewAction = async options => {
|
|
110472
109987
|
let generator = REPO_GENERAROE;
|
110473
109988
|
|
110474
109989
|
if (process.env.CODESMITH_ENV === 'development') {
|
110475
|
-
generator = /*require.resolve*/(__webpack_require__(
|
109990
|
+
generator = /*require.resolve*/(__webpack_require__(30794).resolve(generator));
|
110476
109991
|
} else if (distTag) {
|
110477
109992
|
generator = `${generator}@${distTag}`;
|
110478
109993
|
}
|
@@ -111395,6 +110910,21 @@ module.exports = webpackEmptyContext;
|
|
111395
110910
|
|
111396
110911
|
/***/ }),
|
111397
110912
|
|
110913
|
+
/***/ 30794:
|
110914
|
+
/***/ ((module) => {
|
110915
|
+
|
110916
|
+
function webpackEmptyContext(req) {
|
110917
|
+
var e = new Error("Cannot find module '" + req + "'");
|
110918
|
+
e.code = 'MODULE_NOT_FOUND';
|
110919
|
+
throw e;
|
110920
|
+
}
|
110921
|
+
webpackEmptyContext.keys = () => ([]);
|
110922
|
+
webpackEmptyContext.resolve = webpackEmptyContext;
|
110923
|
+
webpackEmptyContext.id = 30794;
|
110924
|
+
module.exports = webpackEmptyContext;
|
110925
|
+
|
110926
|
+
/***/ }),
|
110927
|
+
|
111398
110928
|
/***/ 39491:
|
111399
110929
|
/***/ ((module) => {
|
111400
110930
|
|
@@ -111751,7 +111281,7 @@ var _codesmithApiApp = __webpack_require__(83028);
|
|
111751
111281
|
|
111752
111282
|
var _generatorCommon = __webpack_require__(50828);
|
111753
111283
|
|
111754
|
-
var _generatorPlugin = __webpack_require__(
|
111284
|
+
var _generatorPlugin = __webpack_require__(99457);
|
111755
111285
|
|
111756
111286
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
111757
111287
|
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "1.
|
14
|
+
"version": "1.3.0",
|
15
15
|
"jsnext:source": "./src/index.ts",
|
16
16
|
"main": "./dist/js/node/main.js",
|
17
17
|
"files": [
|
@@ -26,20 +26,21 @@
|
|
26
26
|
"@modern-js/codesmith": "^1.0.8",
|
27
27
|
"@modern-js/codesmith-api-app": "^1.0.7",
|
28
28
|
"@modern-js/codesmith-tools": "^1.0.8",
|
29
|
-
"@modern-js/generator-common": "^1.
|
30
|
-
"@modern-js/generator-utils": "^1.
|
31
|
-
"@modern-js/module-generator": "^1.
|
32
|
-
"@modern-js/monorepo-generator": "^1.
|
33
|
-
"@modern-js/mwa-generator": "^1.
|
34
|
-
"@modern-js/base-generator": "^1.
|
35
|
-
"@modern-js/generator-plugin": "^1.
|
29
|
+
"@modern-js/generator-common": "^1.3.0",
|
30
|
+
"@modern-js/generator-utils": "^1.2.0",
|
31
|
+
"@modern-js/module-generator": "^1.3.0",
|
32
|
+
"@modern-js/monorepo-generator": "^1.3.0",
|
33
|
+
"@modern-js/mwa-generator": "^1.3.0",
|
34
|
+
"@modern-js/base-generator": "^1.3.0",
|
35
|
+
"@modern-js/generator-plugin": "^1.2.0",
|
36
36
|
"@types/jest": "^26",
|
37
37
|
"@types/lodash": "^4.14.168",
|
38
38
|
"@types/node": "^14",
|
39
39
|
"lodash": "^4.17.21",
|
40
40
|
"typescript": "^4",
|
41
|
-
"@
|
42
|
-
"
|
41
|
+
"@scripts/build": "0.0.0",
|
42
|
+
"jest": "^27",
|
43
|
+
"@scripts/jest-config": "0.0.0"
|
43
44
|
},
|
44
45
|
"sideEffects": false,
|
45
46
|
"modernConfig": {
|
@@ -52,11 +53,12 @@
|
|
52
53
|
"registry": "https://registry.npmjs.org/",
|
53
54
|
"access": "public"
|
54
55
|
},
|
56
|
+
"types": "./src/index.ts",
|
55
57
|
"scripts": {
|
56
58
|
"new": "modern new",
|
57
59
|
"build": "modern build",
|
58
60
|
"build:csmith": "csmith-tools build",
|
59
|
-
"test": "
|
61
|
+
"test": "jest --passWithNoTests"
|
60
62
|
},
|
61
63
|
"readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
|
62
64
|
}
|