@modern-js/repo-generator 3.1.9 → 3.1.10
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 +595 -662
- package/package.json +17 -13
package/dist/index.js
CHANGED
@@ -11558,7 +11558,7 @@ var require_ora = __commonJS({
|
|
11558
11558
|
}, 87: (e2, t2, r2) => {
|
11559
11559
|
"use strict";
|
11560
11560
|
var i;
|
11561
|
-
function
|
11561
|
+
function _defineProperty20(e3, t3, r3) {
|
11562
11562
|
if (t3 in e3) {
|
11563
11563
|
Object.defineProperty(e3, t3, { value: r3, enumerable: true, configurable: true, writable: true });
|
11564
11564
|
} else {
|
@@ -11640,9 +11640,9 @@ var require_ora = __commonJS({
|
|
11640
11640
|
}
|
11641
11641
|
this[l] = i2;
|
11642
11642
|
return i2;
|
11643
|
-
} },
|
11643
|
+
} }, _defineProperty20(i, Symbol.asyncIterator, function() {
|
11644
11644
|
return this;
|
11645
|
-
}),
|
11645
|
+
}), _defineProperty20(i, "return", function _return() {
|
11646
11646
|
var e3 = this;
|
11647
11647
|
return new Promise(function(t3, r3) {
|
11648
11648
|
e3[h].destroy(null, function(e4) {
|
@@ -11656,7 +11656,7 @@ var require_ora = __commonJS({
|
|
11656
11656
|
}), i), d);
|
11657
11657
|
var _ = function createReadableStreamAsyncIterator(e3) {
|
11658
11658
|
var t3;
|
11659
|
-
var r3 = Object.create(p, (t3 = {},
|
11659
|
+
var r3 = Object.create(p, (t3 = {}, _defineProperty20(t3, h, { value: e3, writable: true }), _defineProperty20(t3, s, { value: null, writable: true }), _defineProperty20(t3, a, { value: null, writable: true }), _defineProperty20(t3, o, { value: null, writable: true }), _defineProperty20(t3, f, { value: e3._readableState.endEmitted, writable: true }), _defineProperty20(t3, u, { value: function value(e4, t4) {
|
11660
11660
|
var i2 = r3[h].read();
|
11661
11661
|
if (i2) {
|
11662
11662
|
r3[l] = null;
|
@@ -11708,12 +11708,12 @@ var require_ora = __commonJS({
|
|
11708
11708
|
}
|
11709
11709
|
return r3;
|
11710
11710
|
}
|
11711
|
-
function
|
11711
|
+
function _objectSpread9(e3) {
|
11712
11712
|
for (var t3 = 1; t3 < arguments.length; t3++) {
|
11713
11713
|
var r3 = arguments[t3] != null ? arguments[t3] : {};
|
11714
11714
|
if (t3 % 2) {
|
11715
11715
|
ownKeys9(Object(r3), true).forEach(function(t4) {
|
11716
|
-
|
11716
|
+
_defineProperty20(e3, t4, r3[t4]);
|
11717
11717
|
});
|
11718
11718
|
} else if (Object.getOwnPropertyDescriptors) {
|
11719
11719
|
Object.defineProperties(e3, Object.getOwnPropertyDescriptors(r3));
|
@@ -11725,7 +11725,7 @@ var require_ora = __commonJS({
|
|
11725
11725
|
}
|
11726
11726
|
return e3;
|
11727
11727
|
}
|
11728
|
-
function
|
11728
|
+
function _defineProperty20(e3, t3, r3) {
|
11729
11729
|
if (t3 in e3) {
|
11730
11730
|
Object.defineProperty(e3, t3, { value: r3, enumerable: true, configurable: true, writable: true });
|
11731
11731
|
} else {
|
@@ -11733,7 +11733,7 @@ var require_ora = __commonJS({
|
|
11733
11733
|
}
|
11734
11734
|
return e3;
|
11735
11735
|
}
|
11736
|
-
function
|
11736
|
+
function _classCallCheck16(e3, t3) {
|
11737
11737
|
if (!(e3 instanceof t3)) {
|
11738
11738
|
throw new TypeError("Cannot call a class as a function");
|
11739
11739
|
}
|
@@ -11748,7 +11748,7 @@ var require_ora = __commonJS({
|
|
11748
11748
|
Object.defineProperty(e3, i2.key, i2);
|
11749
11749
|
}
|
11750
11750
|
}
|
11751
|
-
function
|
11751
|
+
function _createClass16(e3, t3, r3) {
|
11752
11752
|
if (t3)
|
11753
11753
|
_defineProperties24(e3.prototype, t3);
|
11754
11754
|
if (r3)
|
@@ -11763,12 +11763,12 @@ var require_ora = __commonJS({
|
|
11763
11763
|
}
|
11764
11764
|
e2.exports = function() {
|
11765
11765
|
function BufferList() {
|
11766
|
-
|
11766
|
+
_classCallCheck16(this, BufferList);
|
11767
11767
|
this.head = null;
|
11768
11768
|
this.tail = null;
|
11769
11769
|
this.length = 0;
|
11770
11770
|
}
|
11771
|
-
|
11771
|
+
_createClass16(BufferList, [{ key: "push", value: function push(e3) {
|
11772
11772
|
var t3 = { data: e3, next: null };
|
11773
11773
|
if (this.length > 0)
|
11774
11774
|
this.tail.next = t3;
|
@@ -11888,7 +11888,7 @@ var require_ora = __commonJS({
|
|
11888
11888
|
this.length -= i2;
|
11889
11889
|
return t3;
|
11890
11890
|
} }, { key: o, value: function value(e3, t3) {
|
11891
|
-
return a(this,
|
11891
|
+
return a(this, _objectSpread9({}, t3, { depth: 0, customInspect: false }));
|
11892
11892
|
} }]);
|
11893
11893
|
return BufferList;
|
11894
11894
|
}();
|
@@ -12088,7 +12088,7 @@ var require_ora = __commonJS({
|
|
12088
12088
|
Promise.resolve(f).then(i2, n);
|
12089
12089
|
}
|
12090
12090
|
}
|
12091
|
-
function
|
12091
|
+
function _asyncToGenerator29(e3) {
|
12092
12092
|
return function() {
|
12093
12093
|
var t3 = this, r3 = arguments;
|
12094
12094
|
return new Promise(function(i2, n) {
|
@@ -12115,12 +12115,12 @@ var require_ora = __commonJS({
|
|
12115
12115
|
}
|
12116
12116
|
return r3;
|
12117
12117
|
}
|
12118
|
-
function
|
12118
|
+
function _objectSpread9(e3) {
|
12119
12119
|
for (var t3 = 1; t3 < arguments.length; t3++) {
|
12120
12120
|
var r3 = arguments[t3] != null ? arguments[t3] : {};
|
12121
12121
|
if (t3 % 2) {
|
12122
12122
|
ownKeys9(Object(r3), true).forEach(function(t4) {
|
12123
|
-
|
12123
|
+
_defineProperty20(e3, t4, r3[t4]);
|
12124
12124
|
});
|
12125
12125
|
} else if (Object.getOwnPropertyDescriptors) {
|
12126
12126
|
Object.defineProperties(e3, Object.getOwnPropertyDescriptors(r3));
|
@@ -12132,7 +12132,7 @@ var require_ora = __commonJS({
|
|
12132
12132
|
}
|
12133
12133
|
return e3;
|
12134
12134
|
}
|
12135
|
-
function
|
12135
|
+
function _defineProperty20(e3, t3, r3) {
|
12136
12136
|
if (t3 in e3) {
|
12137
12137
|
Object.defineProperty(e3, t3, { value: r3, enumerable: true, configurable: true, writable: true });
|
12138
12138
|
} else {
|
@@ -12151,7 +12151,7 @@ var require_ora = __commonJS({
|
|
12151
12151
|
n = t3[Symbol.iterator]();
|
12152
12152
|
else
|
12153
12153
|
throw new i("iterable", ["Iterable"], t3);
|
12154
|
-
var s = new e3(
|
12154
|
+
var s = new e3(_objectSpread9({ objectMode: true }, r3));
|
12155
12155
|
var a = false;
|
12156
12156
|
s._read = function() {
|
12157
12157
|
if (!a) {
|
@@ -12163,7 +12163,7 @@ var require_ora = __commonJS({
|
|
12163
12163
|
return _next2.apply(this, arguments);
|
12164
12164
|
}
|
12165
12165
|
function _next2() {
|
12166
|
-
_next2 =
|
12166
|
+
_next2 = _asyncToGenerator29(function* () {
|
12167
12167
|
try {
|
12168
12168
|
var e4 = yield n.next(), t4 = e4.value, r4 = e4.done;
|
12169
12169
|
if (r4) {
|
@@ -79659,12 +79659,12 @@ var require_buffer_list = __commonJS({
|
|
79659
79659
|
}
|
79660
79660
|
return keys;
|
79661
79661
|
}
|
79662
|
-
function
|
79662
|
+
function _objectSpread9(target) {
|
79663
79663
|
for (var i = 1; i < arguments.length; i++) {
|
79664
79664
|
var source = arguments[i] != null ? arguments[i] : {};
|
79665
79665
|
if (i % 2) {
|
79666
79666
|
ownKeys9(Object(source), true).forEach(function(key) {
|
79667
|
-
|
79667
|
+
_defineProperty20(target, key, source[key]);
|
79668
79668
|
});
|
79669
79669
|
} else if (Object.getOwnPropertyDescriptors) {
|
79670
79670
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
@@ -79676,7 +79676,7 @@ var require_buffer_list = __commonJS({
|
|
79676
79676
|
}
|
79677
79677
|
return target;
|
79678
79678
|
}
|
79679
|
-
function
|
79679
|
+
function _defineProperty20(obj, key, value) {
|
79680
79680
|
if (key in obj) {
|
79681
79681
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
79682
79682
|
} else {
|
@@ -79684,7 +79684,7 @@ var require_buffer_list = __commonJS({
|
|
79684
79684
|
}
|
79685
79685
|
return obj;
|
79686
79686
|
}
|
79687
|
-
function
|
79687
|
+
function _classCallCheck16(instance, Constructor) {
|
79688
79688
|
if (!(instance instanceof Constructor)) {
|
79689
79689
|
throw new TypeError("Cannot call a class as a function");
|
79690
79690
|
}
|
@@ -79699,7 +79699,7 @@ var require_buffer_list = __commonJS({
|
|
79699
79699
|
Object.defineProperty(target, descriptor.key, descriptor);
|
79700
79700
|
}
|
79701
79701
|
}
|
79702
|
-
function
|
79702
|
+
function _createClass16(Constructor, protoProps, staticProps) {
|
79703
79703
|
if (protoProps)
|
79704
79704
|
_defineProperties24(Constructor.prototype, protoProps);
|
79705
79705
|
if (staticProps)
|
@@ -79716,12 +79716,12 @@ var require_buffer_list = __commonJS({
|
|
79716
79716
|
}
|
79717
79717
|
module2.exports = /* @__PURE__ */ function() {
|
79718
79718
|
function BufferList() {
|
79719
|
-
|
79719
|
+
_classCallCheck16(this, BufferList);
|
79720
79720
|
this.head = null;
|
79721
79721
|
this.tail = null;
|
79722
79722
|
this.length = 0;
|
79723
79723
|
}
|
79724
|
-
|
79724
|
+
_createClass16(BufferList, [{
|
79725
79725
|
key: "push",
|
79726
79726
|
value: function push(v) {
|
79727
79727
|
var entry = {
|
@@ -79883,7 +79883,7 @@ var require_buffer_list = __commonJS({
|
|
79883
79883
|
}, {
|
79884
79884
|
key: custom,
|
79885
79885
|
value: function value(_, options) {
|
79886
|
-
return inspect(this,
|
79886
|
+
return inspect(this, _objectSpread9({}, options, {
|
79887
79887
|
// Only inspect one level.
|
79888
79888
|
depth: 0,
|
79889
79889
|
// It should not recurse.
|
@@ -81192,7 +81192,7 @@ var require_async_iterator = __commonJS({
|
|
81192
81192
|
"../../../../node_modules/.pnpm/readable-stream@3.6.0/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports, module2) {
|
81193
81193
|
"use strict";
|
81194
81194
|
var _Object$setPrototypeO;
|
81195
|
-
function
|
81195
|
+
function _defineProperty20(obj, key, value) {
|
81196
81196
|
if (key in obj) {
|
81197
81197
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
81198
81198
|
} else {
|
@@ -81280,9 +81280,9 @@ var require_async_iterator = __commonJS({
|
|
81280
81280
|
this[kLastPromise] = promise;
|
81281
81281
|
return promise;
|
81282
81282
|
}
|
81283
|
-
},
|
81283
|
+
}, _defineProperty20(_Object$setPrototypeO, Symbol.asyncIterator, function() {
|
81284
81284
|
return this;
|
81285
|
-
}),
|
81285
|
+
}), _defineProperty20(_Object$setPrototypeO, "return", function _return() {
|
81286
81286
|
var _this2 = this;
|
81287
81287
|
return new Promise(function(resolve, reject) {
|
81288
81288
|
_this2[kStream].destroy(null, function(err) {
|
@@ -81296,22 +81296,22 @@ var require_async_iterator = __commonJS({
|
|
81296
81296
|
}), _Object$setPrototypeO), AsyncIteratorPrototype);
|
81297
81297
|
var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) {
|
81298
81298
|
var _Object$create;
|
81299
|
-
var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {},
|
81299
|
+
var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty20(_Object$create, kStream, {
|
81300
81300
|
value: stream,
|
81301
81301
|
writable: true
|
81302
|
-
}),
|
81302
|
+
}), _defineProperty20(_Object$create, kLastResolve, {
|
81303
81303
|
value: null,
|
81304
81304
|
writable: true
|
81305
|
-
}),
|
81305
|
+
}), _defineProperty20(_Object$create, kLastReject, {
|
81306
81306
|
value: null,
|
81307
81307
|
writable: true
|
81308
|
-
}),
|
81308
|
+
}), _defineProperty20(_Object$create, kError, {
|
81309
81309
|
value: null,
|
81310
81310
|
writable: true
|
81311
|
-
}),
|
81311
|
+
}), _defineProperty20(_Object$create, kEnded, {
|
81312
81312
|
value: stream._readableState.endEmitted,
|
81313
81313
|
writable: true
|
81314
|
-
}),
|
81314
|
+
}), _defineProperty20(_Object$create, kHandlePromise, {
|
81315
81315
|
value: function value(resolve, reject) {
|
81316
81316
|
var data = iterator[kStream].read();
|
81317
81317
|
if (data) {
|
@@ -81373,7 +81373,7 @@ var require_from2 = __commonJS({
|
|
81373
81373
|
Promise.resolve(value).then(_next, _throw);
|
81374
81374
|
}
|
81375
81375
|
}
|
81376
|
-
function
|
81376
|
+
function _asyncToGenerator29(fn) {
|
81377
81377
|
return function() {
|
81378
81378
|
var self3 = this, args = arguments;
|
81379
81379
|
return new Promise(function(resolve, reject) {
|
@@ -81400,12 +81400,12 @@ var require_from2 = __commonJS({
|
|
81400
81400
|
}
|
81401
81401
|
return keys;
|
81402
81402
|
}
|
81403
|
-
function
|
81403
|
+
function _objectSpread9(target) {
|
81404
81404
|
for (var i = 1; i < arguments.length; i++) {
|
81405
81405
|
var source = arguments[i] != null ? arguments[i] : {};
|
81406
81406
|
if (i % 2) {
|
81407
81407
|
ownKeys9(Object(source), true).forEach(function(key) {
|
81408
|
-
|
81408
|
+
_defineProperty20(target, key, source[key]);
|
81409
81409
|
});
|
81410
81410
|
} else if (Object.getOwnPropertyDescriptors) {
|
81411
81411
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
@@ -81417,7 +81417,7 @@ var require_from2 = __commonJS({
|
|
81417
81417
|
}
|
81418
81418
|
return target;
|
81419
81419
|
}
|
81420
|
-
function
|
81420
|
+
function _defineProperty20(obj, key, value) {
|
81421
81421
|
if (key in obj) {
|
81422
81422
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
81423
81423
|
} else {
|
@@ -81436,7 +81436,7 @@ var require_from2 = __commonJS({
|
|
81436
81436
|
iterator = iterable[Symbol.iterator]();
|
81437
81437
|
else
|
81438
81438
|
throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable);
|
81439
|
-
var readable = new Readable(
|
81439
|
+
var readable = new Readable(_objectSpread9({
|
81440
81440
|
objectMode: true
|
81441
81441
|
}, opts));
|
81442
81442
|
var reading = false;
|
@@ -81450,7 +81450,7 @@ var require_from2 = __commonJS({
|
|
81450
81450
|
return _next2.apply(this, arguments);
|
81451
81451
|
}
|
81452
81452
|
function _next2() {
|
81453
|
-
_next2 =
|
81453
|
+
_next2 = _asyncToGenerator29(function* () {
|
81454
81454
|
try {
|
81455
81455
|
var _ref = yield iterator.next(), value = _ref.value, done = _ref.done;
|
81456
81456
|
if (done) {
|
@@ -102932,7 +102932,7 @@ var require_ora3 = __commonJS({
|
|
102932
102932
|
}, 87: (e2, t2, r2) => {
|
102933
102933
|
"use strict";
|
102934
102934
|
var i;
|
102935
|
-
function
|
102935
|
+
function _defineProperty20(e3, t3, r3) {
|
102936
102936
|
if (t3 in e3) {
|
102937
102937
|
Object.defineProperty(e3, t3, { value: r3, enumerable: true, configurable: true, writable: true });
|
102938
102938
|
} else {
|
@@ -103014,9 +103014,9 @@ var require_ora3 = __commonJS({
|
|
103014
103014
|
}
|
103015
103015
|
this[l] = i2;
|
103016
103016
|
return i2;
|
103017
|
-
} },
|
103017
|
+
} }, _defineProperty20(i, Symbol.asyncIterator, function() {
|
103018
103018
|
return this;
|
103019
|
-
}),
|
103019
|
+
}), _defineProperty20(i, "return", function _return() {
|
103020
103020
|
var e3 = this;
|
103021
103021
|
return new Promise(function(t3, r3) {
|
103022
103022
|
e3[h].destroy(null, function(e4) {
|
@@ -103030,7 +103030,7 @@ var require_ora3 = __commonJS({
|
|
103030
103030
|
}), i), d);
|
103031
103031
|
var _ = function createReadableStreamAsyncIterator(e3) {
|
103032
103032
|
var t3;
|
103033
|
-
var r3 = Object.create(p, (t3 = {},
|
103033
|
+
var r3 = Object.create(p, (t3 = {}, _defineProperty20(t3, h, { value: e3, writable: true }), _defineProperty20(t3, s, { value: null, writable: true }), _defineProperty20(t3, a, { value: null, writable: true }), _defineProperty20(t3, o, { value: null, writable: true }), _defineProperty20(t3, f, { value: e3._readableState.endEmitted, writable: true }), _defineProperty20(t3, u, { value: function value(e4, t4) {
|
103034
103034
|
var i2 = r3[h].read();
|
103035
103035
|
if (i2) {
|
103036
103036
|
r3[l] = null;
|
@@ -103082,12 +103082,12 @@ var require_ora3 = __commonJS({
|
|
103082
103082
|
}
|
103083
103083
|
return r3;
|
103084
103084
|
}
|
103085
|
-
function
|
103085
|
+
function _objectSpread9(e3) {
|
103086
103086
|
for (var t3 = 1; t3 < arguments.length; t3++) {
|
103087
103087
|
var r3 = arguments[t3] != null ? arguments[t3] : {};
|
103088
103088
|
if (t3 % 2) {
|
103089
103089
|
ownKeys9(Object(r3), true).forEach(function(t4) {
|
103090
|
-
|
103090
|
+
_defineProperty20(e3, t4, r3[t4]);
|
103091
103091
|
});
|
103092
103092
|
} else if (Object.getOwnPropertyDescriptors) {
|
103093
103093
|
Object.defineProperties(e3, Object.getOwnPropertyDescriptors(r3));
|
@@ -103099,7 +103099,7 @@ var require_ora3 = __commonJS({
|
|
103099
103099
|
}
|
103100
103100
|
return e3;
|
103101
103101
|
}
|
103102
|
-
function
|
103102
|
+
function _defineProperty20(e3, t3, r3) {
|
103103
103103
|
if (t3 in e3) {
|
103104
103104
|
Object.defineProperty(e3, t3, { value: r3, enumerable: true, configurable: true, writable: true });
|
103105
103105
|
} else {
|
@@ -103107,7 +103107,7 @@ var require_ora3 = __commonJS({
|
|
103107
103107
|
}
|
103108
103108
|
return e3;
|
103109
103109
|
}
|
103110
|
-
function
|
103110
|
+
function _classCallCheck16(e3, t3) {
|
103111
103111
|
if (!(e3 instanceof t3)) {
|
103112
103112
|
throw new TypeError("Cannot call a class as a function");
|
103113
103113
|
}
|
@@ -103122,7 +103122,7 @@ var require_ora3 = __commonJS({
|
|
103122
103122
|
Object.defineProperty(e3, i2.key, i2);
|
103123
103123
|
}
|
103124
103124
|
}
|
103125
|
-
function
|
103125
|
+
function _createClass16(e3, t3, r3) {
|
103126
103126
|
if (t3)
|
103127
103127
|
_defineProperties24(e3.prototype, t3);
|
103128
103128
|
if (r3)
|
@@ -103137,12 +103137,12 @@ var require_ora3 = __commonJS({
|
|
103137
103137
|
}
|
103138
103138
|
e2.exports = function() {
|
103139
103139
|
function BufferList() {
|
103140
|
-
|
103140
|
+
_classCallCheck16(this, BufferList);
|
103141
103141
|
this.head = null;
|
103142
103142
|
this.tail = null;
|
103143
103143
|
this.length = 0;
|
103144
103144
|
}
|
103145
|
-
|
103145
|
+
_createClass16(BufferList, [{ key: "push", value: function push(e3) {
|
103146
103146
|
var t3 = { data: e3, next: null };
|
103147
103147
|
if (this.length > 0)
|
103148
103148
|
this.tail.next = t3;
|
@@ -103262,7 +103262,7 @@ var require_ora3 = __commonJS({
|
|
103262
103262
|
this.length -= i2;
|
103263
103263
|
return t3;
|
103264
103264
|
} }, { key: o, value: function value(e3, t3) {
|
103265
|
-
return a(this,
|
103265
|
+
return a(this, _objectSpread9({}, t3, { depth: 0, customInspect: false }));
|
103266
103266
|
} }]);
|
103267
103267
|
return BufferList;
|
103268
103268
|
}();
|
@@ -103462,7 +103462,7 @@ var require_ora3 = __commonJS({
|
|
103462
103462
|
Promise.resolve(f).then(i2, n);
|
103463
103463
|
}
|
103464
103464
|
}
|
103465
|
-
function
|
103465
|
+
function _asyncToGenerator29(e3) {
|
103466
103466
|
return function() {
|
103467
103467
|
var t3 = this, r3 = arguments;
|
103468
103468
|
return new Promise(function(i2, n) {
|
@@ -103489,12 +103489,12 @@ var require_ora3 = __commonJS({
|
|
103489
103489
|
}
|
103490
103490
|
return r3;
|
103491
103491
|
}
|
103492
|
-
function
|
103492
|
+
function _objectSpread9(e3) {
|
103493
103493
|
for (var t3 = 1; t3 < arguments.length; t3++) {
|
103494
103494
|
var r3 = arguments[t3] != null ? arguments[t3] : {};
|
103495
103495
|
if (t3 % 2) {
|
103496
103496
|
ownKeys9(Object(r3), true).forEach(function(t4) {
|
103497
|
-
|
103497
|
+
_defineProperty20(e3, t4, r3[t4]);
|
103498
103498
|
});
|
103499
103499
|
} else if (Object.getOwnPropertyDescriptors) {
|
103500
103500
|
Object.defineProperties(e3, Object.getOwnPropertyDescriptors(r3));
|
@@ -103506,7 +103506,7 @@ var require_ora3 = __commonJS({
|
|
103506
103506
|
}
|
103507
103507
|
return e3;
|
103508
103508
|
}
|
103509
|
-
function
|
103509
|
+
function _defineProperty20(e3, t3, r3) {
|
103510
103510
|
if (t3 in e3) {
|
103511
103511
|
Object.defineProperty(e3, t3, { value: r3, enumerable: true, configurable: true, writable: true });
|
103512
103512
|
} else {
|
@@ -103525,7 +103525,7 @@ var require_ora3 = __commonJS({
|
|
103525
103525
|
n = t3[Symbol.iterator]();
|
103526
103526
|
else
|
103527
103527
|
throw new i("iterable", ["Iterable"], t3);
|
103528
|
-
var s = new e3(
|
103528
|
+
var s = new e3(_objectSpread9({ objectMode: true }, r3));
|
103529
103529
|
var a = false;
|
103530
103530
|
s._read = function() {
|
103531
103531
|
if (!a) {
|
@@ -103537,7 +103537,7 @@ var require_ora3 = __commonJS({
|
|
103537
103537
|
return _next2.apply(this, arguments);
|
103538
103538
|
}
|
103539
103539
|
function _next2() {
|
103540
|
-
_next2 =
|
103540
|
+
_next2 = _asyncToGenerator29(function* () {
|
103541
103541
|
try {
|
103542
103542
|
var e4 = yield n.next(), t4 = e4.value, r4 = e4.done;
|
103543
103543
|
if (r4) {
|
@@ -145173,26 +145173,29 @@ function getObjKeyMap2(obj, prefix = "") {
|
|
145173
145173
|
if ((0, import_lodash7.isString)(obj[key])) {
|
145174
145174
|
result[key] = prefix ? `${prefix}.${key}` : key;
|
145175
145175
|
} else if ((0, import_lodash7.isObject)(obj[key])) {
|
145176
|
-
result[key] = getObjKeyMap2(
|
145177
|
-
obj[key],
|
145178
|
-
prefix ? `${prefix}.${key}` : key
|
145179
|
-
);
|
145176
|
+
result[key] = getObjKeyMap2(obj[key], prefix ? `${prefix}.${key}` : key);
|
145180
145177
|
}
|
145181
145178
|
});
|
145182
145179
|
return result;
|
145183
145180
|
}
|
145184
145181
|
|
145185
145182
|
// ../../../cli/plugin-i18n/dist/esm-node/index.js
|
145186
|
-
|
145187
|
-
|
145188
|
-
|
145189
|
-
|
145183
|
+
function _define_property(obj, key, value) {
|
145184
|
+
if (key in obj) {
|
145185
|
+
Object.defineProperty(obj, key, {
|
145186
|
+
value,
|
145187
|
+
enumerable: true,
|
145188
|
+
configurable: true,
|
145189
|
+
writable: true
|
145190
|
+
});
|
145191
|
+
} else {
|
145192
|
+
obj[key] = value;
|
145190
145193
|
}
|
145194
|
+
return obj;
|
145195
|
+
}
|
145196
|
+
var I18n2 = class {
|
145191
145197
|
format(msg, vars) {
|
145192
|
-
return msg.replace(
|
145193
|
-
/\{(\w+)\}/g,
|
145194
|
-
(_match, capture) => Object.prototype.hasOwnProperty.call(vars, capture) ? vars[capture] : capture
|
145195
|
-
);
|
145198
|
+
return msg.replace(/\{(\w+)\}/g, (_match, capture) => Object.prototype.hasOwnProperty.call(vars, capture) ? vars[capture] : capture);
|
145196
145199
|
}
|
145197
145200
|
getMessage(lang, key, vars, fallbackText) {
|
145198
145201
|
const languages = Object.keys(this.languageMap);
|
@@ -145229,6 +145232,10 @@ var I18n2 = class {
|
|
145229
145232
|
t: (key, vars, fallbackText) => this.getMessage(lang, key, vars, fallbackText)
|
145230
145233
|
};
|
145231
145234
|
}
|
145235
|
+
constructor() {
|
145236
|
+
_define_property(this, "language", "en");
|
145237
|
+
_define_property(this, "languageMap", {});
|
145238
|
+
}
|
145232
145239
|
};
|
145233
145240
|
|
145234
145241
|
// ../../generator-common/dist/esm-node/locale/zh.js
|
@@ -145428,90 +145435,61 @@ var EN_LOCALE2 = {
|
|
145428
145435
|
|
145429
145436
|
// ../../generator-common/dist/esm-node/locale/index.js
|
145430
145437
|
var i18n2 = new I18n2();
|
145431
|
-
var localeKeys2 = i18n2.init("en", {
|
145438
|
+
var localeKeys2 = i18n2.init("en", {
|
145439
|
+
zh: ZH_LOCALE2,
|
145440
|
+
en: EN_LOCALE2
|
145441
|
+
});
|
145432
145442
|
|
145433
145443
|
// ../../generator-common/dist/esm-node/common/boolean.js
|
145434
|
-
var BooleanConfig
|
145444
|
+
var BooleanConfig;
|
145445
|
+
(function(BooleanConfig2) {
|
145435
145446
|
BooleanConfig2["NO"] = "no";
|
145436
145447
|
BooleanConfig2["YES"] = "yes";
|
145437
|
-
|
145438
|
-
|
145448
|
+
})(BooleanConfig || (BooleanConfig = {}));
|
145449
|
+
var BooleanConfigName = {
|
145450
|
+
[BooleanConfig.NO]: () => i18n2.t(localeKeys2.boolean.no),
|
145451
|
+
[BooleanConfig.YES]: () => i18n2.t(localeKeys2.boolean.yes)
|
145452
|
+
};
|
145439
145453
|
|
145440
145454
|
// ../../generator-common/dist/esm-node/common/solution.js
|
145441
|
-
var Solution
|
145455
|
+
var Solution;
|
145456
|
+
(function(Solution22) {
|
145442
145457
|
Solution22["MWA"] = "mwa";
|
145443
145458
|
Solution22["Module"] = "module";
|
145444
145459
|
Solution22["Doc"] = "doc";
|
145445
145460
|
Solution22["Monorepo"] = "monorepo";
|
145446
|
-
|
145447
|
-
|
145448
|
-
|
145461
|
+
})(Solution || (Solution = {}));
|
145462
|
+
var SubSolution;
|
145463
|
+
(function(SubSolution22) {
|
145449
145464
|
SubSolution22["MWA"] = "mwa";
|
145450
145465
|
SubSolution22["MWATest"] = "mwa_test";
|
145451
145466
|
SubSolution22["Module"] = "module";
|
145452
145467
|
SubSolution22["InnerModule"] = "inner_module";
|
145453
|
-
|
145454
|
-
})(SubSolution || {});
|
145468
|
+
})(SubSolution || (SubSolution = {}));
|
145455
145469
|
var SolutionText = {
|
145456
|
-
[
|
145457
|
-
|
145458
|
-
|
145459
|
-
]: () => i18n2.t(localeKeys2.solution.
|
145460
|
-
[
|
145461
|
-
"module"
|
145462
|
-
/* Module */
|
145463
|
-
]: () => i18n2.t(localeKeys2.solution.module),
|
145464
|
-
[
|
145465
|
-
"doc"
|
145466
|
-
/* Doc */
|
145467
|
-
]: () => i18n2.t(localeKeys2.solution.doc),
|
145468
|
-
[
|
145469
|
-
"monorepo"
|
145470
|
-
/* Monorepo */
|
145471
|
-
]: () => i18n2.t(localeKeys2.solution.monorepo)
|
145470
|
+
[Solution.MWA]: () => i18n2.t(localeKeys2.solution.mwa),
|
145471
|
+
[Solution.Module]: () => i18n2.t(localeKeys2.solution.module),
|
145472
|
+
[Solution.Doc]: () => i18n2.t(localeKeys2.solution.doc),
|
145473
|
+
[Solution.Monorepo]: () => i18n2.t(localeKeys2.solution.monorepo)
|
145472
145474
|
};
|
145473
145475
|
var SubSolutionText = {
|
145474
|
-
[
|
145475
|
-
|
145476
|
-
|
145477
|
-
]: () => i18n2.t(localeKeys2.sub_solution.
|
145478
|
-
[
|
145479
|
-
"mwa_test"
|
145480
|
-
/* MWATest */
|
145481
|
-
]: () => i18n2.t(localeKeys2.sub_solution.mwa_test),
|
145482
|
-
[
|
145483
|
-
"module"
|
145484
|
-
/* Module */
|
145485
|
-
]: () => i18n2.t(localeKeys2.sub_solution.module),
|
145486
|
-
[
|
145487
|
-
"inner_module"
|
145488
|
-
/* InnerModule */
|
145489
|
-
]: () => i18n2.t(localeKeys2.sub_solution.inner_module)
|
145476
|
+
[SubSolution.MWA]: () => i18n2.t(localeKeys2.sub_solution.mwa),
|
145477
|
+
[SubSolution.MWATest]: () => i18n2.t(localeKeys2.sub_solution.mwa_test),
|
145478
|
+
[SubSolution.Module]: () => i18n2.t(localeKeys2.sub_solution.module),
|
145479
|
+
[SubSolution.InnerModule]: () => i18n2.t(localeKeys2.sub_solution.inner_module)
|
145490
145480
|
};
|
145491
145481
|
var SolutionToolsMap = {
|
145492
|
-
[
|
145493
|
-
|
145494
|
-
|
145495
|
-
]: "@modern-js/
|
145496
|
-
[
|
145497
|
-
"module"
|
145498
|
-
/* Module */
|
145499
|
-
]: "@modern-js/module-tools",
|
145500
|
-
[
|
145501
|
-
"doc"
|
145502
|
-
/* Doc */
|
145503
|
-
]: "@modern-js/doc-tools",
|
145504
|
-
[
|
145505
|
-
"monorepo"
|
145506
|
-
/* Monorepo */
|
145507
|
-
]: "@modern-js/monorepo-tools"
|
145482
|
+
[Solution.MWA]: "@modern-js/app-tools",
|
145483
|
+
[Solution.Module]: "@modern-js/module-tools",
|
145484
|
+
[Solution.Doc]: "@modern-js/doc-tools",
|
145485
|
+
[Solution.Monorepo]: "@modern-js/monorepo-tools"
|
145508
145486
|
};
|
145509
145487
|
function getSolutionNameFromSubSolution(solution) {
|
145510
|
-
if (solution ===
|
145511
|
-
return
|
145488
|
+
if (solution === SubSolution.MWATest) {
|
145489
|
+
return Solution.MWA;
|
145512
145490
|
}
|
145513
|
-
if (solution ===
|
145514
|
-
return
|
145491
|
+
if (solution === SubSolution.InnerModule) {
|
145492
|
+
return Solution.Module;
|
145515
145493
|
}
|
145516
145494
|
return solution;
|
145517
145495
|
}
|
@@ -145523,14 +145501,16 @@ var getSolutionSchema = (extra = {}) => {
|
|
145523
145501
|
type: "string",
|
145524
145502
|
title: extra.isMonorepo ? i18n2.t(localeKeys2.sub_solution.self) : i18n2.t(localeKeys2.solution.self),
|
145525
145503
|
enum: (() => {
|
145526
|
-
var
|
145527
|
-
const items = ((extra
|
145528
|
-
|
145529
|
-
).map((solution) =>
|
145530
|
-
|
145531
|
-
|
145532
|
-
|
145533
|
-
|
145504
|
+
var _extra_customPlugin, _extra_customPlugin_custom;
|
145505
|
+
const items = ((extra === null || extra === void 0 ? void 0 : extra.solutions) || Object.values((extra === null || extra === void 0 ? void 0 : extra.isMonorepo) ? SubSolution : Solution)).filter((solution) => {
|
145506
|
+
return !((extra === null || extra === void 0 ? void 0 : extra.isSubProject) && solution === Solution.Monorepo);
|
145507
|
+
}).map((solution) => {
|
145508
|
+
return {
|
145509
|
+
value: solution,
|
145510
|
+
label: (extra === null || extra === void 0 ? void 0 : extra.isMonorepo) ? SubSolutionText[solution]() : SolutionText[solution]()
|
145511
|
+
};
|
145512
|
+
});
|
145513
|
+
if (extra === null || extra === void 0 ? void 0 : (_extra_customPlugin = extra.customPlugin) === null || _extra_customPlugin === void 0 ? void 0 : (_extra_customPlugin_custom = _extra_customPlugin.custom) === null || _extra_customPlugin_custom === void 0 ? void 0 : _extra_customPlugin_custom.length) {
|
145534
145514
|
return [
|
145535
145515
|
...items,
|
145536
145516
|
{
|
@@ -145546,7 +145526,7 @@ var getSolutionSchema = (extra = {}) => {
|
|
145546
145526
|
};
|
145547
145527
|
};
|
145548
145528
|
var getScenesSchema = (extra = {}) => {
|
145549
|
-
const hasPlugin = (extra
|
145529
|
+
const hasPlugin = (extra === null || extra === void 0 ? void 0 : extra.customPlugin) && extra.customPlugin[(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) ? getSolutionNameFromSubSolution(extra === null || extra === void 0 ? void 0 : extra.solution) : extra === null || extra === void 0 ? void 0 : extra.solution] && extra.customPlugin[(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) ? getSolutionNameFromSubSolution(extra === null || extra === void 0 ? void 0 : extra.solution) : extra === null || extra === void 0 ? void 0 : extra.solution].length > 0;
|
145550
145530
|
return {
|
145551
145531
|
type: "object",
|
145552
145532
|
properties: hasPlugin ? {
|
@@ -145554,15 +145534,15 @@ var getScenesSchema = (extra = {}) => {
|
|
145554
145534
|
type: "string",
|
145555
145535
|
title: i18n2.t(localeKeys2.scenes.self),
|
145556
145536
|
enum: (() => {
|
145557
|
-
const solution = (extra
|
145558
|
-
const items = ((extra
|
145537
|
+
const solution = (extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) ? getSolutionNameFromSubSolution(extra === null || extra === void 0 ? void 0 : extra.solution) : extra === null || extra === void 0 ? void 0 : extra.solution;
|
145538
|
+
const items = ((extra === null || extra === void 0 ? void 0 : extra.customPlugin) ? (extra === null || extra === void 0 ? void 0 : extra.customPlugin[solution]) || [] : []).map((plugin) => ({
|
145559
145539
|
value: plugin.key,
|
145560
145540
|
label: plugin.name
|
145561
145541
|
}));
|
145562
145542
|
if (solution && solution !== "custom") {
|
145563
145543
|
items.unshift({
|
145564
145544
|
value: solution,
|
145565
|
-
label: `${(extra
|
145545
|
+
label: `${(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) ? SubSolutionText[solution]() : SolutionText[solution]()}(${i18n2.t(localeKeys2.solution.default)})`
|
145566
145546
|
});
|
145567
145547
|
}
|
145568
145548
|
return items;
|
@@ -145573,57 +145553,27 @@ var getScenesSchema = (extra = {}) => {
|
|
145573
145553
|
};
|
145574
145554
|
var BaseGenerator = "@modern-js/base-generator";
|
145575
145555
|
var SolutionGenerator = {
|
145576
|
-
[
|
145577
|
-
|
145578
|
-
|
145579
|
-
]: "@modern-js/
|
145580
|
-
[
|
145581
|
-
"module"
|
145582
|
-
/* Module */
|
145583
|
-
]: "@modern-js/module-generator",
|
145584
|
-
[
|
145585
|
-
"doc"
|
145586
|
-
/* Doc */
|
145587
|
-
]: "@modern-js/doc-generator",
|
145588
|
-
[
|
145589
|
-
"monorepo"
|
145590
|
-
/* Monorepo */
|
145591
|
-
]: "@modern-js/monorepo-generator"
|
145556
|
+
[Solution.MWA]: "@modern-js/mwa-generator",
|
145557
|
+
[Solution.Module]: "@modern-js/module-generator",
|
145558
|
+
[Solution.Doc]: "@modern-js/doc-generator",
|
145559
|
+
[Solution.Monorepo]: "@modern-js/monorepo-generator"
|
145592
145560
|
};
|
145593
145561
|
var SubSolutionGenerator = {
|
145594
|
-
[
|
145595
|
-
|
145596
|
-
|
145597
|
-
]: "@modern-js/
|
145598
|
-
[
|
145599
|
-
"mwa_test"
|
145600
|
-
/* MWATest */
|
145601
|
-
]: "@modern-js/mwa-generator",
|
145602
|
-
[
|
145603
|
-
"module"
|
145604
|
-
/* Module */
|
145605
|
-
]: "@modern-js/module-generator",
|
145606
|
-
[
|
145607
|
-
"inner_module"
|
145608
|
-
/* InnerModule */
|
145609
|
-
]: "@modern-js/module-generator"
|
145562
|
+
[SubSolution.MWA]: "@modern-js/mwa-generator",
|
145563
|
+
[SubSolution.MWATest]: "@modern-js/mwa-generator",
|
145564
|
+
[SubSolution.Module]: "@modern-js/module-generator",
|
145565
|
+
[SubSolution.InnerModule]: "@modern-js/module-generator"
|
145610
145566
|
};
|
145611
145567
|
|
145612
145568
|
// ../../generator-common/dist/esm-node/common/language.js
|
145613
|
-
var Language
|
145569
|
+
var Language;
|
145570
|
+
(function(Language2) {
|
145614
145571
|
Language2["TS"] = "ts";
|
145615
145572
|
Language2["JS"] = "js";
|
145616
|
-
|
145617
|
-
})(Language || {});
|
145573
|
+
})(Language || (Language = {}));
|
145618
145574
|
var LanguageName = {
|
145619
|
-
[
|
145620
|
-
|
145621
|
-
/* TS */
|
145622
|
-
]: "TS",
|
145623
|
-
[
|
145624
|
-
"js"
|
145625
|
-
/* JS */
|
145626
|
-
]: "ES6+"
|
145575
|
+
[Language.TS]: "TS",
|
145576
|
+
[Language.JS]: "ES6+"
|
145627
145577
|
};
|
145628
145578
|
var getLanguageSchema = (_extra = {}) => {
|
145629
145579
|
return {
|
@@ -145637,33 +145587,24 @@ var getLanguageSchema = (_extra = {}) => {
|
|
145637
145587
|
};
|
145638
145588
|
|
145639
145589
|
// ../../generator-common/dist/esm-node/common/packageManager.js
|
145640
|
-
var PackageManager
|
145590
|
+
var PackageManager;
|
145591
|
+
(function(PackageManager2) {
|
145641
145592
|
PackageManager2["Pnpm"] = "pnpm";
|
145642
145593
|
PackageManager2["Yarn"] = "yarn";
|
145643
145594
|
PackageManager2["Npm"] = "npm";
|
145644
|
-
|
145645
|
-
})(PackageManager || {});
|
145595
|
+
})(PackageManager || (PackageManager = {}));
|
145646
145596
|
var PackageManagerName = {
|
145647
|
-
[
|
145648
|
-
|
145649
|
-
|
145650
|
-
]: "pnpm",
|
145651
|
-
[
|
145652
|
-
"yarn"
|
145653
|
-
/* Yarn */
|
145654
|
-
]: "Yarn",
|
145655
|
-
[
|
145656
|
-
"npm"
|
145657
|
-
/* Npm */
|
145658
|
-
]: "npm"
|
145597
|
+
[PackageManager.Pnpm]: "pnpm",
|
145598
|
+
[PackageManager.Yarn]: "Yarn",
|
145599
|
+
[PackageManager.Npm]: "npm"
|
145659
145600
|
};
|
145660
145601
|
var getPackageManagerSchema = (extra = {}) => {
|
145661
145602
|
return {
|
145662
145603
|
type: "string",
|
145663
145604
|
title: i18n2.t(localeKeys2.packageManager.self),
|
145664
|
-
enum: Object.values(PackageManager).filter(
|
145665
|
-
|
145666
|
-
).map((packageManager) => ({
|
145605
|
+
enum: Object.values(PackageManager).filter((packageManager) => {
|
145606
|
+
return (extra === null || extra === void 0 ? void 0 : extra.solution) === "monorepo" ? packageManager !== PackageManager.Npm : true;
|
145607
|
+
}).map((packageManager) => ({
|
145667
145608
|
value: packageManager,
|
145668
145609
|
label: PackageManagerName[packageManager]
|
145669
145610
|
})),
|
@@ -145672,7 +145613,7 @@ var getPackageManagerSchema = (extra = {}) => {
|
|
145672
145613
|
dependencies: [],
|
145673
145614
|
fulfill: {
|
145674
145615
|
state: {
|
145675
|
-
visible: !(extra
|
145616
|
+
visible: !(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) && !(extra === null || extra === void 0 ? void 0 : extra.isSubProject)
|
145676
145617
|
}
|
145677
145618
|
}
|
145678
145619
|
}
|
@@ -145684,13 +145625,13 @@ var getPackageManagerSchema = (extra = {}) => {
|
|
145684
145625
|
var getPackageNameSchema = (extra = {}) => {
|
145685
145626
|
return {
|
145686
145627
|
type: "string",
|
145687
|
-
title: (extra
|
145628
|
+
title: (extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) ? i18n2.t(localeKeys2.packageName.sub_name) : i18n2.t(localeKeys2.packageName.self),
|
145688
145629
|
"x-reactions": [
|
145689
145630
|
{
|
145690
145631
|
dependencies: [],
|
145691
145632
|
fulfill: {
|
145692
145633
|
state: {
|
145693
|
-
visible: Boolean(extra
|
145634
|
+
visible: Boolean(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject) || !(extra === null || extra === void 0 ? void 0 : extra.isMwa) && !(extra === null || extra === void 0 ? void 0 : extra.isDoc)
|
145694
145635
|
}
|
145695
145636
|
}
|
145696
145637
|
}
|
@@ -145705,20 +145646,20 @@ var getPackageNameSchema = (extra = {}) => {
|
|
145705
145646
|
};
|
145706
145647
|
|
145707
145648
|
// ../../generator-common/dist/esm-node/common/packagePath.js
|
145708
|
-
var PackagePathRegex = new RegExp(
|
145709
|
-
"^[a-z0-9]*[-_/]?([a-z0-9]*[-_]?[a-z0-9]*)*[-_/]?[a-z0-9-_]+$"
|
145710
|
-
);
|
145649
|
+
var PackagePathRegex = new RegExp("^[a-z0-9-_]+[a-z0-9-/_]*$");
|
145711
145650
|
var getPackagePathSchema = (extra) => {
|
145712
145651
|
return {
|
145713
145652
|
type: "string",
|
145714
145653
|
title: i18n2.t(localeKeys2.packagePath.self),
|
145715
145654
|
"x-reactions": [
|
145716
145655
|
{
|
145717
|
-
dependencies: [
|
145656
|
+
dependencies: [
|
145657
|
+
"packageName"
|
145658
|
+
],
|
145718
145659
|
fulfill: {
|
145719
145660
|
state: {
|
145720
145661
|
value: "{{$deps[0]}}",
|
145721
|
-
visible: Boolean(extra
|
145662
|
+
visible: Boolean(extra === null || extra === void 0 ? void 0 : extra.isMonorepoSubProject)
|
145722
145663
|
}
|
145723
145664
|
}
|
145724
145665
|
}
|
@@ -145800,16 +145741,16 @@ var MonorepoDefaultConfig = {
|
|
145800
145741
|
};
|
145801
145742
|
|
145802
145743
|
// ../../generator-common/dist/esm-node/mwa/common.js
|
145803
|
-
var Framework
|
145744
|
+
var Framework;
|
145745
|
+
(function(Framework2) {
|
145804
145746
|
Framework2["Express"] = "express";
|
145805
145747
|
Framework2["Koa"] = "koa";
|
145806
|
-
|
145807
|
-
|
145808
|
-
|
145748
|
+
})(Framework || (Framework = {}));
|
145749
|
+
var BuildTools;
|
145750
|
+
(function(BuildTools2) {
|
145809
145751
|
BuildTools2["Webpack"] = "webpack";
|
145810
145752
|
BuildTools2["Rspack"] = "rspack";
|
145811
|
-
|
145812
|
-
})(BuildTools || {});
|
145753
|
+
})(BuildTools || (BuildTools = {}));
|
145813
145754
|
var getBuildToolsSchema = (_extra = {}) => {
|
145814
145755
|
return {
|
145815
145756
|
type: "string",
|
@@ -145820,6 +145761,10 @@ var getBuildToolsSchema = (_extra = {}) => {
|
|
145820
145761
|
}))
|
145821
145762
|
};
|
145822
145763
|
};
|
145764
|
+
var FrameworkAppendTypeContent = {
|
145765
|
+
[Framework.Express]: `/// <reference types='@modern-js/plugin-express/types' />`,
|
145766
|
+
[Framework.Koa]: `/// <reference types='@modern-js/plugin-koa/types' />`
|
145767
|
+
};
|
145823
145768
|
|
145824
145769
|
// ../../generator-common/dist/esm-node/mwa/project.js
|
145825
145770
|
var getMWASchemaProperties = (extra) => {
|
@@ -145845,18 +145790,19 @@ var MWADefaultConfig = {
|
|
145845
145790
|
};
|
145846
145791
|
|
145847
145792
|
// ../../generator-common/dist/esm-node/newAction/common/index.js
|
145848
|
-
var ActionType
|
145793
|
+
var ActionType;
|
145794
|
+
(function(ActionType2) {
|
145849
145795
|
ActionType2["Function"] = "function";
|
145850
145796
|
ActionType2["Element"] = "element";
|
145851
145797
|
ActionType2["Refactor"] = "refactor";
|
145852
|
-
|
145853
|
-
|
145854
|
-
|
145798
|
+
})(ActionType || (ActionType = {}));
|
145799
|
+
var ActionElement;
|
145800
|
+
(function(ActionElement2) {
|
145855
145801
|
ActionElement2["Entry"] = "entry";
|
145856
145802
|
ActionElement2["Server"] = "server";
|
145857
|
-
|
145858
|
-
|
145859
|
-
|
145803
|
+
})(ActionElement || (ActionElement = {}));
|
145804
|
+
var ActionFunction;
|
145805
|
+
(function(ActionFunction2) {
|
145860
145806
|
ActionFunction2["TailwindCSS"] = "tailwindcss";
|
145861
145807
|
ActionFunction2["BFF"] = "bff";
|
145862
145808
|
ActionFunction2["MicroFrontend"] = "micro_frontend";
|
@@ -145871,99 +145817,43 @@ var ActionFunction = /* @__PURE__ */ ((ActionFunction2) => {
|
|
145871
145817
|
ActionFunction2["Proxy"] = "proxy";
|
145872
145818
|
ActionFunction2["SWC"] = "swc";
|
145873
145819
|
ActionFunction2["Rspack"] = "rspack";
|
145874
|
-
|
145875
|
-
|
145876
|
-
|
145820
|
+
})(ActionFunction || (ActionFunction = {}));
|
145821
|
+
var ActionRefactor;
|
145822
|
+
(function(ActionRefactor2) {
|
145877
145823
|
ActionRefactor2["ReactRouter5"] = "react_router_5";
|
145878
|
-
|
145879
|
-
})(ActionRefactor || {});
|
145824
|
+
})(ActionRefactor || (ActionRefactor = {}));
|
145880
145825
|
var ActionTypeText = {
|
145881
|
-
[
|
145882
|
-
|
145883
|
-
|
145884
|
-
]: () => i18n2.t(localeKeys2.action.function.self),
|
145885
|
-
[
|
145886
|
-
"element"
|
145887
|
-
/* Element */
|
145888
|
-
]: () => i18n2.t(localeKeys2.action.element.self),
|
145889
|
-
[
|
145890
|
-
"refactor"
|
145891
|
-
/* Refactor */
|
145892
|
-
]: () => i18n2.t(localeKeys2.action.refactor.self)
|
145826
|
+
[ActionType.Function]: () => i18n2.t(localeKeys2.action.function.self),
|
145827
|
+
[ActionType.Element]: () => i18n2.t(localeKeys2.action.element.self),
|
145828
|
+
[ActionType.Refactor]: () => i18n2.t(localeKeys2.action.refactor.self)
|
145893
145829
|
};
|
145894
145830
|
var ActionElementText = {
|
145895
|
-
[
|
145896
|
-
|
145897
|
-
/* Entry */
|
145898
|
-
]: () => i18n2.t(localeKeys2.action.element.entry),
|
145899
|
-
[
|
145900
|
-
"server"
|
145901
|
-
/* Server */
|
145902
|
-
]: () => i18n2.t(localeKeys2.action.element.server)
|
145831
|
+
[ActionElement.Entry]: () => i18n2.t(localeKeys2.action.element.entry),
|
145832
|
+
[ActionElement.Server]: () => i18n2.t(localeKeys2.action.element.server)
|
145903
145833
|
};
|
145904
145834
|
var ActionFunctionText = {
|
145905
|
-
[
|
145906
|
-
|
145907
|
-
|
145908
|
-
]: () => i18n2.t(localeKeys2.action.function.
|
145909
|
-
[
|
145910
|
-
|
145911
|
-
|
145912
|
-
]: () => i18n2.t(localeKeys2.action.function.
|
145913
|
-
[
|
145914
|
-
|
145915
|
-
|
145916
|
-
]: () => i18n2.t(localeKeys2.action.function.
|
145917
|
-
[
|
145918
|
-
|
145919
|
-
/* I18n */
|
145920
|
-
]: () => i18n2.t(localeKeys2.action.function.i18n),
|
145921
|
-
[
|
145922
|
-
"test"
|
145923
|
-
/* Test */
|
145924
|
-
]: () => i18n2.t(localeKeys2.action.function.test),
|
145925
|
-
[
|
145926
|
-
"e2e_test"
|
145927
|
-
/* E2ETest */
|
145928
|
-
]: () => i18n2.t(localeKeys2.action.function.e2e_test),
|
145929
|
-
[
|
145930
|
-
"doc"
|
145931
|
-
/* Doc */
|
145932
|
-
]: () => i18n2.t(localeKeys2.action.function.doc),
|
145933
|
-
[
|
145934
|
-
"storybook"
|
145935
|
-
/* Storybook */
|
145936
|
-
]: () => i18n2.t(localeKeys2.action.function.storybook),
|
145937
|
-
[
|
145938
|
-
"runtimeApi"
|
145939
|
-
/* RuntimeApi */
|
145940
|
-
]: () => i18n2.t(localeKeys2.action.function.runtime_api),
|
145941
|
-
[
|
145942
|
-
"ssg"
|
145943
|
-
/* SSG */
|
145944
|
-
]: () => i18n2.t(localeKeys2.action.function.ssg),
|
145945
|
-
[
|
145946
|
-
"polyfill"
|
145947
|
-
/* Polyfill */
|
145948
|
-
]: () => i18n2.t(localeKeys2.action.function.polyfill),
|
145949
|
-
[
|
145950
|
-
"proxy"
|
145951
|
-
/* Proxy */
|
145952
|
-
]: () => i18n2.t(localeKeys2.action.function.proxy),
|
145953
|
-
[
|
145954
|
-
"swc"
|
145955
|
-
/* SWC */
|
145956
|
-
]: () => i18n2.t(localeKeys2.action.function.swc),
|
145957
|
-
[
|
145958
|
-
"rspack"
|
145959
|
-
/* Rspack */
|
145960
|
-
]: () => i18n2.t(localeKeys2.action.function.rspack)
|
145835
|
+
[ActionFunction.TailwindCSS]: () => i18n2.t(localeKeys2.action.function.tailwindcss),
|
145836
|
+
[ActionFunction.BFF]: () => i18n2.t(localeKeys2.action.function.bff),
|
145837
|
+
[ActionFunction.MicroFrontend]: () => i18n2.t(localeKeys2.action.function.micro_frontend),
|
145838
|
+
[ActionFunction.I18n]: () => i18n2.t(localeKeys2.action.function.i18n),
|
145839
|
+
[ActionFunction.Test]: () => i18n2.t(localeKeys2.action.function.test),
|
145840
|
+
[ActionFunction.E2ETest]: () => i18n2.t(localeKeys2.action.function.e2e_test),
|
145841
|
+
[ActionFunction.Doc]: () => i18n2.t(localeKeys2.action.function.doc),
|
145842
|
+
[ActionFunction.Storybook]: () => i18n2.t(localeKeys2.action.function.storybook),
|
145843
|
+
[ActionFunction.RuntimeApi]: () => i18n2.t(localeKeys2.action.function.runtime_api),
|
145844
|
+
[ActionFunction.SSG]: () => i18n2.t(localeKeys2.action.function.ssg),
|
145845
|
+
[ActionFunction.Polyfill]: () => i18n2.t(localeKeys2.action.function.polyfill),
|
145846
|
+
[ActionFunction.Proxy]: () => i18n2.t(localeKeys2.action.function.proxy),
|
145847
|
+
[ActionFunction.SWC]: () => i18n2.t(localeKeys2.action.function.swc),
|
145848
|
+
[ActionFunction.Rspack]: () => i18n2.t(localeKeys2.action.function.rspack)
|
145961
145849
|
};
|
145962
145850
|
var ActionRefactorText = {
|
145963
|
-
[
|
145964
|
-
|
145965
|
-
|
145966
|
-
]:
|
145851
|
+
[ActionRefactor.ReactRouter5]: () => i18n2.t(localeKeys2.action.refactor.react_router_5)
|
145852
|
+
};
|
145853
|
+
var ActionTypeTextMap = {
|
145854
|
+
[ActionType.Element]: ActionElementText,
|
145855
|
+
[ActionType.Function]: ActionFunctionText,
|
145856
|
+
[ActionType.Refactor]: ActionRefactorText
|
145967
145857
|
};
|
145968
145858
|
|
145969
145859
|
// ../../generator-common/dist/esm-node/newAction/mwa/index.js
|
@@ -145984,8 +145874,13 @@ var MWAActionFunctions = [
|
|
145984
145874
|
ActionFunction.Proxy,
|
145985
145875
|
ActionFunction.Storybook
|
145986
145876
|
];
|
145987
|
-
var MWAActionElements = [
|
145988
|
-
|
145877
|
+
var MWAActionElements = [
|
145878
|
+
ActionElement.Entry,
|
145879
|
+
ActionElement.Server
|
145880
|
+
];
|
145881
|
+
var MWAActionReactors = [
|
145882
|
+
ActionRefactor.ReactRouter5
|
145883
|
+
];
|
145989
145884
|
var MWAActionTypesMap = {
|
145990
145885
|
[ActionType.Element]: MWAActionElements,
|
145991
145886
|
[ActionType.Function]: MWAActionFunctions,
|
@@ -146001,14 +145896,12 @@ var getMWANewActionSchema = (extra = {}) => {
|
|
146001
145896
|
actionType: {
|
146002
145897
|
type: "string",
|
146003
145898
|
title: i18n2.t(localeKeys2.action.self),
|
146004
|
-
enum: MWAActionTypes.filter(
|
146005
|
-
(type) => type === ActionType.Function ? funcs.length > 0 : true
|
146006
|
-
).filter(
|
146007
|
-
(type) => type === ActionType.Refactor ? refactors.length > 0 : true
|
146008
|
-
).map((type) => ({
|
145899
|
+
enum: MWAActionTypes.filter((type) => type === ActionType.Function ? funcs.length > 0 : true).filter((type) => type === ActionType.Refactor ? refactors.length > 0 : true).map((type) => ({
|
146009
145900
|
value: type,
|
146010
145901
|
label: ActionTypeText[type](),
|
146011
|
-
type: [
|
145902
|
+
type: [
|
145903
|
+
"string"
|
145904
|
+
]
|
146012
145905
|
}))
|
146013
145906
|
},
|
146014
145907
|
[ActionType.Element]: {
|
@@ -146020,7 +145913,9 @@ var getMWANewActionSchema = (extra = {}) => {
|
|
146020
145913
|
})),
|
146021
145914
|
"x-reactions": [
|
146022
145915
|
{
|
146023
|
-
dependencies: [
|
145916
|
+
dependencies: [
|
145917
|
+
"actionType"
|
145918
|
+
],
|
146024
145919
|
fulfill: {
|
146025
145920
|
state: {
|
146026
145921
|
visible: '{{$deps[0] === "element"}}'
|
@@ -146038,7 +145933,9 @@ var getMWANewActionSchema = (extra = {}) => {
|
|
146038
145933
|
})),
|
146039
145934
|
"x-reactions": [
|
146040
145935
|
{
|
146041
|
-
dependencies: [
|
145936
|
+
dependencies: [
|
145937
|
+
"actionType"
|
145938
|
+
],
|
146042
145939
|
fulfill: {
|
146043
145940
|
state: {
|
146044
145941
|
visible: '{{$deps[0] === "function"}}'
|
@@ -146056,7 +145953,9 @@ var getMWANewActionSchema = (extra = {}) => {
|
|
146056
145953
|
})),
|
146057
145954
|
"x-reactions": [
|
146058
145955
|
{
|
146059
|
-
dependencies: [
|
145956
|
+
dependencies: [
|
145957
|
+
"actionType"
|
145958
|
+
],
|
146060
145959
|
fulfill: {
|
146061
145960
|
state: {
|
146062
145961
|
visible: '{{$deps[0] === "refactor"}}'
|
@@ -146162,7 +146061,9 @@ var BFFPluginDependence = {
|
|
146162
146061
|
};
|
146163
146062
|
|
146164
146063
|
// ../../generator-common/dist/esm-node/newAction/module/index.js
|
146165
|
-
var ModuleActionTypes = [
|
146064
|
+
var ModuleActionTypes = [
|
146065
|
+
ActionType.Function
|
146066
|
+
];
|
146166
146067
|
var ModuleActionFunctions = [
|
146167
146068
|
ActionFunction.Test,
|
146168
146069
|
ActionFunction.TailwindCSS,
|
@@ -146183,21 +146084,23 @@ var getModuleNewActionSchema = (extra = {}) => {
|
|
146183
146084
|
enum: ModuleActionTypes.map((type) => ({
|
146184
146085
|
value: type,
|
146185
146086
|
label: ActionTypeText[type](),
|
146186
|
-
type: [
|
146087
|
+
type: [
|
146088
|
+
"string"
|
146089
|
+
]
|
146187
146090
|
}))
|
146188
146091
|
},
|
146189
146092
|
[ActionType.Function]: {
|
146190
146093
|
type: "string",
|
146191
146094
|
title: ActionTypeText[ActionType.Function](),
|
146192
|
-
enum: ModuleActionFunctions.filter((func) => !funcMap[func]).map(
|
146193
|
-
|
146194
|
-
|
146195
|
-
|
146196
|
-
})
|
146197
|
-
),
|
146095
|
+
enum: ModuleActionFunctions.filter((func) => !funcMap[func]).map((func) => ({
|
146096
|
+
value: func,
|
146097
|
+
label: ActionFunctionText[func]()
|
146098
|
+
})),
|
146198
146099
|
"x-reactions": [
|
146199
146100
|
{
|
146200
|
-
dependencies: [
|
146101
|
+
dependencies: [
|
146102
|
+
"actionType"
|
146103
|
+
],
|
146201
146104
|
fulfill: {
|
146202
146105
|
state: {
|
146203
146106
|
visible: '{{$deps[0] === "function"}}'
|
@@ -146255,10 +146158,22 @@ var getMonorepoNewActionSchema = (extra = {}) => {
|
|
146255
146158
|
};
|
146256
146159
|
};
|
146257
146160
|
var MonorepoNewActionConfig = {
|
146258
|
-
[SubSolution.MWA]: {
|
146259
|
-
|
146260
|
-
|
146261
|
-
|
146161
|
+
[SubSolution.MWA]: {
|
146162
|
+
isMonorepoSubProject: true,
|
146163
|
+
isTest: false
|
146164
|
+
},
|
146165
|
+
[SubSolution.MWATest]: {
|
146166
|
+
isMonorepoSubProject: true,
|
146167
|
+
isTest: true
|
146168
|
+
},
|
146169
|
+
[SubSolution.Module]: {
|
146170
|
+
isMonorepoSubProject: true,
|
146171
|
+
isPublic: true
|
146172
|
+
},
|
146173
|
+
[SubSolution.InnerModule]: {
|
146174
|
+
isMonorepoSubProject: true,
|
146175
|
+
isPublic: false
|
146176
|
+
}
|
146262
146177
|
};
|
146263
146178
|
|
146264
146179
|
// ../../generator-common/dist/esm-node/index.js
|
@@ -146287,7 +146202,9 @@ var lazy = (moduleName, requireFn) => {
|
|
146287
146202
|
const importLazyLocal = require_import_lazy2()(requireFn);
|
146288
146203
|
return importLazyLocal(moduleName);
|
146289
146204
|
};
|
146290
|
-
var Import = {
|
146205
|
+
var Import = {
|
146206
|
+
lazy
|
146207
|
+
};
|
146291
146208
|
|
146292
146209
|
// ../../../toolkit/utils/dist/esm/compiled.js
|
146293
146210
|
var import_fs_extra = __toESM(require_fs_extra2());
|
@@ -146319,21 +146236,25 @@ var import_browserslist = __toESM(require_browserslist2());
|
|
146319
146236
|
var import_recursive_readdir = __toESM(require_recursive_readdir2());
|
146320
146237
|
var import_commander = __toESM(require_commander2());
|
146321
146238
|
var import_signale2 = __toESM(require_signale2());
|
146322
|
-
var mime = Import.lazy(
|
146323
|
-
|
146324
|
-
|
146325
|
-
);
|
146326
|
-
var chokidar = Import.lazy(
|
146327
|
-
"../compiled/chokidar",
|
146328
|
-
require
|
146329
|
-
);
|
146330
|
-
var inquirer3 = Import.lazy(
|
146331
|
-
"../compiled/inquirer",
|
146332
|
-
require
|
146333
|
-
);
|
146239
|
+
var mime = Import.lazy("../compiled/mime-types", require);
|
146240
|
+
var chokidar = Import.lazy("../compiled/chokidar", require);
|
146241
|
+
var inquirer3 = Import.lazy("../compiled/inquirer", require);
|
146334
146242
|
|
146335
146243
|
// ../../../toolkit/utils/dist/esm/logger.js
|
146336
146244
|
var import_chalk2 = __toESM(require_chalk2());
|
146245
|
+
function _define_property2(obj, key, value) {
|
146246
|
+
if (key in obj) {
|
146247
|
+
Object.defineProperty(obj, key, {
|
146248
|
+
value,
|
146249
|
+
enumerable: true,
|
146250
|
+
configurable: true,
|
146251
|
+
writable: true
|
146252
|
+
});
|
146253
|
+
} else {
|
146254
|
+
obj[key] = value;
|
146255
|
+
}
|
146256
|
+
return obj;
|
146257
|
+
}
|
146337
146258
|
var LOG_LEVEL = {
|
146338
146259
|
error: 0,
|
146339
146260
|
warn: 1,
|
@@ -146367,22 +146288,15 @@ var LOG_TYPES = {
|
|
146367
146288
|
label: "debug",
|
146368
146289
|
level: "debug"
|
146369
146290
|
},
|
146370
|
-
log: {
|
146291
|
+
log: {
|
146292
|
+
level: "log"
|
146293
|
+
}
|
146371
146294
|
};
|
146372
146295
|
var DEFAULT_CONFIG = {
|
146373
146296
|
displayLabel: true,
|
146374
146297
|
uppercaseLabel: false
|
146375
146298
|
};
|
146376
146299
|
var Logger2 = class {
|
146377
|
-
constructor(options = {}) {
|
146378
|
-
this.level = options.level || LOG_TYPES.log.level;
|
146379
|
-
this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
|
146380
|
-
this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
|
146381
|
-
this.longestLabel = this.getLongestLabel();
|
146382
|
-
Object.keys(this.types).forEach((type) => {
|
146383
|
-
this[type] = this._log.bind(this, type);
|
146384
|
-
});
|
146385
|
-
}
|
146386
146300
|
_log(type, message, ...args) {
|
146387
146301
|
if (message === void 0 || message === null) {
|
146388
146302
|
console.log();
|
@@ -146423,6 +146337,19 @@ ${import_chalk2.default.grey(rest.join("\n"))}`;
|
|
146423
146337
|
});
|
146424
146338
|
return longestLabel;
|
146425
146339
|
}
|
146340
|
+
constructor(options = {}) {
|
146341
|
+
_define_property2(this, "level", void 0);
|
146342
|
+
_define_property2(this, "config", void 0);
|
146343
|
+
_define_property2(this, "types", void 0);
|
146344
|
+
_define_property2(this, "longestLabel", void 0);
|
146345
|
+
this.level = options.level || LOG_TYPES.log.level;
|
146346
|
+
this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
|
146347
|
+
this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
|
146348
|
+
this.longestLabel = this.getLongestLabel();
|
146349
|
+
Object.keys(this.types).forEach((type) => {
|
146350
|
+
this[type] = this._log.bind(this, type);
|
146351
|
+
});
|
146352
|
+
}
|
146426
146353
|
};
|
146427
146354
|
var logger = new Logger2();
|
146428
146355
|
logger.Logger = Logger2;
|
@@ -146435,7 +146362,11 @@ var import_path11 = __toESM(require("path"));
|
|
146435
146362
|
function canUseNpm2() {
|
146436
146363
|
return __async(this, null, function* () {
|
146437
146364
|
try {
|
146438
|
-
yield (0, import_execa.default)("npm", [
|
146365
|
+
yield (0, import_execa.default)("npm", [
|
146366
|
+
"--version"
|
146367
|
+
], {
|
146368
|
+
env: process.env
|
146369
|
+
});
|
146439
146370
|
return true;
|
146440
146371
|
} catch (e) {
|
146441
146372
|
return false;
|
@@ -146445,7 +146376,11 @@ function canUseNpm2() {
|
|
146445
146376
|
function canUseYarn3() {
|
146446
146377
|
return __async(this, null, function* () {
|
146447
146378
|
try {
|
146448
|
-
yield (0, import_execa.default)("yarn", [
|
146379
|
+
yield (0, import_execa.default)("yarn", [
|
146380
|
+
"--version"
|
146381
|
+
], {
|
146382
|
+
env: process.env
|
146383
|
+
});
|
146449
146384
|
return true;
|
146450
146385
|
} catch (e) {
|
146451
146386
|
return false;
|
@@ -146455,7 +146390,11 @@ function canUseYarn3() {
|
|
146455
146390
|
function canUsePnpm3() {
|
146456
146391
|
return __async(this, null, function* () {
|
146457
146392
|
try {
|
146458
|
-
yield (0, import_execa.default)("pnpm", [
|
146393
|
+
yield (0, import_execa.default)("pnpm", [
|
146394
|
+
"--version"
|
146395
|
+
], {
|
146396
|
+
env: process.env
|
146397
|
+
});
|
146459
146398
|
return true;
|
146460
146399
|
} catch (e) {
|
146461
146400
|
return false;
|
@@ -146509,25 +146448,40 @@ function stripAnsi3(string) {
|
|
146509
146448
|
|
146510
146449
|
// ../../generator-utils/dist/esm/locale/zh.js
|
146511
146450
|
var ZH_LOCALE3 = {
|
146512
|
-
packageName: {
|
146513
|
-
|
146451
|
+
packageName: {
|
146452
|
+
exit: "项目名称 {value} 已存在"
|
146453
|
+
},
|
146454
|
+
packagePath: {
|
146455
|
+
exit: "目录 {value} 已存在"
|
146456
|
+
}
|
146514
146457
|
};
|
146515
146458
|
|
146516
146459
|
// ../../generator-utils/dist/esm/locale/en.js
|
146517
146460
|
var EN_LOCALE3 = {
|
146518
|
-
packageName: {
|
146519
|
-
|
146461
|
+
packageName: {
|
146462
|
+
exit: "package name `{value}` is already exists"
|
146463
|
+
},
|
146464
|
+
packagePath: {
|
146465
|
+
exit: "package path {value} is already exists"
|
146466
|
+
}
|
146520
146467
|
};
|
146521
146468
|
|
146522
146469
|
// ../../generator-utils/dist/esm/locale/index.js
|
146523
146470
|
var i18n3 = new I18n2();
|
146524
|
-
var localeKeys3 = i18n3.init("en", {
|
146471
|
+
var localeKeys3 = i18n3.init("en", {
|
146472
|
+
zh: ZH_LOCALE3,
|
146473
|
+
en: EN_LOCALE3
|
146474
|
+
});
|
146525
146475
|
|
146526
146476
|
// ../../generator-utils/dist/esm/utils/package.js
|
146527
146477
|
function isPackageExist(packageName, registry2) {
|
146528
146478
|
return __async(this, null, function* () {
|
146529
146479
|
if (yield canUseNpm2()) {
|
146530
|
-
const args = [
|
146480
|
+
const args = [
|
146481
|
+
"view",
|
146482
|
+
packageName,
|
146483
|
+
"version"
|
146484
|
+
];
|
146531
146485
|
if (registry2) {
|
146532
146486
|
args.push(`--registry=${registry2}`);
|
146533
146487
|
}
|
@@ -146540,7 +146494,11 @@ function isPackageExist(packageName, registry2) {
|
|
146540
146494
|
function isPackageDeprecated(packageName, registry2) {
|
146541
146495
|
return __async(this, null, function* () {
|
146542
146496
|
if (yield canUseNpm2()) {
|
146543
|
-
const args = [
|
146497
|
+
const args = [
|
146498
|
+
"view",
|
146499
|
+
packageName,
|
146500
|
+
"deprecated"
|
146501
|
+
];
|
146544
146502
|
if (registry2) {
|
146545
146503
|
args.push(`--registry=${registry2}`);
|
146546
146504
|
}
|
@@ -146551,7 +146509,9 @@ function isPackageDeprecated(packageName, registry2) {
|
|
146551
146509
|
});
|
146552
146510
|
}
|
146553
146511
|
function semverDecrease(version) {
|
146554
|
-
const versionObj = import_semver.default.parse(version, {
|
146512
|
+
const versionObj = import_semver.default.parse(version, {
|
146513
|
+
loose: true
|
146514
|
+
});
|
146555
146515
|
if (!versionObj) {
|
146556
146516
|
throw new Error(`Version ${version} is not valid semver`);
|
146557
146517
|
}
|
@@ -146598,7 +146558,11 @@ function getPackageVersion(packageName, registry2) {
|
|
146598
146558
|
spinner: "runner"
|
146599
146559
|
}).start();
|
146600
146560
|
if (yield canUsePnpm3()) {
|
146601
|
-
const args = [
|
146561
|
+
const args = [
|
146562
|
+
"info",
|
146563
|
+
packageName,
|
146564
|
+
"version"
|
146565
|
+
];
|
146602
146566
|
if (registry2) {
|
146603
146567
|
args.push(`--registry=${registry2}`);
|
146604
146568
|
}
|
@@ -146607,7 +146571,11 @@ function getPackageVersion(packageName, registry2) {
|
|
146607
146571
|
return stripAnsi3(result.stdout);
|
146608
146572
|
}
|
146609
146573
|
if (yield canUseNpm2()) {
|
146610
|
-
const args = [
|
146574
|
+
const args = [
|
146575
|
+
"view",
|
146576
|
+
packageName,
|
146577
|
+
"version"
|
146578
|
+
];
|
146611
146579
|
if (registry2) {
|
146612
146580
|
args.push(`--registry=${registry2}`);
|
146613
146581
|
}
|
@@ -146625,20 +146593,17 @@ function getModernPluginVersion(_0, _1) {
|
|
146625
146593
|
}) {
|
146626
146594
|
const { cwd = process.cwd(), registry: registry2, distTag } = options;
|
146627
146595
|
const getLatetPluginVersion = (tag) => __async(this, null, function* () {
|
146628
|
-
const version = yield getPackageVersion(
|
146629
|
-
`${packageName}@${tag || distTag || "latest"}`,
|
146630
|
-
registry2
|
146631
|
-
);
|
146596
|
+
const version = yield getPackageVersion(`${packageName}@${tag || distTag || "latest"}`, registry2);
|
146632
146597
|
return version;
|
146633
146598
|
});
|
146634
146599
|
if (!packageName.startsWith("@modern-js") || packageName.includes("electron") || packageName.includes("codesmith") || packageName.includes("easy-form") || packageName.startsWith("@modern-js-reduck")) {
|
146635
146600
|
return getLatetPluginVersion("latest");
|
146636
146601
|
}
|
146637
|
-
const pkgPath = import_path12.default.join(
|
146638
|
-
|
146639
|
-
|
146640
|
-
|
146641
|
-
);
|
146602
|
+
const pkgPath = import_path12.default.join(require.resolve(SolutionToolsMap[solution], {
|
146603
|
+
paths: [
|
146604
|
+
cwd
|
146605
|
+
]
|
146606
|
+
}), "../../../../", "package.json");
|
146642
146607
|
if (import_fs_extra.default.existsSync(pkgPath)) {
|
146643
146608
|
const pkgInfo = import_fs_extra.default.readJSONSync(pkgPath);
|
146644
146609
|
const modernVersion = pkgInfo.version;
|
@@ -147145,7 +147110,7 @@ function asyncGeneratorStep29(gen, resolve, reject, _next, _throw, key, arg) {
|
|
147145
147110
|
Promise.resolve(value).then(_next, _throw);
|
147146
147111
|
}
|
147147
147112
|
}
|
147148
|
-
function
|
147113
|
+
function _async_to_generator(fn) {
|
147149
147114
|
return function() {
|
147150
147115
|
var self3 = this, args = arguments;
|
147151
147116
|
return new Promise(function(resolve, reject) {
|
@@ -147160,7 +147125,7 @@ function _asyncToGenerator29(fn) {
|
|
147160
147125
|
});
|
147161
147126
|
};
|
147162
147127
|
}
|
147163
|
-
function
|
147128
|
+
function _define_property3(obj, key, value) {
|
147164
147129
|
if (key in obj) {
|
147165
147130
|
Object.defineProperty(obj, key, {
|
147166
147131
|
value,
|
@@ -147173,17 +147138,17 @@ function _defineProperty20(obj, key, value) {
|
|
147173
147138
|
}
|
147174
147139
|
return obj;
|
147175
147140
|
}
|
147176
|
-
function
|
147141
|
+
function _object_spread(target) {
|
147177
147142
|
for (var i = 1; i < arguments.length; i++) {
|
147178
147143
|
var source = arguments[i] != null ? arguments[i] : {};
|
147179
|
-
var
|
147144
|
+
var ownKeys22 = Object.keys(source);
|
147180
147145
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
147181
|
-
|
147146
|
+
ownKeys22 = ownKeys22.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
147182
147147
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
147183
147148
|
}));
|
147184
147149
|
}
|
147185
|
-
|
147186
|
-
|
147150
|
+
ownKeys22.forEach(function(key) {
|
147151
|
+
_define_property3(target, key, source[key]);
|
147187
147152
|
});
|
147188
147153
|
}
|
147189
147154
|
return target;
|
@@ -147201,7 +147166,7 @@ function ownKeys6(object, enumerableOnly) {
|
|
147201
147166
|
}
|
147202
147167
|
return keys;
|
147203
147168
|
}
|
147204
|
-
function
|
147169
|
+
function _object_spread_props(target, source) {
|
147205
147170
|
source = source != null ? source : {};
|
147206
147171
|
if (Object.getOwnPropertyDescriptors) {
|
147207
147172
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
@@ -147314,11 +147279,18 @@ var __generator34 = function(thisArg, body) {
|
|
147314
147279
|
};
|
147315
147280
|
}
|
147316
147281
|
};
|
147282
|
+
var FileType;
|
147283
|
+
(function(FileType22) {
|
147284
|
+
FileType22["Text"] = "text";
|
147285
|
+
FileType22["Binary"] = "binary";
|
147286
|
+
FileType22["Json"] = "json";
|
147287
|
+
FileType22["TextRaw"] = "textRaw";
|
147288
|
+
})(FileType || (FileType = {}));
|
147317
147289
|
function fileExists(filePath) {
|
147318
147290
|
return _fileExists.apply(this, arguments);
|
147319
147291
|
}
|
147320
147292
|
function _fileExists() {
|
147321
|
-
_fileExists =
|
147293
|
+
_fileExists = _async_to_generator(function(filePath) {
|
147322
147294
|
var e;
|
147323
147295
|
return __generator34(this, function(_state) {
|
147324
147296
|
switch (_state.label) {
|
@@ -147375,7 +147347,7 @@ function addFile(config, projectPath, templatePath, renderString3) {
|
|
147375
147347
|
return _addFile.apply(this, arguments);
|
147376
147348
|
}
|
147377
147349
|
function _addFile() {
|
147378
|
-
_addFile =
|
147350
|
+
_addFile = _async_to_generator(function(config, projectPath, templatePath, renderString3) {
|
147379
147351
|
var fileDestPath, destExists, absTemplatePath, rawTemplate, template;
|
147380
147352
|
return __generator34(this, function(_state) {
|
147381
147353
|
switch (_state.label) {
|
@@ -147399,7 +147371,7 @@ function _addFile() {
|
|
147399
147371
|
case 2:
|
147400
147372
|
_state.sent();
|
147401
147373
|
absTemplatePath = config.templateFile ? import_path13.default.join(templatePath, config.templateFile) : null;
|
147402
|
-
if (!(absTemplatePath != null && (config.type ===
|
147374
|
+
if (!(absTemplatePath != null && (config.type === FileType.Binary || Object.keys(config.data || {}).length === 0)))
|
147403
147375
|
return [
|
147404
147376
|
3,
|
147405
147377
|
5
|
@@ -147455,7 +147427,7 @@ function addManyFiles(config, projectPath, templatePath, renderString3) {
|
|
147455
147427
|
return _addManyFiles.apply(this, arguments);
|
147456
147428
|
}
|
147457
147429
|
function _addManyFiles() {
|
147458
|
-
_addManyFiles =
|
147430
|
+
_addManyFiles = _async_to_generator(function(config, projectPath, templatePath, renderString3) {
|
147459
147431
|
var _config_templateBase, dest, templateFiles, filesAdded, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, templateFile, absTemplatePath, targetFile, fileCfg, addedPath, err;
|
147460
147432
|
return __generator34(this, function(_state) {
|
147461
147433
|
switch (_state.label) {
|
@@ -147499,7 +147471,7 @@ function _addManyFiles() {
|
|
147499
147471
|
templateFile = _step.value;
|
147500
147472
|
absTemplatePath = import_path13.default.resolve(templatePath, templateFile);
|
147501
147473
|
targetFile = dropFileRootPath(templateFile, config.templateBase);
|
147502
|
-
fileCfg =
|
147474
|
+
fileCfg = _object_spread_props(_object_spread({}, config), {
|
147503
147475
|
file: import_path13.default.join(config.destination, config.fileNameFunc ? config.fileNameFunc(targetFile) : targetFile),
|
147504
147476
|
templateFile: absTemplatePath,
|
147505
147477
|
force: true
|
@@ -147556,7 +147528,7 @@ function _addManyFiles() {
|
|
147556
147528
|
|
147557
147529
|
// ../../generator-plugin/dist/esm/context/handlebars.js
|
147558
147530
|
var handlebars2 = __toESM(require_lib());
|
147559
|
-
function
|
147531
|
+
function _class_call_check(instance, Constructor) {
|
147560
147532
|
if (!(instance instanceof Constructor)) {
|
147561
147533
|
throw new TypeError("Cannot call a class as a function");
|
147562
147534
|
}
|
@@ -147571,14 +147543,14 @@ function _defineProperties16(target, props) {
|
|
147571
147543
|
Object.defineProperty(target, descriptor.key, descriptor);
|
147572
147544
|
}
|
147573
147545
|
}
|
147574
|
-
function
|
147546
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
147575
147547
|
if (protoProps)
|
147576
147548
|
_defineProperties16(Constructor.prototype, protoProps);
|
147577
147549
|
if (staticProps)
|
147578
147550
|
_defineProperties16(Constructor, staticProps);
|
147579
147551
|
return Constructor;
|
147580
147552
|
}
|
147581
|
-
function
|
147553
|
+
function _define_property4(obj, key, value) {
|
147582
147554
|
if (key in obj) {
|
147583
147555
|
Object.defineProperty(obj, key, {
|
147584
147556
|
value,
|
@@ -147591,7 +147563,7 @@ function _defineProperty21(obj, key, value) {
|
|
147591
147563
|
}
|
147592
147564
|
return obj;
|
147593
147565
|
}
|
147594
|
-
function
|
147566
|
+
function _object_spread2(target) {
|
147595
147567
|
for (var i = 1; i < arguments.length; i++) {
|
147596
147568
|
var source = arguments[i] != null ? arguments[i] : {};
|
147597
147569
|
var ownKeys9 = Object.keys(source);
|
@@ -147601,7 +147573,7 @@ function _objectSpread10(target) {
|
|
147601
147573
|
}));
|
147602
147574
|
}
|
147603
147575
|
ownKeys9.forEach(function(key) {
|
147604
|
-
|
147576
|
+
_define_property4(target, key, source[key]);
|
147605
147577
|
});
|
147606
147578
|
}
|
147607
147579
|
return target;
|
@@ -147609,16 +147581,16 @@ function _objectSpread10(target) {
|
|
147609
147581
|
var PluginHandlebarsAPI = /* @__PURE__ */ function() {
|
147610
147582
|
"use strict";
|
147611
147583
|
function PluginHandlebarsAPI2() {
|
147612
|
-
|
147613
|
-
|
147614
|
-
|
147584
|
+
_class_call_check(this, PluginHandlebarsAPI2);
|
147585
|
+
_define_property4(this, "helpers", {});
|
147586
|
+
_define_property4(this, "partials", {});
|
147615
147587
|
}
|
147616
|
-
|
147588
|
+
_create_class(PluginHandlebarsAPI2, [
|
147617
147589
|
{
|
147618
147590
|
key: "renderString",
|
147619
147591
|
value: function renderString3(template, data) {
|
147620
|
-
var helpers =
|
147621
|
-
var partials =
|
147592
|
+
var helpers = _object_spread2({}, this.helpers);
|
147593
|
+
var partials = _object_spread2({}, this.partials);
|
147622
147594
|
Object.keys(helpers).forEach(function(h) {
|
147623
147595
|
return handlebars2.registerHelper(h, helpers[h]);
|
147624
147596
|
});
|
@@ -147668,7 +147640,7 @@ function asyncGeneratorStep30(gen, resolve, reject, _next, _throw, key, arg) {
|
|
147668
147640
|
Promise.resolve(value).then(_next, _throw);
|
147669
147641
|
}
|
147670
147642
|
}
|
147671
|
-
function
|
147643
|
+
function _async_to_generator2(fn) {
|
147672
147644
|
return function() {
|
147673
147645
|
var self3 = this, args = arguments;
|
147674
147646
|
return new Promise(function(resolve, reject) {
|
@@ -147683,7 +147655,7 @@ function _asyncToGenerator30(fn) {
|
|
147683
147655
|
});
|
147684
147656
|
};
|
147685
147657
|
}
|
147686
|
-
function
|
147658
|
+
function _class_call_check2(instance, Constructor) {
|
147687
147659
|
if (!(instance instanceof Constructor)) {
|
147688
147660
|
throw new TypeError("Cannot call a class as a function");
|
147689
147661
|
}
|
@@ -147698,14 +147670,14 @@ function _defineProperties17(target, props) {
|
|
147698
147670
|
Object.defineProperty(target, descriptor.key, descriptor);
|
147699
147671
|
}
|
147700
147672
|
}
|
147701
|
-
function
|
147673
|
+
function _create_class2(Constructor, protoProps, staticProps) {
|
147702
147674
|
if (protoProps)
|
147703
147675
|
_defineProperties17(Constructor.prototype, protoProps);
|
147704
147676
|
if (staticProps)
|
147705
147677
|
_defineProperties17(Constructor, staticProps);
|
147706
147678
|
return Constructor;
|
147707
147679
|
}
|
147708
|
-
function
|
147680
|
+
function _define_property5(obj, key, value) {
|
147709
147681
|
if (key in obj) {
|
147710
147682
|
Object.defineProperty(obj, key, {
|
147711
147683
|
value,
|
@@ -147718,7 +147690,7 @@ function _defineProperty22(obj, key, value) {
|
|
147718
147690
|
}
|
147719
147691
|
return obj;
|
147720
147692
|
}
|
147721
|
-
function
|
147693
|
+
function _object_spread3(target) {
|
147722
147694
|
for (var i = 1; i < arguments.length; i++) {
|
147723
147695
|
var source = arguments[i] != null ? arguments[i] : {};
|
147724
147696
|
var ownKeys9 = Object.keys(source);
|
@@ -147728,7 +147700,7 @@ function _objectSpread11(target) {
|
|
147728
147700
|
}));
|
147729
147701
|
}
|
147730
147702
|
ownKeys9.forEach(function(key) {
|
147731
|
-
|
147703
|
+
_define_property5(target, key, source[key]);
|
147732
147704
|
});
|
147733
147705
|
}
|
147734
147706
|
return target;
|
@@ -147835,17 +147807,24 @@ var __generator35 = function(thisArg, body) {
|
|
147835
147807
|
};
|
147836
147808
|
}
|
147837
147809
|
};
|
147810
|
+
var FileType2;
|
147811
|
+
(function(FileType22) {
|
147812
|
+
FileType22["Text"] = "text";
|
147813
|
+
FileType22["Binary"] = "binary";
|
147814
|
+
FileType22["Json"] = "json";
|
147815
|
+
FileType22["TextRaw"] = "textRaw";
|
147816
|
+
})(FileType2 || (FileType2 = {}));
|
147838
147817
|
var PluginFileAPI = /* @__PURE__ */ function() {
|
147839
147818
|
"use strict";
|
147840
147819
|
function PluginFileAPI2() {
|
147841
|
-
|
147842
|
-
|
147843
|
-
|
147844
|
-
|
147845
|
-
|
147820
|
+
_class_call_check2(this, PluginFileAPI2);
|
147821
|
+
_define_property5(this, "projectPath", "");
|
147822
|
+
_define_property5(this, "templatePath", "");
|
147823
|
+
_define_property5(this, "handlebarAPI", new PluginHandlebarsAPI());
|
147824
|
+
_define_property5(this, "jsonAPI", void 0);
|
147846
147825
|
this.renderString = this.renderString.bind(this);
|
147847
147826
|
}
|
147848
|
-
|
147827
|
+
_create_class2(PluginFileAPI2, [
|
147849
147828
|
{
|
147850
147829
|
key: "context",
|
147851
147830
|
get: function get4() {
|
@@ -147890,7 +147869,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
147890
147869
|
key: "addFile",
|
147891
147870
|
value: function addFile1(params) {
|
147892
147871
|
var _this = this;
|
147893
|
-
return
|
147872
|
+
return _async_to_generator2(function() {
|
147894
147873
|
return __generator35(this, function(_state) {
|
147895
147874
|
switch (_state.label) {
|
147896
147875
|
case 0:
|
@@ -147912,7 +147891,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
147912
147891
|
key: "addManyFiles",
|
147913
147892
|
value: function addManyFiles1(params) {
|
147914
147893
|
var _this = this;
|
147915
|
-
return
|
147894
|
+
return _async_to_generator2(function() {
|
147916
147895
|
return __generator35(this, function(_state) {
|
147917
147896
|
switch (_state.label) {
|
147918
147897
|
case 0:
|
@@ -147934,7 +147913,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
147934
147913
|
key: "updateJSONFile",
|
147935
147914
|
value: function updateJSONFile(fileName, updateInfo) {
|
147936
147915
|
var _this = this;
|
147937
|
-
return
|
147916
|
+
return _async_to_generator2(function() {
|
147938
147917
|
var fsMaterial;
|
147939
147918
|
return __generator35(this, function(_state) {
|
147940
147919
|
switch (_state.label) {
|
@@ -147945,7 +147924,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
147945
147924
|
_this.jsonAPI.update(fsMaterial.get(fileName), {
|
147946
147925
|
query: {},
|
147947
147926
|
update: {
|
147948
|
-
$set:
|
147927
|
+
$set: _object_spread3({}, updateInfo)
|
147949
147928
|
}
|
147950
147929
|
})
|
147951
147930
|
];
|
@@ -147963,7 +147942,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
147963
147942
|
key: "updateModernConfig",
|
147964
147943
|
value: function updateModernConfig(updateInfo) {
|
147965
147944
|
var _this = this;
|
147966
|
-
return
|
147945
|
+
return _async_to_generator2(function() {
|
147967
147946
|
var update;
|
147968
147947
|
return __generator35(this, function(_state) {
|
147969
147948
|
switch (_state.label) {
|
@@ -147990,7 +147969,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
147990
147969
|
key: "updateTextRawFile",
|
147991
147970
|
value: function updateTextRawFile(fileName, update) {
|
147992
147971
|
var _this = this;
|
147993
|
-
return
|
147972
|
+
return _async_to_generator2(function() {
|
147994
147973
|
var content, newContent;
|
147995
147974
|
return __generator35(this, function(_state) {
|
147996
147975
|
switch (_state.label) {
|
@@ -148020,7 +147999,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
148020
147999
|
key: "rmFile",
|
148021
148000
|
value: function rmFile(fileName) {
|
148022
148001
|
var _this = this;
|
148023
|
-
return
|
148002
|
+
return _async_to_generator2(function() {
|
148024
148003
|
var file;
|
148025
148004
|
return __generator35(this, function(_state) {
|
148026
148005
|
switch (_state.label) {
|
@@ -148056,7 +148035,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
148056
148035
|
key: "rmDir",
|
148057
148036
|
value: function rmDir(dirName) {
|
148058
148037
|
var _this = this;
|
148059
|
-
return
|
148038
|
+
return _async_to_generator2(function() {
|
148060
148039
|
var dir, stat, e;
|
148061
148040
|
return __generator35(this, function(_state) {
|
148062
148041
|
switch (_state.label) {
|
@@ -148114,7 +148093,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
148114
148093
|
key: "isFileExit",
|
148115
148094
|
value: function isFileExit(fileName) {
|
148116
148095
|
var _this = this;
|
148117
|
-
return
|
148096
|
+
return _async_to_generator2(function() {
|
148118
148097
|
return __generator35(this, function(_state) {
|
148119
148098
|
return [
|
148120
148099
|
2,
|
@@ -148128,7 +148107,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
148128
148107
|
key: "readDir",
|
148129
148108
|
value: function readDir(dir) {
|
148130
148109
|
var _this = this;
|
148131
|
-
return
|
148110
|
+
return _async_to_generator2(function() {
|
148132
148111
|
return __generator35(this, function(_state) {
|
148133
148112
|
return [
|
148134
148113
|
2,
|
@@ -148157,7 +148136,7 @@ function asyncGeneratorStep31(gen, resolve, reject, _next, _throw, key, arg) {
|
|
148157
148136
|
Promise.resolve(value).then(_next, _throw);
|
148158
148137
|
}
|
148159
148138
|
}
|
148160
|
-
function
|
148139
|
+
function _async_to_generator3(fn) {
|
148161
148140
|
return function() {
|
148162
148141
|
var self3 = this, args = arguments;
|
148163
148142
|
return new Promise(function(resolve, reject) {
|
@@ -148172,7 +148151,7 @@ function _asyncToGenerator31(fn) {
|
|
148172
148151
|
});
|
148173
148152
|
};
|
148174
148153
|
}
|
148175
|
-
function
|
148154
|
+
function _class_call_check3(instance, Constructor) {
|
148176
148155
|
if (!(instance instanceof Constructor)) {
|
148177
148156
|
throw new TypeError("Cannot call a class as a function");
|
148178
148157
|
}
|
@@ -148187,14 +148166,14 @@ function _defineProperties18(target, props) {
|
|
148187
148166
|
Object.defineProperty(target, descriptor.key, descriptor);
|
148188
148167
|
}
|
148189
148168
|
}
|
148190
|
-
function
|
148169
|
+
function _create_class3(Constructor, protoProps, staticProps) {
|
148191
148170
|
if (protoProps)
|
148192
148171
|
_defineProperties18(Constructor.prototype, protoProps);
|
148193
148172
|
if (staticProps)
|
148194
148173
|
_defineProperties18(Constructor, staticProps);
|
148195
148174
|
return Constructor;
|
148196
148175
|
}
|
148197
|
-
function
|
148176
|
+
function _define_property6(obj, key, value) {
|
148198
148177
|
if (key in obj) {
|
148199
148178
|
Object.defineProperty(obj, key, {
|
148200
148179
|
value,
|
@@ -148312,12 +148291,12 @@ var __generator36 = function(thisArg, body) {
|
|
148312
148291
|
var PluginGitAPI = /* @__PURE__ */ function() {
|
148313
148292
|
"use strict";
|
148314
148293
|
function PluginGitAPI2() {
|
148315
|
-
|
148316
|
-
|
148317
|
-
|
148318
|
-
|
148294
|
+
_class_call_check3(this, PluginGitAPI2);
|
148295
|
+
_define_property6(this, "gitMessage", "");
|
148296
|
+
_define_property6(this, "gitApi", void 0);
|
148297
|
+
_define_property6(this, "projectPath", void 0);
|
148319
148298
|
}
|
148320
|
-
|
148299
|
+
_create_class3(PluginGitAPI2, [
|
148321
148300
|
{
|
148322
148301
|
key: "context",
|
148323
148302
|
get: function get4() {
|
@@ -148353,7 +148332,7 @@ var PluginGitAPI = /* @__PURE__ */ function() {
|
|
148353
148332
|
key: "isInGitRepo",
|
148354
148333
|
value: function isInGitRepo2() {
|
148355
148334
|
var _this = this;
|
148356
|
-
return
|
148335
|
+
return _async_to_generator3(function() {
|
148357
148336
|
return __generator36(this, function(_state) {
|
148358
148337
|
return [
|
148359
148338
|
2,
|
@@ -148367,7 +148346,7 @@ var PluginGitAPI = /* @__PURE__ */ function() {
|
|
148367
148346
|
key: "initGitRepo",
|
148368
148347
|
value: function initGitRepo2() {
|
148369
148348
|
var _this = this;
|
148370
|
-
return
|
148349
|
+
return _async_to_generator3(function() {
|
148371
148350
|
return __generator36(this, function(_state) {
|
148372
148351
|
switch (_state.label) {
|
148373
148352
|
case 0:
|
@@ -148390,7 +148369,7 @@ var PluginGitAPI = /* @__PURE__ */ function() {
|
|
148390
148369
|
value: function gitAddAndCommit() {
|
148391
148370
|
var commitMessage = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "feat: init";
|
148392
148371
|
var _this = this;
|
148393
|
-
return
|
148372
|
+
return _async_to_generator3(function() {
|
148394
148373
|
return __generator36(this, function(_state) {
|
148395
148374
|
switch (_state.label) {
|
148396
148375
|
case 0:
|
@@ -148414,7 +148393,7 @@ var PluginGitAPI = /* @__PURE__ */ function() {
|
|
148414
148393
|
|
148415
148394
|
// ../../generator-plugin/dist/esm/context/input.js
|
148416
148395
|
var import_lodash10 = __toESM(require_lodash2());
|
148417
|
-
function
|
148396
|
+
function _class_call_check4(instance, Constructor) {
|
148418
148397
|
if (!(instance instanceof Constructor)) {
|
148419
148398
|
throw new TypeError("Cannot call a class as a function");
|
148420
148399
|
}
|
@@ -148429,14 +148408,14 @@ function _defineProperties19(target, props) {
|
|
148429
148408
|
Object.defineProperty(target, descriptor.key, descriptor);
|
148430
148409
|
}
|
148431
148410
|
}
|
148432
|
-
function
|
148411
|
+
function _create_class4(Constructor, protoProps, staticProps) {
|
148433
148412
|
if (protoProps)
|
148434
148413
|
_defineProperties19(Constructor.prototype, protoProps);
|
148435
148414
|
if (staticProps)
|
148436
148415
|
_defineProperties19(Constructor, staticProps);
|
148437
148416
|
return Constructor;
|
148438
148417
|
}
|
148439
|
-
function
|
148418
|
+
function _define_property7(obj, key, value) {
|
148440
148419
|
if (key in obj) {
|
148441
148420
|
Object.defineProperty(obj, key, {
|
148442
148421
|
value,
|
@@ -148452,15 +148431,15 @@ function _defineProperty24(obj, key, value) {
|
|
148452
148431
|
var PluginInputContext = /* @__PURE__ */ function() {
|
148453
148432
|
"use strict";
|
148454
148433
|
function PluginInputContext2(solutionSchema) {
|
148455
|
-
|
148456
|
-
|
148457
|
-
|
148458
|
-
|
148459
|
-
|
148460
|
-
|
148434
|
+
_class_call_check4(this, PluginInputContext2);
|
148435
|
+
_define_property7(this, "inputValue", {});
|
148436
|
+
_define_property7(this, "defaultConfig", {});
|
148437
|
+
_define_property7(this, "solutionSchemaFunc", void 0);
|
148438
|
+
_define_property7(this, "solutionSchema", {});
|
148439
|
+
_define_property7(this, "extendInputMap", {});
|
148461
148440
|
this.solutionSchemaFunc = solutionSchema;
|
148462
148441
|
}
|
148463
|
-
|
148442
|
+
_create_class4(PluginInputContext2, [
|
148464
148443
|
{
|
148465
148444
|
key: "prepare",
|
148466
148445
|
value: function prepare(inputData) {
|
@@ -148515,7 +148494,7 @@ var PluginInputContext = /* @__PURE__ */ function() {
|
|
148515
148494
|
this.extendInputMap[key].before[inputKey] = properties[inputKey];
|
148516
148495
|
} else {
|
148517
148496
|
this.extendInputMap[key] = {
|
148518
|
-
before:
|
148497
|
+
before: _define_property7({}, inputKey, properties[inputKey]),
|
148519
148498
|
after: {}
|
148520
148499
|
};
|
148521
148500
|
}
|
@@ -148551,7 +148530,7 @@ var PluginInputContext = /* @__PURE__ */ function() {
|
|
148551
148530
|
} else {
|
148552
148531
|
this.extendInputMap[key] = {
|
148553
148532
|
before: {},
|
148554
|
-
after:
|
148533
|
+
after: _define_property7({}, inputKey, properties[inputKey])
|
148555
148534
|
};
|
148556
148535
|
}
|
148557
148536
|
}
|
@@ -148668,7 +148647,7 @@ function asyncGeneratorStep32(gen, resolve, reject, _next, _throw, key, arg) {
|
|
148668
148647
|
Promise.resolve(value).then(_next, _throw);
|
148669
148648
|
}
|
148670
148649
|
}
|
148671
|
-
function
|
148650
|
+
function _async_to_generator4(fn) {
|
148672
148651
|
return function() {
|
148673
148652
|
var self3 = this, args = arguments;
|
148674
148653
|
return new Promise(function(resolve, reject) {
|
@@ -148683,7 +148662,7 @@ function _asyncToGenerator32(fn) {
|
|
148683
148662
|
});
|
148684
148663
|
};
|
148685
148664
|
}
|
148686
|
-
function
|
148665
|
+
function _class_call_check5(instance, Constructor) {
|
148687
148666
|
if (!(instance instanceof Constructor)) {
|
148688
148667
|
throw new TypeError("Cannot call a class as a function");
|
148689
148668
|
}
|
@@ -148698,14 +148677,14 @@ function _defineProperties20(target, props) {
|
|
148698
148677
|
Object.defineProperty(target, descriptor.key, descriptor);
|
148699
148678
|
}
|
148700
148679
|
}
|
148701
|
-
function
|
148680
|
+
function _create_class5(Constructor, protoProps, staticProps) {
|
148702
148681
|
if (protoProps)
|
148703
148682
|
_defineProperties20(Constructor.prototype, protoProps);
|
148704
148683
|
if (staticProps)
|
148705
148684
|
_defineProperties20(Constructor, staticProps);
|
148706
148685
|
return Constructor;
|
148707
148686
|
}
|
148708
|
-
function
|
148687
|
+
function _define_property8(obj, key, value) {
|
148709
148688
|
if (key in obj) {
|
148710
148689
|
Object.defineProperty(obj, key, {
|
148711
148690
|
value,
|
@@ -148823,13 +148802,13 @@ var __generator37 = function(thisArg, body) {
|
|
148823
148802
|
var PluginNpmAPI = /* @__PURE__ */ function() {
|
148824
148803
|
"use strict";
|
148825
148804
|
function PluginNpmAPI2(projectPath, packageManager) {
|
148826
|
-
|
148827
|
-
|
148828
|
-
|
148805
|
+
_class_call_check5(this, PluginNpmAPI2);
|
148806
|
+
_define_property8(this, "projectPath", "");
|
148807
|
+
_define_property8(this, "packageManager", void 0);
|
148829
148808
|
this.projectPath = projectPath;
|
148830
148809
|
this.packageManager = packageManager;
|
148831
148810
|
}
|
148832
|
-
|
148811
|
+
_create_class5(PluginNpmAPI2, [
|
148833
148812
|
{
|
148834
148813
|
key: "method",
|
148835
148814
|
get: function get4() {
|
@@ -148842,7 +148821,7 @@ var PluginNpmAPI = /* @__PURE__ */ function() {
|
|
148842
148821
|
key: "install",
|
148843
148822
|
value: function install() {
|
148844
148823
|
var _this = this;
|
148845
|
-
return
|
148824
|
+
return _async_to_generator4(function() {
|
148846
148825
|
return __generator37(this, function(_state) {
|
148847
148826
|
switch (_state.label) {
|
148848
148827
|
case 0:
|
@@ -148917,7 +148896,9 @@ var readJson = (jsonPath) => {
|
|
148917
148896
|
if (!import_fs_extra.default.existsSync(jsonPath)) {
|
148918
148897
|
return {};
|
148919
148898
|
}
|
148920
|
-
const jsonStr = import_fs_extra.default.readFileSync(jsonPath, {
|
148899
|
+
const jsonStr = import_fs_extra.default.readFileSync(jsonPath, {
|
148900
|
+
encoding: "utf8"
|
148901
|
+
});
|
148921
148902
|
try {
|
148922
148903
|
return import_json5.default.parse(jsonStr);
|
148923
148904
|
} catch (error) {
|
@@ -148925,20 +148906,22 @@ var readJson = (jsonPath) => {
|
|
148925
148906
|
}
|
148926
148907
|
};
|
148927
148908
|
function hasEnabledFunction(action2, dependencies, devDependencies, peerDependencies, cwd) {
|
148928
|
-
var _a2, _b, _c;
|
148929
148909
|
const packageJsonPath = import_path15.default.normalize(`${cwd}/package.json`);
|
148930
148910
|
const packageJson = readJson(packageJsonPath);
|
148931
148911
|
if (!dependencies[action2] && !devDependencies[action2]) {
|
148932
148912
|
return false;
|
148933
148913
|
}
|
148934
148914
|
if (dependencies[action2]) {
|
148935
|
-
|
148915
|
+
var _packageJson_dependencies;
|
148916
|
+
return (_packageJson_dependencies = packageJson.dependencies) === null || _packageJson_dependencies === void 0 ? void 0 : _packageJson_dependencies[dependencies[action2]];
|
148936
148917
|
}
|
148937
148918
|
if (peerDependencies[action2]) {
|
148938
|
-
|
148919
|
+
var _packageJson_peerDependencies;
|
148920
|
+
return (_packageJson_peerDependencies = packageJson.peerDependencies) === null || _packageJson_peerDependencies === void 0 ? void 0 : _packageJson_peerDependencies[peerDependencies[action2]];
|
148939
148921
|
}
|
148940
148922
|
if (!peerDependencies[action2] && devDependencies[action2]) {
|
148941
|
-
|
148923
|
+
var _packageJson_devDependencies;
|
148924
|
+
return (_packageJson_devDependencies = packageJson.devDependencies) === null || _packageJson_devDependencies === void 0 ? void 0 : _packageJson_devDependencies[devDependencies[action2]];
|
148942
148925
|
}
|
148943
148926
|
return false;
|
148944
148927
|
}
|
@@ -148954,21 +148937,16 @@ function getGeneratorPath(generator, distTag) {
|
|
148954
148937
|
// ../../new-action/dist/esm/mwa.js
|
148955
148938
|
var import_lodash11 = __toESM(require_lodash2());
|
148956
148939
|
var MWANewAction = (options) => __async(void 0, null, function* () {
|
148957
|
-
const {
|
148958
|
-
locale = "zh",
|
148959
|
-
distTag = "",
|
148960
|
-
debug: debug2 = false,
|
148961
|
-
registry: registry2 = "",
|
148962
|
-
config = "{}",
|
148963
|
-
cwd = process.cwd()
|
148964
|
-
} = options;
|
148940
|
+
const { locale = "zh", distTag = "", debug: debug2 = false, registry: registry2 = "", config = "{}", cwd = process.cwd() } = options;
|
148965
148941
|
let UserConfig = {};
|
148966
148942
|
try {
|
148967
148943
|
UserConfig = JSON.parse(config);
|
148968
148944
|
} catch (e) {
|
148969
148945
|
throw new Error("config is not a valid json");
|
148970
148946
|
}
|
148971
|
-
i18n2.changeLanguage({
|
148947
|
+
i18n2.changeLanguage({
|
148948
|
+
locale: UserConfig.locale || locale
|
148949
|
+
});
|
148972
148950
|
const smith = new CodeSmith({
|
148973
148951
|
debug: debug2,
|
148974
148952
|
registryUrl: registry2
|
@@ -148984,24 +148962,12 @@ var MWANewAction = (options) => __async(void 0, null, function* () {
|
|
148984
148962
|
});
|
148985
148963
|
const funcMap = {};
|
148986
148964
|
MWAActionFunctions.forEach((func) => {
|
148987
|
-
const enable = hasEnabledFunction(
|
148988
|
-
func,
|
148989
|
-
MWAActionFunctionsDependencies,
|
148990
|
-
MWAActionFunctionsDevDependencies,
|
148991
|
-
{},
|
148992
|
-
cwd
|
148993
|
-
);
|
148965
|
+
const enable = hasEnabledFunction(func, MWAActionFunctionsDependencies, MWAActionFunctionsDevDependencies, {}, cwd);
|
148994
148966
|
funcMap[func] = enable;
|
148995
148967
|
});
|
148996
148968
|
const refactorMap = {};
|
148997
148969
|
MWAActionReactors.forEach((refactor) => {
|
148998
|
-
const enable = hasEnabledFunction(
|
148999
|
-
refactor,
|
149000
|
-
MWAActionRefactorDependencies,
|
149001
|
-
{},
|
149002
|
-
{},
|
149003
|
-
cwd
|
149004
|
-
);
|
148970
|
+
const enable = hasEnabledFunction(refactor, MWAActionRefactorDependencies, {}, {}, cwd);
|
149005
148971
|
refactorMap[refactor] = enable;
|
149006
148972
|
});
|
149007
148973
|
const ans = yield formilyAPI.getInputBySchemaFunc(getMWANewActionSchema, __spreadProps(__spreadValues({}, UserConfig), {
|
@@ -149010,10 +148976,7 @@ var MWANewAction = (options) => __async(void 0, null, function* () {
|
|
149010
148976
|
}));
|
149011
148977
|
const actionType = ans.actionType;
|
149012
148978
|
const action2 = ans[actionType];
|
149013
|
-
const generator = getGeneratorPath(
|
149014
|
-
MWANewActionGenerators[actionType][action2],
|
149015
|
-
distTag
|
149016
|
-
);
|
148979
|
+
const generator = getGeneratorPath(MWANewActionGenerators[actionType][action2], distTag);
|
149017
148980
|
if (!generator) {
|
149018
148981
|
throw new Error(`no valid option`);
|
149019
148982
|
}
|
@@ -149026,24 +148989,21 @@ var MWANewAction = (options) => __async(void 0, null, function* () {
|
|
149026
148989
|
};
|
149027
148990
|
const devDependency = MWAActionFunctionsDevDependencies[action2];
|
149028
148991
|
const dependency = MWAActionFunctionsDependencies[action2] || MWAActionRefactorDependencies[action2];
|
149029
|
-
const finalConfig = (0, import_lodash11.merge)(
|
149030
|
-
UserConfig,
|
149031
|
-
|
149032
|
-
|
149033
|
-
|
149034
|
-
|
149035
|
-
|
149036
|
-
},
|
149037
|
-
{
|
149038
|
-
|
149039
|
-
|
149040
|
-
|
149041
|
-
|
149042
|
-
|
149043
|
-
|
149044
|
-
pluginDependence: MWANewActionPluginDependence[actionType][action2]
|
149045
|
-
}
|
149046
|
-
);
|
148992
|
+
const finalConfig = (0, import_lodash11.merge)(UserConfig, ans, {
|
148993
|
+
locale: UserConfig.locale || locale,
|
148994
|
+
packageManager: UserConfig.packageManager || (yield getPackageManager(cwd)),
|
148995
|
+
distTag
|
148996
|
+
}, {
|
148997
|
+
devDependencies: devDependency ? {
|
148998
|
+
[devDependency]: `${yield getMwaPluginVersion(devDependency)}`
|
148999
|
+
} : {},
|
149000
|
+
dependencies: dependency ? {
|
149001
|
+
[dependency]: `${yield getMwaPluginVersion(dependency)}`
|
149002
|
+
} : {},
|
149003
|
+
appendTypeContent: MWAActionFunctionsAppendTypeContent[action2] || MWAActionReactorAppendTypeContent[action2],
|
149004
|
+
pluginName: MWANewActionPluginName[actionType][action2],
|
149005
|
+
pluginDependence: MWANewActionPluginDependence[actionType][action2]
|
149006
|
+
});
|
149047
149007
|
const task = [
|
149048
149008
|
{
|
149049
149009
|
name: generator,
|
@@ -149062,21 +149022,16 @@ var MWANewAction = (options) => __async(void 0, null, function* () {
|
|
149062
149022
|
// ../../new-action/dist/esm/module.js
|
149063
149023
|
var import_lodash12 = __toESM(require_lodash2());
|
149064
149024
|
var ModuleNewAction = (options) => __async(void 0, null, function* () {
|
149065
|
-
const {
|
149066
|
-
locale = "zh",
|
149067
|
-
distTag = "",
|
149068
|
-
debug: debug2 = false,
|
149069
|
-
registry: registry2 = "",
|
149070
|
-
config = "{}",
|
149071
|
-
cwd = process.cwd()
|
149072
|
-
} = options;
|
149025
|
+
const { locale = "zh", distTag = "", debug: debug2 = false, registry: registry2 = "", config = "{}", cwd = process.cwd() } = options;
|
149073
149026
|
let UserConfig = {};
|
149074
149027
|
try {
|
149075
149028
|
UserConfig = JSON.parse(config);
|
149076
149029
|
} catch (e) {
|
149077
149030
|
throw new Error("config is not a valid json");
|
149078
149031
|
}
|
149079
|
-
i18n2.changeLanguage({
|
149032
|
+
i18n2.changeLanguage({
|
149033
|
+
locale: UserConfig.locale || locale
|
149034
|
+
});
|
149080
149035
|
const smith = new CodeSmith({
|
149081
149036
|
debug: debug2,
|
149082
149037
|
registryUrl: registry2
|
@@ -149093,13 +149048,7 @@ var ModuleNewAction = (options) => __async(void 0, null, function* () {
|
|
149093
149048
|
let hasOption = false;
|
149094
149049
|
const funcMap = {};
|
149095
149050
|
ModuleActionFunctions.forEach((func) => {
|
149096
|
-
const enable = hasEnabledFunction(
|
149097
|
-
func,
|
149098
|
-
ModuleActionFunctionsDependencies,
|
149099
|
-
ModuleActionFunctionsDevDependencies,
|
149100
|
-
ModuleActionFunctionsPeerDependencies,
|
149101
|
-
cwd
|
149102
|
-
);
|
149051
|
+
const enable = hasEnabledFunction(func, ModuleActionFunctionsDependencies, ModuleActionFunctionsDevDependencies, ModuleActionFunctionsPeerDependencies, cwd);
|
149103
149052
|
funcMap[func] = enable;
|
149104
149053
|
if (!enable) {
|
149105
149054
|
hasOption = true;
|
@@ -149114,10 +149063,7 @@ var ModuleNewAction = (options) => __async(void 0, null, function* () {
|
|
149114
149063
|
}));
|
149115
149064
|
const actionType = ans.actionType;
|
149116
149065
|
const action2 = ans[actionType];
|
149117
|
-
const generator = getGeneratorPath(
|
149118
|
-
ModuleNewActionGenerators[actionType][action2],
|
149119
|
-
distTag
|
149120
|
-
);
|
149066
|
+
const generator = getGeneratorPath(ModuleNewActionGenerators[actionType][action2], distTag);
|
149121
149067
|
if (!generator) {
|
149122
149068
|
throw new Error(`no valid option`);
|
149123
149069
|
}
|
@@ -149131,24 +149077,23 @@ var ModuleNewAction = (options) => __async(void 0, null, function* () {
|
|
149131
149077
|
cwd
|
149132
149078
|
});
|
149133
149079
|
};
|
149134
|
-
const finalConfig = (0, import_lodash12.merge)(
|
149135
|
-
UserConfig,
|
149136
|
-
|
149137
|
-
|
149138
|
-
|
149139
|
-
|
149140
|
-
|
149141
|
-
},
|
149142
|
-
{
|
149143
|
-
|
149144
|
-
|
149145
|
-
|
149146
|
-
|
149147
|
-
|
149148
|
-
|
149149
|
-
|
149150
|
-
|
149151
|
-
);
|
149080
|
+
const finalConfig = (0, import_lodash12.merge)(UserConfig, ans, {
|
149081
|
+
locale: UserConfig.locale || locale,
|
149082
|
+
packageManager: UserConfig.packageManager || (yield getPackageManager(cwd)),
|
149083
|
+
distTag
|
149084
|
+
}, {
|
149085
|
+
devDependencies: devDependency ? {
|
149086
|
+
[devDependency]: `${yield getModulePluginVersion(devDependency)}`
|
149087
|
+
} : {},
|
149088
|
+
dependencies: dependency ? {
|
149089
|
+
[dependency]: `${yield getModulePluginVersion(dependency)}`
|
149090
|
+
} : {},
|
149091
|
+
peerDependencies: peerDependency ? {
|
149092
|
+
[peerDependency]: `${yield getModulePluginVersion(peerDependency)}`
|
149093
|
+
} : {},
|
149094
|
+
pluginName: ModuleNewActionPluginName[actionType][action2],
|
149095
|
+
pluginDependence: ModuleNewActionPluginDependence[actionType][action2]
|
149096
|
+
});
|
149152
149097
|
const task = [
|
149153
149098
|
{
|
149154
149099
|
name: generator,
|
@@ -149169,22 +149114,16 @@ var import_path16 = __toESM(require("path"));
|
|
149169
149114
|
var import_lodash13 = __toESM(require_lodash2());
|
149170
149115
|
var REPO_GENERATOR = "@modern-js/repo-generator";
|
149171
149116
|
var MonorepoNewAction = (options) => __async(void 0, null, function* () {
|
149172
|
-
const {
|
149173
|
-
locale = "zh",
|
149174
|
-
distTag = "",
|
149175
|
-
debug: debug2 = false,
|
149176
|
-
registry: registry2 = "",
|
149177
|
-
config = "{}",
|
149178
|
-
plugin = [],
|
149179
|
-
cwd = process.cwd()
|
149180
|
-
} = options;
|
149117
|
+
const { locale = "zh", distTag = "", debug: debug2 = false, registry: registry2 = "", config = "{}", plugin = [], cwd = process.cwd() } = options;
|
149181
149118
|
let UserConfig = {};
|
149182
149119
|
try {
|
149183
149120
|
UserConfig = JSON.parse(config);
|
149184
149121
|
} catch (e) {
|
149185
149122
|
throw new Error("config is not a valid json");
|
149186
149123
|
}
|
149187
|
-
i18n2.changeLanguage({
|
149124
|
+
i18n2.changeLanguage({
|
149125
|
+
locale: UserConfig.locale || locale
|
149126
|
+
});
|
149188
149127
|
const smith = new CodeSmith({
|
149189
149128
|
debug: debug2,
|
149190
149129
|
registryUrl: registry2
|
@@ -149246,7 +149185,7 @@ function asyncGeneratorStep33(gen, resolve, reject, _next, _throw, key, arg) {
|
|
149246
149185
|
Promise.resolve(value).then(_next, _throw);
|
149247
149186
|
}
|
149248
149187
|
}
|
149249
|
-
function
|
149188
|
+
function _async_to_generator5(fn) {
|
149250
149189
|
return function() {
|
149251
149190
|
var self3 = this, args = arguments;
|
149252
149191
|
return new Promise(function(resolve, reject) {
|
@@ -149261,7 +149200,7 @@ function _asyncToGenerator33(fn) {
|
|
149261
149200
|
});
|
149262
149201
|
};
|
149263
149202
|
}
|
149264
|
-
function
|
149203
|
+
function _class_call_check6(instance, Constructor) {
|
149265
149204
|
if (!(instance instanceof Constructor)) {
|
149266
149205
|
throw new TypeError("Cannot call a class as a function");
|
149267
149206
|
}
|
@@ -149276,14 +149215,14 @@ function _defineProperties21(target, props) {
|
|
149276
149215
|
Object.defineProperty(target, descriptor.key, descriptor);
|
149277
149216
|
}
|
149278
149217
|
}
|
149279
|
-
function
|
149218
|
+
function _create_class6(Constructor, protoProps, staticProps) {
|
149280
149219
|
if (protoProps)
|
149281
149220
|
_defineProperties21(Constructor.prototype, protoProps);
|
149282
149221
|
if (staticProps)
|
149283
149222
|
_defineProperties21(Constructor, staticProps);
|
149284
149223
|
return Constructor;
|
149285
149224
|
}
|
149286
|
-
function
|
149225
|
+
function _define_property9(obj, key, value) {
|
149287
149226
|
if (key in obj) {
|
149288
149227
|
Object.defineProperty(obj, key, {
|
149289
149228
|
value,
|
@@ -149296,7 +149235,7 @@ function _defineProperty26(obj, key, value) {
|
|
149296
149235
|
}
|
149297
149236
|
return obj;
|
149298
149237
|
}
|
149299
|
-
function
|
149238
|
+
function _object_spread4(target) {
|
149300
149239
|
for (var i = 1; i < arguments.length; i++) {
|
149301
149240
|
var source = arguments[i] != null ? arguments[i] : {};
|
149302
149241
|
var ownKeys9 = Object.keys(source);
|
@@ -149306,7 +149245,7 @@ function _objectSpread12(target) {
|
|
149306
149245
|
}));
|
149307
149246
|
}
|
149308
149247
|
ownKeys9.forEach(function(key) {
|
149309
|
-
|
149248
|
+
_define_property9(target, key, source[key]);
|
149310
149249
|
});
|
149311
149250
|
}
|
149312
149251
|
return target;
|
@@ -149416,16 +149355,16 @@ var __generator38 = function(thisArg, body) {
|
|
149416
149355
|
var PluginNewAPI = /* @__PURE__ */ function() {
|
149417
149356
|
"use strict";
|
149418
149357
|
function PluginNewAPI2(solution, projectPath, inputData) {
|
149419
|
-
|
149420
|
-
|
149421
|
-
|
149422
|
-
|
149358
|
+
_class_call_check6(this, PluginNewAPI2);
|
149359
|
+
_define_property9(this, "solution", void 0);
|
149360
|
+
_define_property9(this, "projectPath", void 0);
|
149361
|
+
_define_property9(this, "inputData", void 0);
|
149423
149362
|
this.solution = solution;
|
149424
149363
|
this.projectPath = projectPath;
|
149425
149364
|
this.inputData = inputData;
|
149426
149365
|
process.setMaxListeners(20);
|
149427
149366
|
}
|
149428
|
-
|
149367
|
+
_create_class6(PluginNewAPI2, [
|
149429
149368
|
{
|
149430
149369
|
key: "method",
|
149431
149370
|
get: function get4() {
|
@@ -149440,7 +149379,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
149440
149379
|
key: "createElement",
|
149441
149380
|
value: function createElement(element, params) {
|
149442
149381
|
var _this = this;
|
149443
|
-
return
|
149382
|
+
return _async_to_generator5(function() {
|
149444
149383
|
return __generator38(this, function(_state) {
|
149445
149384
|
switch (_state.label) {
|
149446
149385
|
case 0:
|
@@ -149455,7 +149394,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
149455
149394
|
return [
|
149456
149395
|
4,
|
149457
149396
|
MWANewAction({
|
149458
|
-
config: JSON.stringify(
|
149397
|
+
config: JSON.stringify(_object_spread4({
|
149459
149398
|
actionType: ActionType.Element,
|
149460
149399
|
element,
|
149461
149400
|
noNeedInstall: true
|
@@ -149479,7 +149418,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
149479
149418
|
key: "enableFunc",
|
149480
149419
|
value: function enableFunc(func, params) {
|
149481
149420
|
var _this = this;
|
149482
|
-
return
|
149421
|
+
return _async_to_generator5(function() {
|
149483
149422
|
return __generator38(this, function(_state) {
|
149484
149423
|
switch (_state.label) {
|
149485
149424
|
case 0:
|
@@ -149494,7 +149433,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
149494
149433
|
return [
|
149495
149434
|
4,
|
149496
149435
|
MWANewAction({
|
149497
|
-
config: JSON.stringify(
|
149436
|
+
config: JSON.stringify(_object_spread4({
|
149498
149437
|
actionType: ActionType.Function,
|
149499
149438
|
function: func,
|
149500
149439
|
noNeedInstall: true
|
@@ -149519,7 +149458,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
149519
149458
|
return [
|
149520
149459
|
4,
|
149521
149460
|
ModuleNewAction({
|
149522
|
-
config: JSON.stringify(
|
149461
|
+
config: JSON.stringify(_object_spread4({
|
149523
149462
|
actionType: ActionType.Function,
|
149524
149463
|
function: func,
|
149525
149464
|
noNeedInstall: true
|
@@ -149543,7 +149482,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
149543
149482
|
key: "createSubProject",
|
149544
149483
|
value: function createSubProject(solution, params) {
|
149545
149484
|
var _this = this;
|
149546
|
-
return
|
149485
|
+
return _async_to_generator5(function() {
|
149547
149486
|
return __generator38(this, function(_state) {
|
149548
149487
|
switch (_state.label) {
|
149549
149488
|
case 0:
|
@@ -149555,7 +149494,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
149555
149494
|
return [
|
149556
149495
|
4,
|
149557
149496
|
MonorepoNewAction({
|
149558
|
-
config: JSON.stringify(
|
149497
|
+
config: JSON.stringify(_object_spread4({
|
149559
149498
|
solution,
|
149560
149499
|
noNeedInstall: true
|
149561
149500
|
}, _this.inputData, params)),
|
@@ -149579,7 +149518,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
149579
149518
|
}();
|
149580
149519
|
|
149581
149520
|
// ../../generator-plugin/dist/esm/context/index.js
|
149582
|
-
function
|
149521
|
+
function _class_call_check7(instance, Constructor) {
|
149583
149522
|
if (!(instance instanceof Constructor)) {
|
149584
149523
|
throw new TypeError("Cannot call a class as a function");
|
149585
149524
|
}
|
@@ -149594,14 +149533,14 @@ function _defineProperties22(target, props) {
|
|
149594
149533
|
Object.defineProperty(target, descriptor.key, descriptor);
|
149595
149534
|
}
|
149596
149535
|
}
|
149597
|
-
function
|
149536
|
+
function _create_class7(Constructor, protoProps, staticProps) {
|
149598
149537
|
if (protoProps)
|
149599
149538
|
_defineProperties22(Constructor.prototype, protoProps);
|
149600
149539
|
if (staticProps)
|
149601
149540
|
_defineProperties22(Constructor, staticProps);
|
149602
149541
|
return Constructor;
|
149603
149542
|
}
|
149604
|
-
function
|
149543
|
+
function _define_property10(obj, key, value) {
|
149605
149544
|
if (key in obj) {
|
149606
149545
|
Object.defineProperty(obj, key, {
|
149607
149546
|
value,
|
@@ -149614,17 +149553,17 @@ function _defineProperty27(obj, key, value) {
|
|
149614
149553
|
}
|
149615
149554
|
return obj;
|
149616
149555
|
}
|
149617
|
-
function
|
149556
|
+
function _object_spread5(target) {
|
149618
149557
|
for (var i = 1; i < arguments.length; i++) {
|
149619
149558
|
var source = arguments[i] != null ? arguments[i] : {};
|
149620
|
-
var
|
149559
|
+
var ownKeys22 = Object.keys(source);
|
149621
149560
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
149622
|
-
|
149561
|
+
ownKeys22 = ownKeys22.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
149623
149562
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
149624
149563
|
}));
|
149625
149564
|
}
|
149626
|
-
|
149627
|
-
|
149565
|
+
ownKeys22.forEach(function(key) {
|
149566
|
+
_define_property10(target, key, source[key]);
|
149628
149567
|
});
|
149629
149568
|
}
|
149630
149569
|
return target;
|
@@ -149642,7 +149581,7 @@ function ownKeys7(object, enumerableOnly) {
|
|
149642
149581
|
}
|
149643
149582
|
return keys;
|
149644
149583
|
}
|
149645
|
-
function
|
149584
|
+
function _object_spread_props2(target, source) {
|
149646
149585
|
source = source != null ? source : {};
|
149647
149586
|
if (Object.getOwnPropertyDescriptors) {
|
149648
149587
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
@@ -149653,36 +149592,36 @@ function _objectSpreadProps7(target, source) {
|
|
149653
149592
|
}
|
149654
149593
|
return target;
|
149655
149594
|
}
|
149656
|
-
var LifeCycle2
|
149595
|
+
var LifeCycle2;
|
149596
|
+
(function(LifeCycle22) {
|
149657
149597
|
LifeCycle22["OnForged"] = "onForged";
|
149658
149598
|
LifeCycle22["AfterForged"] = "afterForged";
|
149659
|
-
|
149660
|
-
}(LifeCycle2 || {});
|
149599
|
+
})(LifeCycle2 || (LifeCycle2 = {}));
|
149661
149600
|
var PluginContext = /* @__PURE__ */ function() {
|
149662
149601
|
"use strict";
|
149663
149602
|
function PluginContext2(solutionSchema, locale) {
|
149664
|
-
|
149665
|
-
|
149666
|
-
|
149667
|
-
|
149668
|
-
|
149669
|
-
|
149670
|
-
|
149671
|
-
|
149603
|
+
_class_call_check7(this, PluginContext2);
|
149604
|
+
_define_property10(this, "generator", void 0);
|
149605
|
+
_define_property10(this, "inputContext", void 0);
|
149606
|
+
_define_property10(this, "gitAPI", void 0);
|
149607
|
+
_define_property10(this, "fileAPI", void 0);
|
149608
|
+
_define_property10(this, "npmAPI", void 0);
|
149609
|
+
_define_property10(this, "newAPI", void 0);
|
149610
|
+
_define_property10(this, "locale", void 0);
|
149672
149611
|
var _obj;
|
149673
|
-
|
149674
|
-
}),
|
149612
|
+
_define_property10(this, "lifeCycleFuncMap", (_obj = {}, _define_property10(_obj, LifeCycle2.OnForged, function() {
|
149613
|
+
}), _define_property10(_obj, LifeCycle2.AfterForged, function() {
|
149675
149614
|
}), _obj));
|
149676
149615
|
this.inputContext = new PluginInputContext(solutionSchema);
|
149677
149616
|
this.gitAPI = new PluginGitAPI();
|
149678
149617
|
this.fileAPI = new PluginFileAPI();
|
149679
149618
|
this.locale = locale;
|
149680
149619
|
}
|
149681
|
-
|
149620
|
+
_create_class7(PluginContext2, [
|
149682
149621
|
{
|
149683
149622
|
key: "context",
|
149684
149623
|
get: function get4() {
|
149685
|
-
return
|
149624
|
+
return _object_spread_props2(_object_spread5({
|
149686
149625
|
locale: this.locale
|
149687
149626
|
}, this.inputContext.context, this.gitAPI.context, this.fileAPI.context), {
|
149688
149627
|
onForged: this.onForged.bind(this),
|
@@ -149693,13 +149632,13 @@ var PluginContext = /* @__PURE__ */ function() {
|
|
149693
149632
|
{
|
149694
149633
|
key: "forgedAPI",
|
149695
149634
|
get: function get4() {
|
149696
|
-
return
|
149635
|
+
return _object_spread5({}, this.fileAPI.method, this.newAPI.method);
|
149697
149636
|
}
|
149698
149637
|
},
|
149699
149638
|
{
|
149700
149639
|
key: "afterForgedAPI",
|
149701
149640
|
get: function get4() {
|
149702
|
-
return
|
149641
|
+
return _object_spread5({}, this.gitAPI.method, this.npmAPI.method);
|
149703
149642
|
}
|
149704
149643
|
},
|
149705
149644
|
{
|
@@ -149715,19 +149654,13 @@ var PluginContext = /* @__PURE__ */ function() {
|
|
149715
149654
|
{
|
149716
149655
|
key: "onForged",
|
149717
149656
|
value: function onForged(func) {
|
149718
|
-
this.lifeCycleFuncMap[
|
149719
|
-
"onForged"
|
149720
|
-
/* OnForged */
|
149721
|
-
] = func;
|
149657
|
+
this.lifeCycleFuncMap[LifeCycle2.OnForged] = func;
|
149722
149658
|
}
|
149723
149659
|
},
|
149724
149660
|
{
|
149725
149661
|
key: "afterForged",
|
149726
149662
|
value: function afterForged(func) {
|
149727
|
-
this.lifeCycleFuncMap[
|
149728
|
-
"afterForged"
|
149729
|
-
/* AfterForged */
|
149730
|
-
] = func;
|
149663
|
+
this.lifeCycleFuncMap[LifeCycle2.AfterForged] = func;
|
149731
149664
|
}
|
149732
149665
|
}
|
149733
149666
|
]);
|
@@ -149761,7 +149694,7 @@ function asyncGeneratorStep34(gen, resolve, reject, _next, _throw, key, arg) {
|
|
149761
149694
|
Promise.resolve(value).then(_next, _throw);
|
149762
149695
|
}
|
149763
149696
|
}
|
149764
|
-
function
|
149697
|
+
function _async_to_generator6(fn) {
|
149765
149698
|
return function() {
|
149766
149699
|
var self3 = this, args = arguments;
|
149767
149700
|
return new Promise(function(resolve, reject) {
|
@@ -149883,7 +149816,7 @@ function getPackageMeta(packageName, packageVersion, options) {
|
|
149883
149816
|
return _getPackageMeta.apply(this, arguments);
|
149884
149817
|
}
|
149885
149818
|
function _getPackageMeta() {
|
149886
|
-
_getPackageMeta =
|
149819
|
+
_getPackageMeta = _async_to_generator6(function(packageName, packageVersion, options) {
|
149887
149820
|
var registryUrl, params, getPkgInfoPromise, stdout, pkgMetaInfo;
|
149888
149821
|
return __generator39(this, function(_state) {
|
149889
149822
|
switch (_state.label) {
|
@@ -149949,7 +149882,7 @@ function asyncGeneratorStep35(gen, resolve, reject, _next, _throw, key, arg) {
|
|
149949
149882
|
Promise.resolve(value).then(_next, _throw);
|
149950
149883
|
}
|
149951
149884
|
}
|
149952
|
-
function
|
149885
|
+
function _async_to_generator7(fn) {
|
149953
149886
|
return function() {
|
149954
149887
|
var self3 = this, args = arguments;
|
149955
149888
|
return new Promise(function(resolve, reject) {
|
@@ -150070,23 +150003,23 @@ function installPlugins(plugins, registryUrl) {
|
|
150070
150003
|
return _installPlugins.apply(this, arguments);
|
150071
150004
|
}
|
150072
150005
|
function _installPlugins() {
|
150073
|
-
_installPlugins =
|
150006
|
+
_installPlugins = _async_to_generator7(function(plugins, registryUrl) {
|
150074
150007
|
return __generator40(this, function(_state) {
|
150075
150008
|
return [
|
150076
150009
|
2,
|
150077
150010
|
Promise.all(plugins.map(function() {
|
150078
|
-
var _ref =
|
150079
|
-
var
|
150011
|
+
var _ref = _async_to_generator7(function(plugin) {
|
150012
|
+
var pluginPath, _getPackageInfo, name, version, pluginPath1;
|
150080
150013
|
return __generator40(this, function(_state2) {
|
150081
150014
|
switch (_state2.label) {
|
150082
150015
|
case 0:
|
150083
150016
|
if (plugin.startsWith("file:")) {
|
150084
|
-
|
150017
|
+
pluginPath = import_path17.default.join(process.cwd(), plugin.slice(5));
|
150085
150018
|
return [
|
150086
150019
|
2,
|
150087
150020
|
{
|
150088
|
-
templatePath:
|
150089
|
-
module: requireModule(
|
150021
|
+
templatePath: pluginPath,
|
150022
|
+
module: requireModule(pluginPath)
|
150090
150023
|
}
|
150091
150024
|
];
|
150092
150025
|
}
|
@@ -150108,12 +150041,12 @@ function _installPlugins() {
|
|
150108
150041
|
})
|
150109
150042
|
];
|
150110
150043
|
case 1:
|
150111
|
-
|
150044
|
+
pluginPath1 = _state2.sent();
|
150112
150045
|
return [
|
150113
150046
|
2,
|
150114
150047
|
{
|
150115
|
-
templatePath:
|
150116
|
-
module: requireModule(
|
150048
|
+
templatePath: pluginPath1,
|
150049
|
+
module: requireModule(pluginPath1)
|
150117
150050
|
}
|
150118
150051
|
];
|
150119
150052
|
}
|
@@ -150153,16 +150086,16 @@ var localeKeys4 = i18n4.init("en", {
|
|
150153
150086
|
});
|
150154
150087
|
|
150155
150088
|
// ../../generator-plugin/dist/esm/index.js
|
150156
|
-
function
|
150089
|
+
function _array_like_to_array(arr, len) {
|
150157
150090
|
if (len == null || len > arr.length)
|
150158
150091
|
len = arr.length;
|
150159
150092
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
150160
150093
|
arr2[i] = arr[i];
|
150161
150094
|
return arr2;
|
150162
150095
|
}
|
150163
|
-
function
|
150096
|
+
function _array_without_holes(arr) {
|
150164
150097
|
if (Array.isArray(arr))
|
150165
|
-
return
|
150098
|
+
return _array_like_to_array(arr);
|
150166
150099
|
}
|
150167
150100
|
function asyncGeneratorStep36(gen, resolve, reject, _next, _throw, key, arg) {
|
150168
150101
|
try {
|
@@ -150178,7 +150111,7 @@ function asyncGeneratorStep36(gen, resolve, reject, _next, _throw, key, arg) {
|
|
150178
150111
|
Promise.resolve(value).then(_next, _throw);
|
150179
150112
|
}
|
150180
150113
|
}
|
150181
|
-
function
|
150114
|
+
function _async_to_generator8(fn) {
|
150182
150115
|
return function() {
|
150183
150116
|
var self3 = this, args = arguments;
|
150184
150117
|
return new Promise(function(resolve, reject) {
|
@@ -150193,7 +150126,7 @@ function _asyncToGenerator36(fn) {
|
|
150193
150126
|
});
|
150194
150127
|
};
|
150195
150128
|
}
|
150196
|
-
function
|
150129
|
+
function _class_call_check8(instance, Constructor) {
|
150197
150130
|
if (!(instance instanceof Constructor)) {
|
150198
150131
|
throw new TypeError("Cannot call a class as a function");
|
150199
150132
|
}
|
@@ -150208,14 +150141,14 @@ function _defineProperties23(target, props) {
|
|
150208
150141
|
Object.defineProperty(target, descriptor.key, descriptor);
|
150209
150142
|
}
|
150210
150143
|
}
|
150211
|
-
function
|
150144
|
+
function _create_class8(Constructor, protoProps, staticProps) {
|
150212
150145
|
if (protoProps)
|
150213
150146
|
_defineProperties23(Constructor.prototype, protoProps);
|
150214
150147
|
if (staticProps)
|
150215
150148
|
_defineProperties23(Constructor, staticProps);
|
150216
150149
|
return Constructor;
|
150217
150150
|
}
|
150218
|
-
function
|
150151
|
+
function _define_property11(obj, key, value) {
|
150219
150152
|
if (key in obj) {
|
150220
150153
|
Object.defineProperty(obj, key, {
|
150221
150154
|
value,
|
@@ -150228,24 +150161,24 @@ function _defineProperty28(obj, key, value) {
|
|
150228
150161
|
}
|
150229
150162
|
return obj;
|
150230
150163
|
}
|
150231
|
-
function
|
150164
|
+
function _iterable_to_array(iter) {
|
150232
150165
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
150233
150166
|
return Array.from(iter);
|
150234
150167
|
}
|
150235
|
-
function
|
150168
|
+
function _non_iterable_spread() {
|
150236
150169
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
150237
150170
|
}
|
150238
|
-
function
|
150171
|
+
function _object_spread6(target) {
|
150239
150172
|
for (var i = 1; i < arguments.length; i++) {
|
150240
150173
|
var source = arguments[i] != null ? arguments[i] : {};
|
150241
|
-
var
|
150174
|
+
var ownKeys22 = Object.keys(source);
|
150242
150175
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
150243
|
-
|
150176
|
+
ownKeys22 = ownKeys22.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
150244
150177
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
150245
150178
|
}));
|
150246
150179
|
}
|
150247
|
-
|
150248
|
-
|
150180
|
+
ownKeys22.forEach(function(key) {
|
150181
|
+
_define_property11(target, key, source[key]);
|
150249
150182
|
});
|
150250
150183
|
}
|
150251
150184
|
return target;
|
@@ -150263,7 +150196,7 @@ function ownKeys8(object, enumerableOnly) {
|
|
150263
150196
|
}
|
150264
150197
|
return keys;
|
150265
150198
|
}
|
150266
|
-
function
|
150199
|
+
function _object_spread_props3(target, source) {
|
150267
150200
|
source = source != null ? source : {};
|
150268
150201
|
if (Object.getOwnPropertyDescriptors) {
|
150269
150202
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
@@ -150274,10 +150207,10 @@ function _objectSpreadProps8(target, source) {
|
|
150274
150207
|
}
|
150275
150208
|
return target;
|
150276
150209
|
}
|
150277
|
-
function
|
150210
|
+
function _object_without_properties(source, excluded) {
|
150278
150211
|
if (source == null)
|
150279
150212
|
return {};
|
150280
|
-
var target =
|
150213
|
+
var target = _object_without_properties_loose(source, excluded);
|
150281
150214
|
var key, i;
|
150282
150215
|
if (Object.getOwnPropertySymbols) {
|
150283
150216
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
@@ -150292,7 +150225,7 @@ function _objectWithoutProperties2(source, excluded) {
|
|
150292
150225
|
}
|
150293
150226
|
return target;
|
150294
150227
|
}
|
150295
|
-
function
|
150228
|
+
function _object_without_properties_loose(source, excluded) {
|
150296
150229
|
if (source == null)
|
150297
150230
|
return {};
|
150298
150231
|
var target = {};
|
@@ -150306,21 +150239,21 @@ function _objectWithoutPropertiesLoose2(source, excluded) {
|
|
150306
150239
|
}
|
150307
150240
|
return target;
|
150308
150241
|
}
|
150309
|
-
function
|
150310
|
-
return
|
150242
|
+
function _to_consumable_array(arr) {
|
150243
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
150311
150244
|
}
|
150312
|
-
function
|
150245
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
150313
150246
|
if (!o)
|
150314
150247
|
return;
|
150315
150248
|
if (typeof o === "string")
|
150316
|
-
return
|
150249
|
+
return _array_like_to_array(o, minLen);
|
150317
150250
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
150318
150251
|
if (n === "Object" && o.constructor)
|
150319
150252
|
n = o.constructor.name;
|
150320
150253
|
if (n === "Map" || n === "Set")
|
150321
150254
|
return Array.from(n);
|
150322
150255
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
150323
|
-
return
|
150256
|
+
return _array_like_to_array(o, minLen);
|
150324
150257
|
}
|
150325
150258
|
var __generator41 = function(thisArg, body) {
|
150326
150259
|
var f, y, t, g, _ = {
|
@@ -150428,12 +150361,12 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
150428
150361
|
"use strict";
|
150429
150362
|
function GeneratorPlugin2(logger2, event) {
|
150430
150363
|
var locale = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "en";
|
150431
|
-
|
150432
|
-
|
150433
|
-
|
150434
|
-
|
150435
|
-
|
150436
|
-
|
150364
|
+
_class_call_check8(this, GeneratorPlugin2);
|
150365
|
+
_define_property11(this, "plugins", []);
|
150366
|
+
_define_property11(this, "extendPlugin", {});
|
150367
|
+
_define_property11(this, "customPlugin", {});
|
150368
|
+
_define_property11(this, "event", void 0);
|
150369
|
+
_define_property11(this, "logger", void 0);
|
150437
150370
|
this.event = event;
|
150438
150371
|
this.logger = logger2;
|
150439
150372
|
if (event) {
|
@@ -150449,19 +150382,19 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
150449
150382
|
locale
|
150450
150383
|
});
|
150451
150384
|
}
|
150452
|
-
|
150385
|
+
_create_class8(GeneratorPlugin2, [
|
150453
150386
|
{
|
150454
150387
|
key: "setupPlugin",
|
150455
150388
|
value: function setupPlugin(plugins, registry2) {
|
150456
150389
|
var _this = this;
|
150457
|
-
return
|
150390
|
+
return _async_to_generator8(function() {
|
150458
150391
|
return __generator41(this, function(_state) {
|
150459
150392
|
switch (_state.label) {
|
150460
150393
|
case 0:
|
150461
150394
|
return [
|
150462
150395
|
4,
|
150463
150396
|
Promise.all(plugins.map(function() {
|
150464
|
-
var _ref =
|
150397
|
+
var _ref = _async_to_generator8(function(plugin) {
|
150465
150398
|
var pkgJSON, _getPackageInfo, name, pkgVersion, meta;
|
150466
150399
|
return __generator41(this, function(_state2) {
|
150467
150400
|
switch (_state2.label) {
|
@@ -150516,12 +150449,12 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
150516
150449
|
}));
|
150517
150450
|
}
|
150518
150451
|
if (meta.extend) {
|
150519
|
-
_this.extendPlugin[meta.extend] =
|
150452
|
+
_this.extendPlugin[meta.extend] = _to_consumable_array(_this.extendPlugin[meta.extend] || []).concat([
|
150520
150453
|
plugin
|
150521
150454
|
]);
|
150522
150455
|
} else if (meta.type && meta.key) {
|
150523
|
-
_this.customPlugin[meta.type] =
|
150524
|
-
|
150456
|
+
_this.customPlugin[meta.type] = _to_consumable_array(_this.customPlugin[meta.type] || []).concat([
|
150457
|
+
_object_spread_props3(_object_spread6({}, meta), {
|
150525
150458
|
plugin
|
150526
150459
|
})
|
150527
150460
|
]);
|
@@ -150555,7 +150488,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
150555
150488
|
try {
|
150556
150489
|
for (var _iterator = this.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
150557
150490
|
var info = _step.value;
|
150558
|
-
properties =
|
150491
|
+
properties = _object_spread6({}, properties, info.context.inputContext.getFinalInputs());
|
150559
150492
|
}
|
150560
150493
|
} catch (err) {
|
150561
150494
|
_didIteratorError = true;
|
@@ -150635,14 +150568,14 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
150635
150568
|
key: "installPlugins",
|
150636
150569
|
value: function installPlugins1(solution, inputData) {
|
150637
150570
|
var _this = this;
|
150638
|
-
return
|
150571
|
+
return _async_to_generator8(function() {
|
150639
150572
|
var plugins, plugin, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, info;
|
150640
150573
|
return __generator41(this, function(_state) {
|
150641
150574
|
switch (_state.label) {
|
150642
150575
|
case 0:
|
150643
150576
|
plugins = [];
|
150644
150577
|
if (_this.extendPlugin[solution] && _this.extendPlugin[solution].length > 0) {
|
150645
|
-
plugins =
|
150578
|
+
plugins = _to_consumable_array(plugins).concat(_to_consumable_array(_this.extendPlugin[solution]));
|
150646
150579
|
}
|
150647
150580
|
if (_this.customPlugin[solution]) {
|
150648
150581
|
plugin = _this.customPlugin[solution].find(function(item) {
|
@@ -150724,13 +150657,13 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
150724
150657
|
key: "handleForged",
|
150725
150658
|
value: function handleForged(solution, basePath, inputData, projectPath, generatorCore) {
|
150726
150659
|
var _this = this;
|
150727
|
-
return
|
150660
|
+
return _async_to_generator8(function() {
|
150728
150661
|
var generatorPlugin, restData, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, info, _info_context, _info_context1, onForgedFunc, err, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1, _iterator1, _step1, info1, _info_context2, afterForged, err;
|
150729
150662
|
return __generator41(this, function(_state) {
|
150730
150663
|
switch (_state.label) {
|
150731
150664
|
case 0:
|
150732
150665
|
_this.logger.info(i18n4.t(localeKeys4.run_plugin));
|
150733
|
-
generatorPlugin = inputData.generatorPlugin, restData =
|
150666
|
+
generatorPlugin = inputData.generatorPlugin, restData = _object_without_properties(inputData, [
|
150734
150667
|
"generatorPlugin"
|
150735
150668
|
]);
|
150736
150669
|
if (solution !== restData.solution) {
|