@modern-js/repo-generator 3.4.16 → 3.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +446 -444
- package/package.json +10 -10
- package/src/index.ts +6 -6
package/dist/index.js
CHANGED
@@ -68874,7 +68874,6 @@ __export(src_exports, {
|
|
68874
68874
|
default: () => src_default
|
68875
68875
|
});
|
68876
68876
|
module.exports = __toCommonJS(src_exports);
|
68877
|
-
var import_lodash14 = require("@modern-js/utils/lodash");
|
68878
68877
|
|
68879
68878
|
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
|
68880
68879
|
var LoggerLevel;
|
@@ -83724,98 +83723,6 @@ var I18n2 = class {
|
|
83724
83723
|
}
|
83725
83724
|
};
|
83726
83725
|
|
83727
|
-
// ../../generator-common/dist/esm-node/locale/zh.js
|
83728
|
-
var ZH_LOCALE2 = {
|
83729
|
-
solution: {
|
83730
|
-
self: "请选择你想创建的工程类型",
|
83731
|
-
mwa: "Web 应用",
|
83732
|
-
module: "Npm 模块",
|
83733
|
-
custom: "自定义",
|
83734
|
-
default: "默认"
|
83735
|
-
},
|
83736
|
-
scenes: {
|
83737
|
-
self: "请选择项目场景"
|
83738
|
-
},
|
83739
|
-
sub_solution: {
|
83740
|
-
self: "请选择你想创建的工程类型",
|
83741
|
-
mwa: "Web 应用",
|
83742
|
-
module: "Npm 模块"
|
83743
|
-
},
|
83744
|
-
action: {
|
83745
|
-
self: "请选择你想要的操作",
|
83746
|
-
function: {
|
83747
|
-
self: "启用可选功能",
|
83748
|
-
question: "请选择功能名称",
|
83749
|
-
tailwindcss: "启用「Tailwind CSS」 支持",
|
83750
|
-
bff: "启用「BFF」功能",
|
83751
|
-
micro_frontend: "启用「微前端」模式",
|
83752
|
-
i18n: "启用「国际化(i18n)」功能",
|
83753
|
-
storybookV7: "启用「Storybook」V7",
|
83754
|
-
runtime_api: "启用「Runtime API」",
|
83755
|
-
ssg: "启用「SSG」功能",
|
83756
|
-
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
83757
|
-
proxy: "启用「全局代理」",
|
83758
|
-
swc: "启用「SWC 编译」",
|
83759
|
-
module_doc: "启动「模块文档」功能"
|
83760
|
-
},
|
83761
|
-
element: {
|
83762
|
-
self: "创建工程元素",
|
83763
|
-
question: "请选择创建元素类型",
|
83764
|
-
entry: "新建「应用入口」",
|
83765
|
-
server: "新建「自定义 Web Server」源码目录"
|
83766
|
-
},
|
83767
|
-
refactor: {
|
83768
|
-
self: "自动重构",
|
83769
|
-
question: "请选择重构类型",
|
83770
|
-
react_router_5: "使用 React Router v5"
|
83771
|
-
}
|
83772
|
-
},
|
83773
|
-
boolean: {
|
83774
|
-
yes: "是",
|
83775
|
-
no: "否"
|
83776
|
-
},
|
83777
|
-
language: {
|
83778
|
-
self: "请选择开发语言"
|
83779
|
-
},
|
83780
|
-
packageManager: {
|
83781
|
-
self: "请选择包管理工具"
|
83782
|
-
},
|
83783
|
-
entry: {
|
83784
|
-
name: "请填写入口名称",
|
83785
|
-
no_empty: "入口名称不能为空!",
|
83786
|
-
no_pages: '入口名称不支持 "pages"!'
|
83787
|
-
},
|
83788
|
-
packageName: {
|
83789
|
-
self: "请填写项目名称",
|
83790
|
-
sub_name: "请填写子项目名称",
|
83791
|
-
no_empty: "项目名称不能为空!"
|
83792
|
-
},
|
83793
|
-
packagePath: {
|
83794
|
-
self: "请填写子项目目录名称",
|
83795
|
-
no_empty: "目录名称不能为空!",
|
83796
|
-
format: "目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)"
|
83797
|
-
},
|
83798
|
-
framework: {
|
83799
|
-
self: "请选择运行时框架",
|
83800
|
-
egg: "Egg",
|
83801
|
-
express: "Express",
|
83802
|
-
koa: "Koa",
|
83803
|
-
nest: "Nest"
|
83804
|
-
},
|
83805
|
-
bff: {
|
83806
|
-
bffType: {
|
83807
|
-
self: "请选择 BFF 类型",
|
83808
|
-
func: "函数模式",
|
83809
|
-
framework: "框架模式"
|
83810
|
-
}
|
83811
|
-
},
|
83812
|
-
buildTools: {
|
83813
|
-
self: "请选择构建工具",
|
83814
|
-
webpack: "webpack",
|
83815
|
-
rspack: "Rspack (实验性)"
|
83816
|
-
}
|
83817
|
-
};
|
83818
|
-
|
83819
83726
|
// ../../generator-common/dist/esm-node/locale/en.js
|
83820
83727
|
var EN_LOCALE2 = {
|
83821
83728
|
solution: {
|
@@ -83908,6 +83815,98 @@ var EN_LOCALE2 = {
|
|
83908
83815
|
}
|
83909
83816
|
};
|
83910
83817
|
|
83818
|
+
// ../../generator-common/dist/esm-node/locale/zh.js
|
83819
|
+
var ZH_LOCALE2 = {
|
83820
|
+
solution: {
|
83821
|
+
self: "请选择你想创建的工程类型",
|
83822
|
+
mwa: "Web 应用",
|
83823
|
+
module: "Npm 模块",
|
83824
|
+
custom: "自定义",
|
83825
|
+
default: "默认"
|
83826
|
+
},
|
83827
|
+
scenes: {
|
83828
|
+
self: "请选择项目场景"
|
83829
|
+
},
|
83830
|
+
sub_solution: {
|
83831
|
+
self: "请选择你想创建的工程类型",
|
83832
|
+
mwa: "Web 应用",
|
83833
|
+
module: "Npm 模块"
|
83834
|
+
},
|
83835
|
+
action: {
|
83836
|
+
self: "请选择你想要的操作",
|
83837
|
+
function: {
|
83838
|
+
self: "启用可选功能",
|
83839
|
+
question: "请选择功能名称",
|
83840
|
+
tailwindcss: "启用「Tailwind CSS」 支持",
|
83841
|
+
bff: "启用「BFF」功能",
|
83842
|
+
micro_frontend: "启用「微前端」模式",
|
83843
|
+
i18n: "启用「国际化(i18n)」功能",
|
83844
|
+
storybookV7: "启用「Storybook」V7",
|
83845
|
+
runtime_api: "启用「Runtime API」",
|
83846
|
+
ssg: "启用「SSG」功能",
|
83847
|
+
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
83848
|
+
proxy: "启用「全局代理」",
|
83849
|
+
swc: "启用「SWC 编译」",
|
83850
|
+
module_doc: "启动「模块文档」功能"
|
83851
|
+
},
|
83852
|
+
element: {
|
83853
|
+
self: "创建工程元素",
|
83854
|
+
question: "请选择创建元素类型",
|
83855
|
+
entry: "新建「应用入口」",
|
83856
|
+
server: "新建「自定义 Web Server」源码目录"
|
83857
|
+
},
|
83858
|
+
refactor: {
|
83859
|
+
self: "自动重构",
|
83860
|
+
question: "请选择重构类型",
|
83861
|
+
react_router_5: "使用 React Router v5"
|
83862
|
+
}
|
83863
|
+
},
|
83864
|
+
boolean: {
|
83865
|
+
yes: "是",
|
83866
|
+
no: "否"
|
83867
|
+
},
|
83868
|
+
language: {
|
83869
|
+
self: "请选择开发语言"
|
83870
|
+
},
|
83871
|
+
packageManager: {
|
83872
|
+
self: "请选择包管理工具"
|
83873
|
+
},
|
83874
|
+
entry: {
|
83875
|
+
name: "请填写入口名称",
|
83876
|
+
no_empty: "入口名称不能为空!",
|
83877
|
+
no_pages: '入口名称不支持 "pages"!'
|
83878
|
+
},
|
83879
|
+
packageName: {
|
83880
|
+
self: "请填写项目名称",
|
83881
|
+
sub_name: "请填写子项目名称",
|
83882
|
+
no_empty: "项目名称不能为空!"
|
83883
|
+
},
|
83884
|
+
packagePath: {
|
83885
|
+
self: "请填写子项目目录名称",
|
83886
|
+
no_empty: "目录名称不能为空!",
|
83887
|
+
format: "目录名称只能使用小写字母、数字和分隔线(-)、下划线(_)和目录分隔符(/)"
|
83888
|
+
},
|
83889
|
+
framework: {
|
83890
|
+
self: "请选择运行时框架",
|
83891
|
+
egg: "Egg",
|
83892
|
+
express: "Express",
|
83893
|
+
koa: "Koa",
|
83894
|
+
nest: "Nest"
|
83895
|
+
},
|
83896
|
+
bff: {
|
83897
|
+
bffType: {
|
83898
|
+
self: "请选择 BFF 类型",
|
83899
|
+
func: "函数模式",
|
83900
|
+
framework: "框架模式"
|
83901
|
+
}
|
83902
|
+
},
|
83903
|
+
buildTools: {
|
83904
|
+
self: "请选择构建工具",
|
83905
|
+
webpack: "webpack",
|
83906
|
+
rspack: "Rspack (实验性)"
|
83907
|
+
}
|
83908
|
+
};
|
83909
|
+
|
83911
83910
|
// ../../generator-common/dist/esm-node/locale/index.js
|
83912
83911
|
var i18n2 = new I18n2();
|
83913
83912
|
var localeKeys2 = i18n2.init("en", {
|
@@ -84531,50 +84530,211 @@ var SolutionSchemas = {
|
|
84531
84530
|
custom: getBaseSchema
|
84532
84531
|
};
|
84533
84532
|
|
84534
|
-
//
|
84535
|
-
|
84536
|
-
|
84537
|
-
|
84538
|
-
|
84539
|
-
|
84540
|
-
|
84541
|
-
|
84542
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
84543
|
-
].join("|");
|
84544
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
84545
|
-
}
|
84546
|
-
function stripAnsi2(string) {
|
84547
|
-
if (typeof string !== "string") {
|
84548
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
84533
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_async_to_generator.js
|
84534
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
84535
|
+
try {
|
84536
|
+
var info = gen[key](arg);
|
84537
|
+
var value = info.value;
|
84538
|
+
} catch (error) {
|
84539
|
+
reject(error);
|
84540
|
+
return;
|
84549
84541
|
}
|
84550
|
-
|
84542
|
+
if (info.done)
|
84543
|
+
resolve(value);
|
84544
|
+
else
|
84545
|
+
Promise.resolve(value).then(_next, _throw);
|
84546
|
+
}
|
84547
|
+
function _async_to_generator(fn) {
|
84548
|
+
return function() {
|
84549
|
+
var self3 = this, args = arguments;
|
84550
|
+
return new Promise(function(resolve, reject) {
|
84551
|
+
var gen = fn.apply(self3, args);
|
84552
|
+
function _next(value) {
|
84553
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
84554
|
+
}
|
84555
|
+
function _throw(err) {
|
84556
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
84557
|
+
}
|
84558
|
+
_next(void 0);
|
84559
|
+
});
|
84560
|
+
};
|
84551
84561
|
}
|
84552
84562
|
|
84553
|
-
//
|
84554
|
-
|
84555
|
-
|
84556
|
-
|
84557
|
-
|
84558
|
-
packagePath: {
|
84559
|
-
exit: "目录 {value} 已存在"
|
84560
|
-
}
|
84561
|
-
};
|
84562
|
-
|
84563
|
-
// ../../generator-utils/dist/esm/locale/en.js
|
84564
|
-
var EN_LOCALE3 = {
|
84565
|
-
packageName: {
|
84566
|
-
exit: "package name `{value}` is already exists"
|
84567
|
-
},
|
84568
|
-
packagePath: {
|
84569
|
-
exit: "package path {value} is already exists"
|
84570
|
-
}
|
84571
|
-
};
|
84563
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_class_call_check.js
|
84564
|
+
function _class_call_check(instance, Constructor) {
|
84565
|
+
if (!(instance instanceof Constructor))
|
84566
|
+
throw new TypeError("Cannot call a class as a function");
|
84567
|
+
}
|
84572
84568
|
|
84573
|
-
//
|
84574
|
-
|
84575
|
-
|
84576
|
-
|
84577
|
-
|
84569
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_define_property.js
|
84570
|
+
function _define_property(obj, key, value) {
|
84571
|
+
if (key in obj) {
|
84572
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
84573
|
+
} else
|
84574
|
+
obj[key] = value;
|
84575
|
+
return obj;
|
84576
|
+
}
|
84577
|
+
|
84578
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread.js
|
84579
|
+
function _object_spread(target) {
|
84580
|
+
for (var i = 1; i < arguments.length; i++) {
|
84581
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
84582
|
+
var ownKeys2 = Object.keys(source);
|
84583
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
84584
|
+
ownKeys2 = ownKeys2.concat(
|
84585
|
+
Object.getOwnPropertySymbols(source).filter(function(sym) {
|
84586
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
84587
|
+
})
|
84588
|
+
);
|
84589
|
+
}
|
84590
|
+
ownKeys2.forEach(function(key) {
|
84591
|
+
_define_property(target, key, source[key]);
|
84592
|
+
});
|
84593
|
+
}
|
84594
|
+
return target;
|
84595
|
+
}
|
84596
|
+
|
84597
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread_props.js
|
84598
|
+
function ownKeys(object, enumerableOnly) {
|
84599
|
+
var keys = Object.keys(object);
|
84600
|
+
if (Object.getOwnPropertySymbols) {
|
84601
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
84602
|
+
if (enumerableOnly) {
|
84603
|
+
symbols = symbols.filter(function(sym) {
|
84604
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
84605
|
+
});
|
84606
|
+
}
|
84607
|
+
keys.push.apply(keys, symbols);
|
84608
|
+
}
|
84609
|
+
return keys;
|
84610
|
+
}
|
84611
|
+
function _object_spread_props(target, source) {
|
84612
|
+
source = source != null ? source : {};
|
84613
|
+
if (Object.getOwnPropertyDescriptors)
|
84614
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
84615
|
+
else {
|
84616
|
+
ownKeys(Object(source)).forEach(function(key) {
|
84617
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
84618
|
+
});
|
84619
|
+
}
|
84620
|
+
return target;
|
84621
|
+
}
|
84622
|
+
|
84623
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties_loose.js
|
84624
|
+
function _object_without_properties_loose(source, excluded) {
|
84625
|
+
if (source == null)
|
84626
|
+
return {};
|
84627
|
+
var target = {};
|
84628
|
+
var sourceKeys = Object.keys(source);
|
84629
|
+
var key, i;
|
84630
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
84631
|
+
key = sourceKeys[i];
|
84632
|
+
if (excluded.indexOf(key) >= 0)
|
84633
|
+
continue;
|
84634
|
+
target[key] = source[key];
|
84635
|
+
}
|
84636
|
+
return target;
|
84637
|
+
}
|
84638
|
+
|
84639
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties.js
|
84640
|
+
function _object_without_properties(source, excluded) {
|
84641
|
+
if (source == null)
|
84642
|
+
return {};
|
84643
|
+
var target = _object_without_properties_loose(source, excluded);
|
84644
|
+
var key, i;
|
84645
|
+
if (Object.getOwnPropertySymbols) {
|
84646
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
84647
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
84648
|
+
key = sourceSymbolKeys[i];
|
84649
|
+
if (excluded.indexOf(key) >= 0)
|
84650
|
+
continue;
|
84651
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
84652
|
+
continue;
|
84653
|
+
target[key] = source[key];
|
84654
|
+
}
|
84655
|
+
}
|
84656
|
+
return target;
|
84657
|
+
}
|
84658
|
+
|
84659
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_like_to_array.js
|
84660
|
+
function _array_like_to_array(arr, len) {
|
84661
|
+
if (len == null || len > arr.length)
|
84662
|
+
len = arr.length;
|
84663
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
84664
|
+
arr2[i] = arr[i];
|
84665
|
+
return arr2;
|
84666
|
+
}
|
84667
|
+
|
84668
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_without_holes.js
|
84669
|
+
function _array_without_holes(arr) {
|
84670
|
+
if (Array.isArray(arr))
|
84671
|
+
return _array_like_to_array(arr);
|
84672
|
+
}
|
84673
|
+
|
84674
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_iterable_to_array.js
|
84675
|
+
function _iterable_to_array(iter) {
|
84676
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
84677
|
+
return Array.from(iter);
|
84678
|
+
}
|
84679
|
+
}
|
84680
|
+
|
84681
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_non_iterable_spread.js
|
84682
|
+
function _non_iterable_spread() {
|
84683
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
84684
|
+
}
|
84685
|
+
|
84686
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js
|
84687
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
84688
|
+
if (!o)
|
84689
|
+
return;
|
84690
|
+
if (typeof o === "string")
|
84691
|
+
return _array_like_to_array(o, minLen);
|
84692
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
84693
|
+
if (n === "Object" && o.constructor)
|
84694
|
+
n = o.constructor.name;
|
84695
|
+
if (n === "Map" || n === "Set")
|
84696
|
+
return Array.from(n);
|
84697
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
84698
|
+
return _array_like_to_array(o, minLen);
|
84699
|
+
}
|
84700
|
+
|
84701
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_to_consumable_array.js
|
84702
|
+
function _to_consumable_array(arr) {
|
84703
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
84704
|
+
}
|
84705
|
+
|
84706
|
+
// ../../generator-plugin/dist/esm/index.js
|
84707
|
+
var import_path17 = __toESM(require("path"));
|
84708
|
+
|
84709
|
+
// ../../generator-utils/dist/esm/index.js
|
84710
|
+
var import_path12 = __toESM(require("path"));
|
84711
|
+
var import_utils52 = require("@modern-js/utils");
|
84712
|
+
|
84713
|
+
// ../../generator-utils/dist/esm/locale/en.js
|
84714
|
+
var EN_LOCALE3 = {
|
84715
|
+
packageName: {
|
84716
|
+
exit: "package name `{value}` is already exists"
|
84717
|
+
},
|
84718
|
+
packagePath: {
|
84719
|
+
exit: "package path {value} is already exists"
|
84720
|
+
}
|
84721
|
+
};
|
84722
|
+
|
84723
|
+
// ../../generator-utils/dist/esm/locale/zh.js
|
84724
|
+
var ZH_LOCALE3 = {
|
84725
|
+
packageName: {
|
84726
|
+
exit: "项目名称 {value} 已存在"
|
84727
|
+
},
|
84728
|
+
packagePath: {
|
84729
|
+
exit: "目录 {value} 已存在"
|
84730
|
+
}
|
84731
|
+
};
|
84732
|
+
|
84733
|
+
// ../../generator-utils/dist/esm/locale/index.js
|
84734
|
+
var i18n3 = new I18n2();
|
84735
|
+
var localeKeys3 = i18n3.init("en", {
|
84736
|
+
zh: ZH_LOCALE3,
|
84737
|
+
en: EN_LOCALE3
|
84578
84738
|
});
|
84579
84739
|
|
84580
84740
|
// ../../generator-utils/dist/esm/utils/package.js
|
@@ -84653,6 +84813,21 @@ async function getAvailableVersion(packageName, currentVersion, registry2) {
|
|
84653
84813
|
return currentVersion;
|
84654
84814
|
}
|
84655
84815
|
|
84816
|
+
// ../../generator-utils/dist/esm/utils/stripAnsi.js
|
84817
|
+
function ansiRegex2({ onlyFirst = false } = {}) {
|
84818
|
+
const pattern = [
|
84819
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
84820
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
84821
|
+
].join("|");
|
84822
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
84823
|
+
}
|
84824
|
+
function stripAnsi3(string) {
|
84825
|
+
if (typeof string !== "string") {
|
84826
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
84827
|
+
}
|
84828
|
+
return string.replace(ansiRegex2(), "");
|
84829
|
+
}
|
84830
|
+
|
84656
84831
|
// ../../generator-utils/dist/esm/utils/getGeneratorPath.js
|
84657
84832
|
var import_path11 = __toESM(require("path"));
|
84658
84833
|
var getGeneratorPath = (generator, distTag, paths) => {
|
@@ -84686,7 +84861,7 @@ async function getPackageVersion(packageName, registry2) {
|
|
84686
84861
|
}
|
84687
84862
|
const result = await (0, import_utils52.execa)("pnpm", args);
|
84688
84863
|
spinner.stop();
|
84689
|
-
return
|
84864
|
+
return stripAnsi3(result.stdout);
|
84690
84865
|
}
|
84691
84866
|
if (await (0, import_utils52.canUseNpm)()) {
|
84692
84867
|
const args = [
|
@@ -84699,7 +84874,7 @@ async function getPackageVersion(packageName, registry2) {
|
|
84699
84874
|
}
|
84700
84875
|
const result = await (0, import_utils52.execa)("npm", args);
|
84701
84876
|
spinner.stop();
|
84702
|
-
return
|
84877
|
+
return stripAnsi3(result.stdout);
|
84703
84878
|
}
|
84704
84879
|
spinner.stop();
|
84705
84880
|
throw new Error("not found npm, please install npm before");
|
@@ -84724,199 +84899,25 @@ async function getModernPluginVersion(solution, packageName, options = {
|
|
84724
84899
|
pkgPath = import_path12.default.join(require.resolve(SolutionToolsMap[solution], {
|
84725
84900
|
paths: [
|
84726
84901
|
cwd
|
84727
|
-
]
|
84728
|
-
}), "../..", "package.json");
|
84729
|
-
}
|
84730
|
-
if (import_utils52.fs.existsSync(pkgPath)) {
|
84731
|
-
const pkgInfo = import_utils52.fs.readJSONSync(pkgPath);
|
84732
|
-
const modernVersion = pkgInfo.version;
|
84733
|
-
if (typeof modernVersion !== "string") {
|
84734
|
-
return getLatetPluginVersion();
|
84735
|
-
}
|
84736
|
-
const version = await getAvailableVersion(packageName, modernVersion, registry2);
|
84737
|
-
if (!await isPackageExist(`${packageName}@${version}`)) {
|
84738
|
-
return getLatetPluginVersion();
|
84739
|
-
}
|
84740
|
-
return version;
|
84741
|
-
}
|
84742
|
-
return getLatetPluginVersion();
|
84743
|
-
}
|
84744
|
-
|
84745
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_async_to_generator.js
|
84746
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
84747
|
-
try {
|
84748
|
-
var info = gen[key](arg);
|
84749
|
-
var value = info.value;
|
84750
|
-
} catch (error) {
|
84751
|
-
reject(error);
|
84752
|
-
return;
|
84753
|
-
}
|
84754
|
-
if (info.done)
|
84755
|
-
resolve(value);
|
84756
|
-
else
|
84757
|
-
Promise.resolve(value).then(_next, _throw);
|
84758
|
-
}
|
84759
|
-
function _async_to_generator(fn) {
|
84760
|
-
return function() {
|
84761
|
-
var self3 = this, args = arguments;
|
84762
|
-
return new Promise(function(resolve, reject) {
|
84763
|
-
var gen = fn.apply(self3, args);
|
84764
|
-
function _next(value) {
|
84765
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
84766
|
-
}
|
84767
|
-
function _throw(err) {
|
84768
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
84769
|
-
}
|
84770
|
-
_next(void 0);
|
84771
|
-
});
|
84772
|
-
};
|
84773
|
-
}
|
84774
|
-
|
84775
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_class_call_check.js
|
84776
|
-
function _class_call_check(instance, Constructor) {
|
84777
|
-
if (!(instance instanceof Constructor))
|
84778
|
-
throw new TypeError("Cannot call a class as a function");
|
84779
|
-
}
|
84780
|
-
|
84781
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_define_property.js
|
84782
|
-
function _define_property(obj, key, value) {
|
84783
|
-
if (key in obj) {
|
84784
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
84785
|
-
} else
|
84786
|
-
obj[key] = value;
|
84787
|
-
return obj;
|
84788
|
-
}
|
84789
|
-
|
84790
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread.js
|
84791
|
-
function _object_spread(target) {
|
84792
|
-
for (var i = 1; i < arguments.length; i++) {
|
84793
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
84794
|
-
var ownKeys2 = Object.keys(source);
|
84795
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
84796
|
-
ownKeys2 = ownKeys2.concat(
|
84797
|
-
Object.getOwnPropertySymbols(source).filter(function(sym) {
|
84798
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
84799
|
-
})
|
84800
|
-
);
|
84801
|
-
}
|
84802
|
-
ownKeys2.forEach(function(key) {
|
84803
|
-
_define_property(target, key, source[key]);
|
84804
|
-
});
|
84805
|
-
}
|
84806
|
-
return target;
|
84807
|
-
}
|
84808
|
-
|
84809
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread_props.js
|
84810
|
-
function ownKeys(object, enumerableOnly) {
|
84811
|
-
var keys = Object.keys(object);
|
84812
|
-
if (Object.getOwnPropertySymbols) {
|
84813
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
84814
|
-
if (enumerableOnly) {
|
84815
|
-
symbols = symbols.filter(function(sym) {
|
84816
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
84817
|
-
});
|
84818
|
-
}
|
84819
|
-
keys.push.apply(keys, symbols);
|
84820
|
-
}
|
84821
|
-
return keys;
|
84822
|
-
}
|
84823
|
-
function _object_spread_props(target, source) {
|
84824
|
-
source = source != null ? source : {};
|
84825
|
-
if (Object.getOwnPropertyDescriptors)
|
84826
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
84827
|
-
else {
|
84828
|
-
ownKeys(Object(source)).forEach(function(key) {
|
84829
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
84830
|
-
});
|
84831
|
-
}
|
84832
|
-
return target;
|
84833
|
-
}
|
84834
|
-
|
84835
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties_loose.js
|
84836
|
-
function _object_without_properties_loose(source, excluded) {
|
84837
|
-
if (source == null)
|
84838
|
-
return {};
|
84839
|
-
var target = {};
|
84840
|
-
var sourceKeys = Object.keys(source);
|
84841
|
-
var key, i;
|
84842
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
84843
|
-
key = sourceKeys[i];
|
84844
|
-
if (excluded.indexOf(key) >= 0)
|
84845
|
-
continue;
|
84846
|
-
target[key] = source[key];
|
84847
|
-
}
|
84848
|
-
return target;
|
84849
|
-
}
|
84850
|
-
|
84851
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties.js
|
84852
|
-
function _object_without_properties(source, excluded) {
|
84853
|
-
if (source == null)
|
84854
|
-
return {};
|
84855
|
-
var target = _object_without_properties_loose(source, excluded);
|
84856
|
-
var key, i;
|
84857
|
-
if (Object.getOwnPropertySymbols) {
|
84858
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
84859
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
84860
|
-
key = sourceSymbolKeys[i];
|
84861
|
-
if (excluded.indexOf(key) >= 0)
|
84862
|
-
continue;
|
84863
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
84864
|
-
continue;
|
84865
|
-
target[key] = source[key];
|
84866
|
-
}
|
84867
|
-
}
|
84868
|
-
return target;
|
84869
|
-
}
|
84870
|
-
|
84871
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_like_to_array.js
|
84872
|
-
function _array_like_to_array(arr, len) {
|
84873
|
-
if (len == null || len > arr.length)
|
84874
|
-
len = arr.length;
|
84875
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
84876
|
-
arr2[i] = arr[i];
|
84877
|
-
return arr2;
|
84878
|
-
}
|
84879
|
-
|
84880
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_without_holes.js
|
84881
|
-
function _array_without_holes(arr) {
|
84882
|
-
if (Array.isArray(arr))
|
84883
|
-
return _array_like_to_array(arr);
|
84884
|
-
}
|
84885
|
-
|
84886
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_iterable_to_array.js
|
84887
|
-
function _iterable_to_array(iter) {
|
84888
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
84889
|
-
return Array.from(iter);
|
84890
|
-
}
|
84891
|
-
}
|
84892
|
-
|
84893
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_non_iterable_spread.js
|
84894
|
-
function _non_iterable_spread() {
|
84895
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
84896
|
-
}
|
84897
|
-
|
84898
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js
|
84899
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
84900
|
-
if (!o)
|
84901
|
-
return;
|
84902
|
-
if (typeof o === "string")
|
84903
|
-
return _array_like_to_array(o, minLen);
|
84904
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
84905
|
-
if (n === "Object" && o.constructor)
|
84906
|
-
n = o.constructor.name;
|
84907
|
-
if (n === "Map" || n === "Set")
|
84908
|
-
return Array.from(n);
|
84909
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
84910
|
-
return _array_like_to_array(o, minLen);
|
84911
|
-
}
|
84912
|
-
|
84913
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_to_consumable_array.js
|
84914
|
-
function _to_consumable_array(arr) {
|
84915
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
84902
|
+
]
|
84903
|
+
}), "../..", "package.json");
|
84904
|
+
}
|
84905
|
+
if (import_utils52.fs.existsSync(pkgPath)) {
|
84906
|
+
const pkgInfo = import_utils52.fs.readJSONSync(pkgPath);
|
84907
|
+
const modernVersion = pkgInfo.version;
|
84908
|
+
if (typeof modernVersion !== "string") {
|
84909
|
+
return getLatetPluginVersion();
|
84910
|
+
}
|
84911
|
+
const version = await getAvailableVersion(packageName, modernVersion, registry2);
|
84912
|
+
if (!await isPackageExist(`${packageName}@${version}`)) {
|
84913
|
+
return getLatetPluginVersion();
|
84914
|
+
}
|
84915
|
+
return version;
|
84916
|
+
}
|
84917
|
+
return getLatetPluginVersion();
|
84916
84918
|
}
|
84917
84919
|
|
84918
84920
|
// ../../generator-plugin/dist/esm/index.js
|
84919
|
-
var import_path17 = __toESM(require("path"));
|
84920
84921
|
var import_lodash13 = require("@modern-js/utils/lodash");
|
84921
84922
|
|
84922
84923
|
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_create_class.js
|
@@ -85253,6 +85254,20 @@ function _addManyFiles() {
|
|
85253
85254
|
return _addManyFiles.apply(this, arguments);
|
85254
85255
|
}
|
85255
85256
|
|
85257
|
+
// ../../generator-plugin/dist/esm/context/ejs.js
|
85258
|
+
var import_ejs2 = __toESM(require_ejs());
|
85259
|
+
var PluginEjsAPI = /* @__PURE__ */ function() {
|
85260
|
+
"use strict";
|
85261
|
+
function PluginEjsAPI2() {
|
85262
|
+
_class_call_check(this, PluginEjsAPI2);
|
85263
|
+
}
|
85264
|
+
var _proto = PluginEjsAPI2.prototype;
|
85265
|
+
_proto.renderString = function renderString3(template, data) {
|
85266
|
+
return import_ejs2.default.render(template, data) || "";
|
85267
|
+
};
|
85268
|
+
return PluginEjsAPI2;
|
85269
|
+
}();
|
85270
|
+
|
85256
85271
|
// ../../generator-plugin/dist/esm/context/handlebars.js
|
85257
85272
|
var handlebars2 = __toESM(require_lib());
|
85258
85273
|
var PluginHandlebarsAPI = /* @__PURE__ */ function() {
|
@@ -85294,20 +85309,6 @@ var PluginHandlebarsAPI = /* @__PURE__ */ function() {
|
|
85294
85309
|
return PluginHandlebarsAPI2;
|
85295
85310
|
}();
|
85296
85311
|
|
85297
|
-
// ../../generator-plugin/dist/esm/context/ejs.js
|
85298
|
-
var import_ejs2 = __toESM(require_ejs());
|
85299
|
-
var PluginEjsAPI = /* @__PURE__ */ function() {
|
85300
|
-
"use strict";
|
85301
|
-
function PluginEjsAPI2() {
|
85302
|
-
_class_call_check(this, PluginEjsAPI2);
|
85303
|
-
}
|
85304
|
-
var _proto = PluginEjsAPI2.prototype;
|
85305
|
-
_proto.renderString = function renderString3(template, data) {
|
85306
|
-
return import_ejs2.default.render(template, data) || "";
|
85307
|
-
};
|
85308
|
-
return PluginEjsAPI2;
|
85309
|
-
}();
|
85310
|
-
|
85311
85312
|
// ../../generator-plugin/dist/esm/context/file.js
|
85312
85313
|
var FileType2;
|
85313
85314
|
(function(FileType22) {
|
@@ -85861,88 +85862,6 @@ var PluginInputContext = /* @__PURE__ */ function() {
|
|
85861
85862
|
return PluginInputContext2;
|
85862
85863
|
}();
|
85863
85864
|
|
85864
|
-
// ../../generator-plugin/dist/esm/context/npm.js
|
85865
|
-
var PluginNpmAPI = /* @__PURE__ */ function() {
|
85866
|
-
"use strict";
|
85867
|
-
function PluginNpmAPI2(projectPath, packageManager) {
|
85868
|
-
_class_call_check(this, PluginNpmAPI2);
|
85869
|
-
this.projectPath = "";
|
85870
|
-
this.projectPath = projectPath;
|
85871
|
-
this.packageManager = packageManager;
|
85872
|
-
}
|
85873
|
-
var _proto = PluginNpmAPI2.prototype;
|
85874
|
-
_proto.install = function install() {
|
85875
|
-
var _this = this;
|
85876
|
-
return _async_to_generator(function() {
|
85877
|
-
return __generator(this, function(_state) {
|
85878
|
-
switch (_state.label) {
|
85879
|
-
case 0:
|
85880
|
-
if (!(_this.packageManager === PackageManager.Pnpm))
|
85881
|
-
return [
|
85882
|
-
3,
|
85883
|
-
2
|
85884
|
-
];
|
85885
|
-
return [
|
85886
|
-
4,
|
85887
|
-
pnpmInstall({
|
85888
|
-
cwd: _this.projectPath
|
85889
|
-
})
|
85890
|
-
];
|
85891
|
-
case 1:
|
85892
|
-
_state.sent();
|
85893
|
-
return [
|
85894
|
-
3,
|
85895
|
-
6
|
85896
|
-
];
|
85897
|
-
case 2:
|
85898
|
-
if (!(_this.packageManager === PackageManager.Yarn))
|
85899
|
-
return [
|
85900
|
-
3,
|
85901
|
-
4
|
85902
|
-
];
|
85903
|
-
return [
|
85904
|
-
4,
|
85905
|
-
yarnInstall({
|
85906
|
-
cwd: _this.projectPath
|
85907
|
-
})
|
85908
|
-
];
|
85909
|
-
case 3:
|
85910
|
-
_state.sent();
|
85911
|
-
return [
|
85912
|
-
3,
|
85913
|
-
6
|
85914
|
-
];
|
85915
|
-
case 4:
|
85916
|
-
return [
|
85917
|
-
4,
|
85918
|
-
npmInstall({
|
85919
|
-
cwd: _this.projectPath
|
85920
|
-
})
|
85921
|
-
];
|
85922
|
-
case 5:
|
85923
|
-
_state.sent();
|
85924
|
-
_state.label = 6;
|
85925
|
-
case 6:
|
85926
|
-
return [
|
85927
|
-
2
|
85928
|
-
];
|
85929
|
-
}
|
85930
|
-
});
|
85931
|
-
})();
|
85932
|
-
};
|
85933
|
-
_create_class(PluginNpmAPI2, [
|
85934
|
-
{
|
85935
|
-
key: "method",
|
85936
|
-
get: function get4() {
|
85937
|
-
return {
|
85938
|
-
install: this.install.bind(this)
|
85939
|
-
};
|
85940
|
-
}
|
85941
|
-
}
|
85942
|
-
]);
|
85943
|
-
return PluginNpmAPI2;
|
85944
|
-
}();
|
85945
|
-
|
85946
85865
|
// ../../new-action/dist/esm/utils/index.js
|
85947
85866
|
var import_path15 = __toESM(require("path"));
|
85948
85867
|
var import_utils56 = require("@modern-js/utils");
|
@@ -86340,6 +86259,88 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
86340
86259
|
return PluginNewAPI2;
|
86341
86260
|
}();
|
86342
86261
|
|
86262
|
+
// ../../generator-plugin/dist/esm/context/npm.js
|
86263
|
+
var PluginNpmAPI = /* @__PURE__ */ function() {
|
86264
|
+
"use strict";
|
86265
|
+
function PluginNpmAPI2(projectPath, packageManager) {
|
86266
|
+
_class_call_check(this, PluginNpmAPI2);
|
86267
|
+
this.projectPath = "";
|
86268
|
+
this.projectPath = projectPath;
|
86269
|
+
this.packageManager = packageManager;
|
86270
|
+
}
|
86271
|
+
var _proto = PluginNpmAPI2.prototype;
|
86272
|
+
_proto.install = function install() {
|
86273
|
+
var _this = this;
|
86274
|
+
return _async_to_generator(function() {
|
86275
|
+
return __generator(this, function(_state) {
|
86276
|
+
switch (_state.label) {
|
86277
|
+
case 0:
|
86278
|
+
if (!(_this.packageManager === PackageManager.Pnpm))
|
86279
|
+
return [
|
86280
|
+
3,
|
86281
|
+
2
|
86282
|
+
];
|
86283
|
+
return [
|
86284
|
+
4,
|
86285
|
+
pnpmInstall({
|
86286
|
+
cwd: _this.projectPath
|
86287
|
+
})
|
86288
|
+
];
|
86289
|
+
case 1:
|
86290
|
+
_state.sent();
|
86291
|
+
return [
|
86292
|
+
3,
|
86293
|
+
6
|
86294
|
+
];
|
86295
|
+
case 2:
|
86296
|
+
if (!(_this.packageManager === PackageManager.Yarn))
|
86297
|
+
return [
|
86298
|
+
3,
|
86299
|
+
4
|
86300
|
+
];
|
86301
|
+
return [
|
86302
|
+
4,
|
86303
|
+
yarnInstall({
|
86304
|
+
cwd: _this.projectPath
|
86305
|
+
})
|
86306
|
+
];
|
86307
|
+
case 3:
|
86308
|
+
_state.sent();
|
86309
|
+
return [
|
86310
|
+
3,
|
86311
|
+
6
|
86312
|
+
];
|
86313
|
+
case 4:
|
86314
|
+
return [
|
86315
|
+
4,
|
86316
|
+
npmInstall({
|
86317
|
+
cwd: _this.projectPath
|
86318
|
+
})
|
86319
|
+
];
|
86320
|
+
case 5:
|
86321
|
+
_state.sent();
|
86322
|
+
_state.label = 6;
|
86323
|
+
case 6:
|
86324
|
+
return [
|
86325
|
+
2
|
86326
|
+
];
|
86327
|
+
}
|
86328
|
+
});
|
86329
|
+
})();
|
86330
|
+
};
|
86331
|
+
_create_class(PluginNpmAPI2, [
|
86332
|
+
{
|
86333
|
+
key: "method",
|
86334
|
+
get: function get4() {
|
86335
|
+
return {
|
86336
|
+
install: this.install.bind(this)
|
86337
|
+
};
|
86338
|
+
}
|
86339
|
+
}
|
86340
|
+
]);
|
86341
|
+
return PluginNpmAPI2;
|
86342
|
+
}();
|
86343
|
+
|
86343
86344
|
// ../../generator-plugin/dist/esm/context/index.js
|
86344
86345
|
var LifeCycle2;
|
86345
86346
|
(function(LifeCycle22) {
|
@@ -86401,6 +86402,29 @@ var PluginContext = /* @__PURE__ */ function() {
|
|
86401
86402
|
return PluginContext2;
|
86402
86403
|
}();
|
86403
86404
|
|
86405
|
+
// ../../generator-plugin/dist/esm/locale/en.js
|
86406
|
+
var EN_LOCALE4 = {
|
86407
|
+
setup_plugin: "Get plugin info...",
|
86408
|
+
plugin_no_meta_error: "plugin {plugin} should has meta filed in package.json",
|
86409
|
+
install_plugin: "Install plugin...",
|
86410
|
+
run_plugin: "Run plugin..."
|
86411
|
+
};
|
86412
|
+
|
86413
|
+
// ../../generator-plugin/dist/esm/locale/zh.js
|
86414
|
+
var ZH_LOCALE4 = {
|
86415
|
+
setup_plugin: "获取插件信息中...",
|
86416
|
+
plugin_no_meta_error: "插件 {plugin} 应在 package.json 中添加 meta 信息",
|
86417
|
+
install_plugin: "正在安装生成器插件...",
|
86418
|
+
run_plugin: "正在执行插件操作..."
|
86419
|
+
};
|
86420
|
+
|
86421
|
+
// ../../generator-plugin/dist/esm/locale/index.js
|
86422
|
+
var i18n4 = new I18n2();
|
86423
|
+
var localeKeys4 = i18n4.init("en", {
|
86424
|
+
zh: ZH_LOCALE4,
|
86425
|
+
en: EN_LOCALE4
|
86426
|
+
});
|
86427
|
+
|
86404
86428
|
// ../../generator-plugin/dist/esm/utils/index.js
|
86405
86429
|
var import_path16 = __toESM(require("path"));
|
86406
86430
|
|
@@ -86534,29 +86558,6 @@ function _installPlugins() {
|
|
86534
86558
|
return _installPlugins.apply(this, arguments);
|
86535
86559
|
}
|
86536
86560
|
|
86537
|
-
// ../../generator-plugin/dist/esm/locale/zh.js
|
86538
|
-
var ZH_LOCALE4 = {
|
86539
|
-
setup_plugin: "获取插件信息中...",
|
86540
|
-
plugin_no_meta_error: "插件 {plugin} 应在 package.json 中添加 meta 信息",
|
86541
|
-
install_plugin: "正在安装生成器插件...",
|
86542
|
-
run_plugin: "正在执行插件操作..."
|
86543
|
-
};
|
86544
|
-
|
86545
|
-
// ../../generator-plugin/dist/esm/locale/en.js
|
86546
|
-
var EN_LOCALE4 = {
|
86547
|
-
setup_plugin: "Get plugin info...",
|
86548
|
-
plugin_no_meta_error: "plugin {plugin} should has meta filed in package.json",
|
86549
|
-
install_plugin: "Install plugin...",
|
86550
|
-
run_plugin: "Run plugin..."
|
86551
|
-
};
|
86552
|
-
|
86553
|
-
// ../../generator-plugin/dist/esm/locale/index.js
|
86554
|
-
var i18n4 = new I18n2();
|
86555
|
-
var localeKeys4 = i18n4.init("en", {
|
86556
|
-
zh: ZH_LOCALE4,
|
86557
|
-
en: EN_LOCALE4
|
86558
|
-
});
|
86559
|
-
|
86560
86561
|
// ../../generator-plugin/dist/esm/index.js
|
86561
86562
|
var GeneratorPlugin = /* @__PURE__ */ function() {
|
86562
86563
|
"use strict";
|
@@ -86996,6 +86997,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
86996
86997
|
}();
|
86997
86998
|
|
86998
86999
|
// src/index.ts
|
87000
|
+
var import_lodash14 = require("@modern-js/utils/lodash");
|
86999
87001
|
var mergeDefaultConfig = (context) => {
|
87000
87002
|
const { defaultSolution } = context.config;
|
87001
87003
|
if (defaultSolution) {
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "3.4.
|
18
|
+
"version": "3.4.17",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"main": "./dist/index.js",
|
21
21
|
"files": [
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"/dist/index.js"
|
24
24
|
],
|
25
25
|
"dependencies": {
|
26
|
-
"@modern-js/utils": "2.58.
|
26
|
+
"@modern-js/utils": "2.58.3"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"@modern-js/codesmith": "2.4.1",
|
@@ -32,14 +32,14 @@
|
|
32
32
|
"@types/node": "^14",
|
33
33
|
"jest": "^29",
|
34
34
|
"typescript": "^5",
|
35
|
-
"@modern-js/base-generator": "3.4.
|
36
|
-
"@modern-js/generator-common": "3.4.
|
37
|
-
"@modern-js/generator-
|
38
|
-
"@modern-js/
|
39
|
-
"@modern-js/generator
|
40
|
-
"@
|
41
|
-
"@scripts/build": "2.58.
|
42
|
-
"@
|
35
|
+
"@modern-js/base-generator": "3.4.17",
|
36
|
+
"@modern-js/generator-common": "3.4.17",
|
37
|
+
"@modern-js/generator-utils": "3.4.17",
|
38
|
+
"@modern-js/generator-plugin": "3.4.17",
|
39
|
+
"@modern-js/module-generator": "3.4.17",
|
40
|
+
"@scripts/jest-config": "2.58.3",
|
41
|
+
"@scripts/build": "2.58.3",
|
42
|
+
"@modern-js/mwa-generator": "3.4.17"
|
43
43
|
},
|
44
44
|
"sideEffects": false,
|
45
45
|
"publishConfig": {
|
package/src/index.ts
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
import { merge } from '@modern-js/utils/lodash';
|
2
1
|
import type { GeneratorContext, GeneratorCore } from '@modern-js/codesmith';
|
3
2
|
import { AppAPI } from '@modern-js/codesmith-api-app';
|
4
3
|
import {
|
5
|
-
|
6
|
-
getSolutionSchema,
|
7
|
-
SolutionGenerator,
|
4
|
+
BaseGenerator,
|
8
5
|
type Solution,
|
9
6
|
SolutionDefaultConfig,
|
10
|
-
|
7
|
+
SolutionGenerator,
|
11
8
|
getScenesSchema,
|
9
|
+
getSolutionSchema,
|
10
|
+
i18n,
|
12
11
|
} from '@modern-js/generator-common';
|
13
|
-
import { getGeneratorPath } from '@modern-js/generator-utils';
|
14
12
|
import { GeneratorPlugin } from '@modern-js/generator-plugin';
|
13
|
+
import { getGeneratorPath } from '@modern-js/generator-utils';
|
14
|
+
import { merge } from '@modern-js/utils/lodash';
|
15
15
|
|
16
16
|
const mergeDefaultConfig = (context: GeneratorContext) => {
|
17
17
|
const { defaultSolution } = context.config;
|