@modern-js/repo-generator 0.0.0-next-20240801022404 → 0.0.0-next-20240801161121
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 +119 -121
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -73371,7 +73371,7 @@ function isEmpty(val, strict) {
|
|
|
73371
73371
|
return false;
|
|
73372
73372
|
}
|
|
73373
73373
|
|
|
73374
|
-
// ../../../../node_modules/.pnpm/tslib@2.6.
|
|
73374
|
+
// ../../../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs
|
|
73375
73375
|
var __assign = function() {
|
|
73376
73376
|
__assign = Object.assign || function __assign11(t) {
|
|
73377
73377
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -73384,6 +73384,82 @@ var __assign = function() {
|
|
|
73384
73384
|
};
|
|
73385
73385
|
return __assign.apply(this, arguments);
|
|
73386
73386
|
};
|
|
73387
|
+
function __generator(thisArg, body) {
|
|
73388
|
+
var _ = { label: 0, sent: function() {
|
|
73389
|
+
if (t[0] & 1)
|
|
73390
|
+
throw t[1];
|
|
73391
|
+
return t[1];
|
|
73392
|
+
}, trys: [], ops: [] }, f, y, t, g;
|
|
73393
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
73394
|
+
return this;
|
|
73395
|
+
}), g;
|
|
73396
|
+
function verb(n) {
|
|
73397
|
+
return function(v) {
|
|
73398
|
+
return step([n, v]);
|
|
73399
|
+
};
|
|
73400
|
+
}
|
|
73401
|
+
function step(op) {
|
|
73402
|
+
if (f)
|
|
73403
|
+
throw new TypeError("Generator is already executing.");
|
|
73404
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
73405
|
+
try {
|
|
73406
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
73407
|
+
return t;
|
|
73408
|
+
if (y = 0, t)
|
|
73409
|
+
op = [op[0] & 2, t.value];
|
|
73410
|
+
switch (op[0]) {
|
|
73411
|
+
case 0:
|
|
73412
|
+
case 1:
|
|
73413
|
+
t = op;
|
|
73414
|
+
break;
|
|
73415
|
+
case 4:
|
|
73416
|
+
_.label++;
|
|
73417
|
+
return { value: op[1], done: false };
|
|
73418
|
+
case 5:
|
|
73419
|
+
_.label++;
|
|
73420
|
+
y = op[1];
|
|
73421
|
+
op = [0];
|
|
73422
|
+
continue;
|
|
73423
|
+
case 7:
|
|
73424
|
+
op = _.ops.pop();
|
|
73425
|
+
_.trys.pop();
|
|
73426
|
+
continue;
|
|
73427
|
+
default:
|
|
73428
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
73429
|
+
_ = 0;
|
|
73430
|
+
continue;
|
|
73431
|
+
}
|
|
73432
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
73433
|
+
_.label = op[1];
|
|
73434
|
+
break;
|
|
73435
|
+
}
|
|
73436
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
73437
|
+
_.label = t[1];
|
|
73438
|
+
t = op;
|
|
73439
|
+
break;
|
|
73440
|
+
}
|
|
73441
|
+
if (t && _.label < t[2]) {
|
|
73442
|
+
_.label = t[2];
|
|
73443
|
+
_.ops.push(op);
|
|
73444
|
+
break;
|
|
73445
|
+
}
|
|
73446
|
+
if (t[2])
|
|
73447
|
+
_.ops.pop();
|
|
73448
|
+
_.trys.pop();
|
|
73449
|
+
continue;
|
|
73450
|
+
}
|
|
73451
|
+
op = body.call(thisArg, _);
|
|
73452
|
+
} catch (e) {
|
|
73453
|
+
op = [6, e];
|
|
73454
|
+
y = 0;
|
|
73455
|
+
} finally {
|
|
73456
|
+
f = t = 0;
|
|
73457
|
+
}
|
|
73458
|
+
if (op[0] & 5)
|
|
73459
|
+
throw op[1];
|
|
73460
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
73461
|
+
}
|
|
73462
|
+
}
|
|
73387
73463
|
|
|
73388
73464
|
// ../../../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/dist.es2015/index.js
|
|
73389
73465
|
function lowerCase(str) {
|
|
@@ -77647,7 +77723,7 @@ var __awaiter = function(thisArg, _arguments, P, generator) {
|
|
|
77647
77723
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
77648
77724
|
});
|
|
77649
77725
|
};
|
|
77650
|
-
var
|
|
77726
|
+
var __generator2 = function(thisArg, body) {
|
|
77651
77727
|
var _ = { label: 0, sent: function() {
|
|
77652
77728
|
if (t[0] & 1)
|
|
77653
77729
|
throw t[1];
|
|
@@ -77776,7 +77852,7 @@ var parseValidatorRules = function(rules) {
|
|
|
77776
77852
|
return function(value, context) {
|
|
77777
77853
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
77778
77854
|
var context_, results, e_1;
|
|
77779
|
-
return
|
|
77855
|
+
return __generator2(this, function(_a2) {
|
|
77780
77856
|
switch (_a2.label) {
|
|
77781
77857
|
case 0:
|
|
77782
77858
|
context_ = getContext(context, value);
|
|
@@ -78138,7 +78214,7 @@ var __awaiter2 = function(thisArg, _arguments, P, generator) {
|
|
|
78138
78214
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
78139
78215
|
});
|
|
78140
78216
|
};
|
|
78141
|
-
var
|
|
78217
|
+
var __generator3 = function(thisArg, body) {
|
|
78142
78218
|
var _ = { label: 0, sent: function() {
|
|
78143
78219
|
if (t[0] & 1)
|
|
78144
78220
|
throw t[1];
|
|
@@ -78336,7 +78412,7 @@ var RULES = {
|
|
|
78336
78412
|
validator: function(value, rule, context, format) {
|
|
78337
78413
|
return __awaiter2(this, void 0, void 0, function() {
|
|
78338
78414
|
var response;
|
|
78339
|
-
return
|
|
78415
|
+
return __generator3(this, function(_a2) {
|
|
78340
78416
|
switch (_a2.label) {
|
|
78341
78417
|
case 0:
|
|
78342
78418
|
if (!isFn(rule.validator))
|
|
@@ -78441,7 +78517,7 @@ var __awaiter3 = function(thisArg, _arguments, P, generator) {
|
|
|
78441
78517
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
78442
78518
|
});
|
|
78443
78519
|
};
|
|
78444
|
-
var
|
|
78520
|
+
var __generator4 = function(thisArg, body) {
|
|
78445
78521
|
var _ = { label: 0, sent: function() {
|
|
78446
78522
|
if (t[0] & 1)
|
|
78447
78523
|
throw t[1];
|
|
@@ -78523,7 +78599,7 @@ registerValidateFormats(formats_default);
|
|
|
78523
78599
|
var validate = function(value, validator, options) {
|
|
78524
78600
|
return __awaiter3(void 0, void 0, void 0, function() {
|
|
78525
78601
|
var validates, results, i, result, type, message;
|
|
78526
|
-
return
|
|
78602
|
+
return __generator4(this, function(_a2) {
|
|
78527
78603
|
switch (_a2.label) {
|
|
78528
78604
|
case 0:
|
|
78529
78605
|
validates = parseValidator(validator, options);
|
|
@@ -78702,7 +78778,7 @@ var __awaiter4 = function(thisArg, _arguments, P, generator) {
|
|
|
78702
78778
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
78703
78779
|
});
|
|
78704
78780
|
};
|
|
78705
|
-
var
|
|
78781
|
+
var __generator5 = function(thisArg, body) {
|
|
78706
78782
|
var _ = { label: 0, sent: function() {
|
|
78707
78783
|
if (t[0] & 1)
|
|
78708
78784
|
throw t[1];
|
|
@@ -79006,7 +79082,7 @@ var validateToFeedbacks = function(field, triggerType) {
|
|
|
79006
79082
|
return __awaiter4(void 0, void 0, void 0, function() {
|
|
79007
79083
|
var results;
|
|
79008
79084
|
var _a2;
|
|
79009
|
-
return
|
|
79085
|
+
return __generator5(this, function(_b) {
|
|
79010
79086
|
switch (_b.label) {
|
|
79011
79087
|
case 0:
|
|
79012
79088
|
return [4, validate(field.value, field.validator, {
|
|
@@ -79446,7 +79522,7 @@ var setLoading = function(target, loading) {
|
|
|
79446
79522
|
var batchSubmit = function(target, onSubmit) {
|
|
79447
79523
|
return __awaiter4(void 0, void 0, void 0, function() {
|
|
79448
79524
|
var getValues, e_1, results, e_2;
|
|
79449
|
-
return
|
|
79525
|
+
return __generator5(this, function(_a2) {
|
|
79450
79526
|
switch (_a2.label) {
|
|
79451
79527
|
case 0:
|
|
79452
79528
|
getValues = function(target2) {
|
|
@@ -79506,7 +79582,7 @@ var batchSubmit = function(target, onSubmit) {
|
|
|
79506
79582
|
var batchValidate = function(target, pattern, triggerType) {
|
|
79507
79583
|
return __awaiter4(void 0, void 0, void 0, function() {
|
|
79508
79584
|
var tasks;
|
|
79509
|
-
return
|
|
79585
|
+
return __generator5(this, function(_a2) {
|
|
79510
79586
|
switch (_a2.label) {
|
|
79511
79587
|
case 0:
|
|
79512
79588
|
if (isForm(target))
|
|
@@ -79545,7 +79621,7 @@ var batchValidate = function(target, pattern, triggerType) {
|
|
|
79545
79621
|
var batchReset = function(target, pattern, options) {
|
|
79546
79622
|
return __awaiter4(void 0, void 0, void 0, function() {
|
|
79547
79623
|
var tasks;
|
|
79548
|
-
return
|
|
79624
|
+
return __generator5(this, function(_a2) {
|
|
79549
79625
|
switch (_a2.label) {
|
|
79550
79626
|
case 0:
|
|
79551
79627
|
tasks = [];
|
|
@@ -79575,7 +79651,7 @@ var validateSelf = batch.bound(function(target, triggerType, noEmit) {
|
|
|
79575
79651
|
}
|
|
79576
79652
|
return __awaiter4(void 0, void 0, void 0, function() {
|
|
79577
79653
|
var start, end, allTriggerTypes, results_1, i, payload, results;
|
|
79578
|
-
return
|
|
79654
|
+
return __generator5(this, function(_a2) {
|
|
79579
79655
|
switch (_a2.label) {
|
|
79580
79656
|
case 0:
|
|
79581
79657
|
start = function() {
|
|
@@ -79635,7 +79711,7 @@ var resetSelf = batch.bound(function(target, options, noEmit) {
|
|
|
79635
79711
|
}
|
|
79636
79712
|
return __awaiter4(void 0, void 0, void 0, function() {
|
|
79637
79713
|
var typedDefaultValue, initialValue;
|
|
79638
|
-
return
|
|
79714
|
+
return __generator5(this, function(_a2) {
|
|
79639
79715
|
switch (_a2.label) {
|
|
79640
79716
|
case 0:
|
|
79641
79717
|
typedDefaultValue = getTypedDefaultValue(target);
|
|
@@ -80281,7 +80357,7 @@ var __awaiter5 = function(thisArg, _arguments, P, generator) {
|
|
|
80281
80357
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
80282
80358
|
});
|
|
80283
80359
|
};
|
|
80284
|
-
var
|
|
80360
|
+
var __generator6 = function(thisArg, body) {
|
|
80285
80361
|
var _ = { label: 0, sent: function() {
|
|
80286
80362
|
if (t[0] & 1)
|
|
80287
80363
|
throw t[1];
|
|
@@ -80433,7 +80509,7 @@ var Field = (
|
|
|
80433
80509
|
}
|
|
80434
80510
|
return __awaiter5(_this, void 0, void 0, function() {
|
|
80435
80511
|
var getValues, values, value;
|
|
80436
|
-
return
|
|
80512
|
+
return __generator6(this, function(_a2) {
|
|
80437
80513
|
switch (_a2.label) {
|
|
80438
80514
|
case 0:
|
|
80439
80515
|
getValues = function(args2) {
|
|
@@ -80472,7 +80548,7 @@ var Field = (
|
|
|
80472
80548
|
}
|
|
80473
80549
|
return __awaiter5(_this, void 0, void 0, function() {
|
|
80474
80550
|
var _a2;
|
|
80475
|
-
return
|
|
80551
|
+
return __generator6(this, function(_b) {
|
|
80476
80552
|
switch (_b.label) {
|
|
80477
80553
|
case 0:
|
|
80478
80554
|
if ((_a2 = args[0]) === null || _a2 === void 0 ? void 0 : _a2.target) {
|
|
@@ -80502,7 +80578,7 @@ var Field = (
|
|
|
80502
80578
|
}
|
|
80503
80579
|
return __awaiter5(_this, void 0, void 0, function() {
|
|
80504
80580
|
var _a2;
|
|
80505
|
-
return
|
|
80581
|
+
return __generator6(this, function(_b) {
|
|
80506
80582
|
switch (_b.label) {
|
|
80507
80583
|
case 0:
|
|
80508
80584
|
if ((_a2 = args[0]) === null || _a2 === void 0 ? void 0 : _a2.target) {
|
|
@@ -84555,84 +84631,6 @@ function _to_consumable_array(arr) {
|
|
|
84555
84631
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
84556
84632
|
}
|
|
84557
84633
|
|
|
84558
|
-
// ../../../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs
|
|
84559
|
-
function __generator6(thisArg, body) {
|
|
84560
|
-
var _ = { label: 0, sent: function() {
|
|
84561
|
-
if (t[0] & 1)
|
|
84562
|
-
throw t[1];
|
|
84563
|
-
return t[1];
|
|
84564
|
-
}, trys: [], ops: [] }, f, y, t, g;
|
|
84565
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
84566
|
-
return this;
|
|
84567
|
-
}), g;
|
|
84568
|
-
function verb(n) {
|
|
84569
|
-
return function(v) {
|
|
84570
|
-
return step([n, v]);
|
|
84571
|
-
};
|
|
84572
|
-
}
|
|
84573
|
-
function step(op) {
|
|
84574
|
-
if (f)
|
|
84575
|
-
throw new TypeError("Generator is already executing.");
|
|
84576
|
-
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
84577
|
-
try {
|
|
84578
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
84579
|
-
return t;
|
|
84580
|
-
if (y = 0, t)
|
|
84581
|
-
op = [op[0] & 2, t.value];
|
|
84582
|
-
switch (op[0]) {
|
|
84583
|
-
case 0:
|
|
84584
|
-
case 1:
|
|
84585
|
-
t = op;
|
|
84586
|
-
break;
|
|
84587
|
-
case 4:
|
|
84588
|
-
_.label++;
|
|
84589
|
-
return { value: op[1], done: false };
|
|
84590
|
-
case 5:
|
|
84591
|
-
_.label++;
|
|
84592
|
-
y = op[1];
|
|
84593
|
-
op = [0];
|
|
84594
|
-
continue;
|
|
84595
|
-
case 7:
|
|
84596
|
-
op = _.ops.pop();
|
|
84597
|
-
_.trys.pop();
|
|
84598
|
-
continue;
|
|
84599
|
-
default:
|
|
84600
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
84601
|
-
_ = 0;
|
|
84602
|
-
continue;
|
|
84603
|
-
}
|
|
84604
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
84605
|
-
_.label = op[1];
|
|
84606
|
-
break;
|
|
84607
|
-
}
|
|
84608
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
84609
|
-
_.label = t[1];
|
|
84610
|
-
t = op;
|
|
84611
|
-
break;
|
|
84612
|
-
}
|
|
84613
|
-
if (t && _.label < t[2]) {
|
|
84614
|
-
_.label = t[2];
|
|
84615
|
-
_.ops.push(op);
|
|
84616
|
-
break;
|
|
84617
|
-
}
|
|
84618
|
-
if (t[2])
|
|
84619
|
-
_.ops.pop();
|
|
84620
|
-
_.trys.pop();
|
|
84621
|
-
continue;
|
|
84622
|
-
}
|
|
84623
|
-
op = body.call(thisArg, _);
|
|
84624
|
-
} catch (e) {
|
|
84625
|
-
op = [6, e];
|
|
84626
|
-
y = 0;
|
|
84627
|
-
} finally {
|
|
84628
|
-
f = t = 0;
|
|
84629
|
-
}
|
|
84630
|
-
if (op[0] & 5)
|
|
84631
|
-
throw op[1];
|
|
84632
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
84633
|
-
}
|
|
84634
|
-
}
|
|
84635
|
-
|
|
84636
84634
|
// ../../generator-plugin/dist/esm/index.js
|
|
84637
84635
|
var import_path17 = __toESM(require("path"));
|
|
84638
84636
|
var import_lodash13 = require("@modern-js/utils/lodash");
|
|
@@ -84737,7 +84735,7 @@ function fileExists(filePath) {
|
|
|
84737
84735
|
function _fileExists() {
|
|
84738
84736
|
_fileExists = _async_to_generator(function(filePath) {
|
|
84739
84737
|
var e;
|
|
84740
|
-
return
|
|
84738
|
+
return __generator(this, function(_state) {
|
|
84741
84739
|
switch (_state.label) {
|
|
84742
84740
|
case 0:
|
|
84743
84741
|
_state.trys.push([
|
|
@@ -84794,7 +84792,7 @@ function addFile(config, projectPath, templatePath, renderString3) {
|
|
|
84794
84792
|
function _addFile() {
|
|
84795
84793
|
_addFile = _async_to_generator(function(config, projectPath, templatePath, renderString3) {
|
|
84796
84794
|
var fileDestPath, destExists, absTemplatePath, rawTemplate, _config_templateFile, template;
|
|
84797
|
-
return
|
|
84795
|
+
return __generator(this, function(_state) {
|
|
84798
84796
|
switch (_state.label) {
|
|
84799
84797
|
case 0:
|
|
84800
84798
|
fileDestPath = import_path13.default.join(projectPath, config.file);
|
|
@@ -84874,7 +84872,7 @@ function addManyFiles(config, projectPath, templatePath, renderString3) {
|
|
|
84874
84872
|
function _addManyFiles() {
|
|
84875
84873
|
_addManyFiles = _async_to_generator(function(config, projectPath, templatePath, renderString3) {
|
|
84876
84874
|
var _config_templateBase, dest, templateFiles, filesAdded, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, templateFile, absTemplatePath, targetFile, fileCfg, addedPath, err;
|
|
84877
|
-
return
|
|
84875
|
+
return __generator(this, function(_state) {
|
|
84878
84876
|
switch (_state.label) {
|
|
84879
84877
|
case 0:
|
|
84880
84878
|
dest = config.destination;
|
|
@@ -85061,7 +85059,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
|
85061
85059
|
_proto.addFile = function addFile1(params) {
|
|
85062
85060
|
var _this = this;
|
|
85063
85061
|
return _async_to_generator(function() {
|
|
85064
|
-
return
|
|
85062
|
+
return __generator(this, function(_state) {
|
|
85065
85063
|
switch (_state.label) {
|
|
85066
85064
|
case 0:
|
|
85067
85065
|
return [
|
|
@@ -85080,7 +85078,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
|
85080
85078
|
_proto.addManyFiles = function addManyFiles1(params) {
|
|
85081
85079
|
var _this = this;
|
|
85082
85080
|
return _async_to_generator(function() {
|
|
85083
|
-
return
|
|
85081
|
+
return __generator(this, function(_state) {
|
|
85084
85082
|
switch (_state.label) {
|
|
85085
85083
|
case 0:
|
|
85086
85084
|
return [
|
|
@@ -85100,7 +85098,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
|
85100
85098
|
var _this = this;
|
|
85101
85099
|
return _async_to_generator(function() {
|
|
85102
85100
|
var fsMaterial;
|
|
85103
|
-
return
|
|
85101
|
+
return __generator(this, function(_state) {
|
|
85104
85102
|
switch (_state.label) {
|
|
85105
85103
|
case 0:
|
|
85106
85104
|
fsMaterial = new FsMaterial(_this.projectPath);
|
|
@@ -85126,7 +85124,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
|
85126
85124
|
var _this = this;
|
|
85127
85125
|
return _async_to_generator(function() {
|
|
85128
85126
|
var update;
|
|
85129
|
-
return
|
|
85127
|
+
return __generator(this, function(_state) {
|
|
85130
85128
|
switch (_state.label) {
|
|
85131
85129
|
case 0:
|
|
85132
85130
|
update = {};
|
|
@@ -85150,7 +85148,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
|
85150
85148
|
var _this = this;
|
|
85151
85149
|
return _async_to_generator(function() {
|
|
85152
85150
|
var content, newContent;
|
|
85153
|
-
return
|
|
85151
|
+
return __generator(this, function(_state) {
|
|
85154
85152
|
switch (_state.label) {
|
|
85155
85153
|
case 0:
|
|
85156
85154
|
return [
|
|
@@ -85177,7 +85175,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
|
85177
85175
|
var _this = this;
|
|
85178
85176
|
return _async_to_generator(function() {
|
|
85179
85177
|
var file;
|
|
85180
|
-
return
|
|
85178
|
+
return __generator(this, function(_state) {
|
|
85181
85179
|
switch (_state.label) {
|
|
85182
85180
|
case 0:
|
|
85183
85181
|
file = import_path14.default.join(_this.projectPath, fileName);
|
|
@@ -85210,7 +85208,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
|
85210
85208
|
var _this = this;
|
|
85211
85209
|
return _async_to_generator(function() {
|
|
85212
85210
|
var dir, stat, e;
|
|
85213
|
-
return
|
|
85211
|
+
return __generator(this, function(_state) {
|
|
85214
85212
|
switch (_state.label) {
|
|
85215
85213
|
case 0:
|
|
85216
85214
|
dir = import_path14.default.join(_this.projectPath, dirName);
|
|
@@ -85264,7 +85262,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
|
85264
85262
|
_proto.isFileExist = function isFileExist(fileName) {
|
|
85265
85263
|
var _this = this;
|
|
85266
85264
|
return _async_to_generator(function() {
|
|
85267
|
-
return
|
|
85265
|
+
return __generator(this, function(_state) {
|
|
85268
85266
|
return [
|
|
85269
85267
|
2,
|
|
85270
85268
|
fileExists(import_path14.default.join(_this.projectPath, fileName))
|
|
@@ -85275,7 +85273,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
|
85275
85273
|
_proto.readDir = function readDir(dir) {
|
|
85276
85274
|
var _this = this;
|
|
85277
85275
|
return _async_to_generator(function() {
|
|
85278
|
-
return
|
|
85276
|
+
return __generator(this, function(_state) {
|
|
85279
85277
|
return [
|
|
85280
85278
|
2,
|
|
85281
85279
|
import_utils50.fs.readdir(import_path14.default.join(_this.projectPath, dir))
|
|
@@ -85331,7 +85329,7 @@ var PluginGitAPI = /* @__PURE__ */ function() {
|
|
|
85331
85329
|
_proto.isInGitRepo = function isInGitRepo2() {
|
|
85332
85330
|
var _this = this;
|
|
85333
85331
|
return _async_to_generator(function() {
|
|
85334
|
-
return
|
|
85332
|
+
return __generator(this, function(_state) {
|
|
85335
85333
|
return [
|
|
85336
85334
|
2,
|
|
85337
85335
|
_this.gitApi.isInGitRepo(_this.projectPath)
|
|
@@ -85342,7 +85340,7 @@ var PluginGitAPI = /* @__PURE__ */ function() {
|
|
|
85342
85340
|
_proto.initGitRepo = function initGitRepo2() {
|
|
85343
85341
|
var _this = this;
|
|
85344
85342
|
return _async_to_generator(function() {
|
|
85345
|
-
return
|
|
85343
|
+
return __generator(this, function(_state) {
|
|
85346
85344
|
switch (_state.label) {
|
|
85347
85345
|
case 0:
|
|
85348
85346
|
return [
|
|
@@ -85362,7 +85360,7 @@ var PluginGitAPI = /* @__PURE__ */ function() {
|
|
|
85362
85360
|
var commitMessage = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "feat: init";
|
|
85363
85361
|
var _this = this;
|
|
85364
85362
|
return _async_to_generator(function() {
|
|
85365
|
-
return
|
|
85363
|
+
return __generator(this, function(_state) {
|
|
85366
85364
|
switch (_state.label) {
|
|
85367
85365
|
case 0:
|
|
85368
85366
|
return [
|
|
@@ -85593,7 +85591,7 @@ var PluginNpmAPI = /* @__PURE__ */ function() {
|
|
|
85593
85591
|
_proto.install = function install() {
|
|
85594
85592
|
var _this = this;
|
|
85595
85593
|
return _async_to_generator(function() {
|
|
85596
|
-
return
|
|
85594
|
+
return __generator(this, function(_state) {
|
|
85597
85595
|
switch (_state.label) {
|
|
85598
85596
|
case 0:
|
|
85599
85597
|
if (!(_this.packageManager === PackageManager.Pnpm))
|
|
@@ -85951,7 +85949,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
|
85951
85949
|
_proto.createElement = function createElement(element, params) {
|
|
85952
85950
|
var _this = this;
|
|
85953
85951
|
return _async_to_generator(function() {
|
|
85954
|
-
return
|
|
85952
|
+
return __generator(this, function(_state) {
|
|
85955
85953
|
switch (_state.label) {
|
|
85956
85954
|
case 0:
|
|
85957
85955
|
if (!(_this.solution === Solution.MWA))
|
|
@@ -85987,7 +85985,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
|
85987
85985
|
_proto.enableFunc = function enableFunc(func, params) {
|
|
85988
85986
|
var _this = this;
|
|
85989
85987
|
return _async_to_generator(function() {
|
|
85990
|
-
return
|
|
85988
|
+
return __generator(this, function(_state) {
|
|
85991
85989
|
switch (_state.label) {
|
|
85992
85990
|
case 0:
|
|
85993
85991
|
if (!(_this.solution === Solution.MWA))
|
|
@@ -86140,7 +86138,7 @@ function getPackageMeta(packageName, packageVersion, options) {
|
|
|
86140
86138
|
function _getPackageMeta() {
|
|
86141
86139
|
_getPackageMeta = _async_to_generator(function(packageName, packageVersion, options) {
|
|
86142
86140
|
var registryUrl, params, getPkgInfoPromise, stdout, pkgMetaInfo;
|
|
86143
|
-
return
|
|
86141
|
+
return __generator(this, function(_state) {
|
|
86144
86142
|
switch (_state.label) {
|
|
86145
86143
|
case 0:
|
|
86146
86144
|
registryUrl = (options || {}).registryUrl;
|
|
@@ -86195,13 +86193,13 @@ function installPlugins(plugins, registryUrl) {
|
|
|
86195
86193
|
}
|
|
86196
86194
|
function _installPlugins() {
|
|
86197
86195
|
_installPlugins = _async_to_generator(function(plugins, registryUrl) {
|
|
86198
|
-
return
|
|
86196
|
+
return __generator(this, function(_state) {
|
|
86199
86197
|
return [
|
|
86200
86198
|
2,
|
|
86201
86199
|
Promise.all(plugins.map(function() {
|
|
86202
86200
|
var _ref = _async_to_generator(function(plugin) {
|
|
86203
86201
|
var pluginPath, _getPackageInfo, name, version, pluginPath1;
|
|
86204
|
-
return
|
|
86202
|
+
return __generator(this, function(_state2) {
|
|
86205
86203
|
switch (_state2.label) {
|
|
86206
86204
|
case 0:
|
|
86207
86205
|
if (plugin.startsWith("file:")) {
|
|
@@ -86304,7 +86302,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
|
86304
86302
|
_proto.setupPlugin = function setupPlugin(plugins, registry2) {
|
|
86305
86303
|
var _this = this;
|
|
86306
86304
|
return _async_to_generator(function() {
|
|
86307
|
-
return
|
|
86305
|
+
return __generator(this, function(_state) {
|
|
86308
86306
|
switch (_state.label) {
|
|
86309
86307
|
case 0:
|
|
86310
86308
|
return [
|
|
@@ -86312,7 +86310,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
|
86312
86310
|
Promise.all(plugins.map(function() {
|
|
86313
86311
|
var _ref = _async_to_generator(function(plugin) {
|
|
86314
86312
|
var pkgJSON, _getPackageInfo, name, pkgVersion, meta;
|
|
86315
|
-
return
|
|
86313
|
+
return __generator(this, function(_state2) {
|
|
86316
86314
|
switch (_state2.label) {
|
|
86317
86315
|
case 0:
|
|
86318
86316
|
if (!plugin.startsWith("file:"))
|
|
@@ -86474,7 +86472,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
|
86474
86472
|
var _this = this;
|
|
86475
86473
|
return _async_to_generator(function() {
|
|
86476
86474
|
var plugins, plugin, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, info;
|
|
86477
|
-
return
|
|
86475
|
+
return __generator(this, function(_state) {
|
|
86478
86476
|
switch (_state.label) {
|
|
86479
86477
|
case 0:
|
|
86480
86478
|
plugins = [];
|
|
@@ -86557,7 +86555,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
|
86557
86555
|
var _this = this;
|
|
86558
86556
|
return _async_to_generator(function() {
|
|
86559
86557
|
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;
|
|
86560
|
-
return
|
|
86558
|
+
return __generator(this, function(_state) {
|
|
86561
86559
|
switch (_state.label) {
|
|
86562
86560
|
case 0:
|
|
86563
86561
|
_this.logger.info(i18n4.t(localeKeys4.run_plugin));
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "0.0.0-next-
|
|
18
|
+
"version": "0.0.0-next-20240801161121",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"/dist/index.js"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@modern-js/utils": "0.0.0-next-
|
|
26
|
+
"@modern-js/utils": "0.0.0-next-20240801161121"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@modern-js/codesmith": "2.3.5",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"@types/node": "^14",
|
|
33
33
|
"jest": "^29",
|
|
34
34
|
"typescript": "^5",
|
|
35
|
-
"@modern-js/generator
|
|
36
|
-
"@modern-js/
|
|
37
|
-
"@modern-js/generator-
|
|
38
|
-
"@modern-js/generator
|
|
39
|
-
"@modern-js/mwa-generator": "0.0.0-next-
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
35
|
+
"@modern-js/base-generator": "0.0.0-next-20240801161121",
|
|
36
|
+
"@modern-js/generator-common": "0.0.0-next-20240801161121",
|
|
37
|
+
"@modern-js/generator-plugin": "0.0.0-next-20240801161121",
|
|
38
|
+
"@modern-js/module-generator": "0.0.0-next-20240801161121",
|
|
39
|
+
"@modern-js/mwa-generator": "0.0.0-next-20240801161121",
|
|
40
|
+
"@scripts/build": "0.0.0-next-20240801161121",
|
|
41
|
+
"@modern-js/generator-utils": "0.0.0-next-20240801161121",
|
|
42
|
+
"@scripts/jest-config": "0.0.0-next-20240801161121"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"publishConfig": {
|