@modern-js/repo-generator 0.0.0-next-1685530921784 → 0.0.0-next-1685534893515
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 +170 -105
- package/package.json +14 -14
package/dist/index.js
CHANGED
|
@@ -125752,11 +125752,11 @@ var mime = Import.lazy("../compiled/mime-types", require);
|
|
|
125752
125752
|
var chokidar = Import.lazy("../compiled/chokidar", require);
|
|
125753
125753
|
var inquirer = Import.lazy("../compiled/inquirer", require);
|
|
125754
125754
|
|
|
125755
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
125755
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
|
|
125756
125756
|
var import_lodash7 = __toESM(require_lodash3());
|
|
125757
125757
|
var import_comment_json = __toESM(require_src2());
|
|
125758
125758
|
|
|
125759
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.2.
|
|
125759
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.2.5/node_modules/@modern-js/codesmith-api-npm/dist/esm/utils/env.js
|
|
125760
125760
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
125761
125761
|
try {
|
|
125762
125762
|
var info = gen[key](arg);
|
|
@@ -126064,7 +126064,7 @@ function _canUsePnpm() {
|
|
|
126064
126064
|
return _canUsePnpm.apply(this, arguments);
|
|
126065
126065
|
}
|
|
126066
126066
|
|
|
126067
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.2.
|
|
126067
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.2.5/node_modules/@modern-js/codesmith-api-npm/dist/esm/utils/install.js
|
|
126068
126068
|
function asyncGeneratorStep2(gen, resolve, reject, _next, _throw, key, arg) {
|
|
126069
126069
|
try {
|
|
126070
126070
|
var info = gen[key](arg);
|
|
@@ -126431,7 +126431,7 @@ function _pnpmInstall() {
|
|
|
126431
126431
|
return _pnpmInstall.apply(this, arguments);
|
|
126432
126432
|
}
|
|
126433
126433
|
|
|
126434
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.2.
|
|
126434
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.2.5/node_modules/@modern-js/codesmith-api-npm/dist/esm/index.js
|
|
126435
126435
|
function _class_call_check(instance, Constructor) {
|
|
126436
126436
|
if (!(instance instanceof Constructor)) {
|
|
126437
126437
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -126512,7 +126512,7 @@ var NpmAPI = /* @__PURE__ */ function() {
|
|
|
126512
126512
|
return NpmAPI2;
|
|
126513
126513
|
}();
|
|
126514
126514
|
|
|
126515
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.2.
|
|
126515
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.2.5_@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith-api-git/dist/esm/utils/index.js
|
|
126516
126516
|
function asyncGeneratorStep3(gen, resolve, reject, _next, _throw, key, arg) {
|
|
126517
126517
|
try {
|
|
126518
126518
|
var info = gen[key](arg);
|
|
@@ -126854,7 +126854,7 @@ function _gitCommit() {
|
|
|
126854
126854
|
return _gitCommit.apply(this, arguments);
|
|
126855
126855
|
}
|
|
126856
126856
|
|
|
126857
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.2.
|
|
126857
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.2.5_@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith-api-git/dist/esm/index.js
|
|
126858
126858
|
function asyncGeneratorStep4(gen, resolve, reject, _next, _throw, key, arg) {
|
|
126859
126859
|
try {
|
|
126860
126860
|
var info = gen[key](arg);
|
|
@@ -127185,7 +127185,7 @@ var GitAPI = /* @__PURE__ */ function() {
|
|
|
127185
127185
|
return GitAPI2;
|
|
127186
127186
|
}();
|
|
127187
127187
|
|
|
127188
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127188
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/logger/constants.js
|
|
127189
127189
|
var LoggerLevel;
|
|
127190
127190
|
(function(LoggerLevel2) {
|
|
127191
127191
|
LoggerLevel2["Error"] = "error";
|
|
@@ -127204,7 +127204,7 @@ var LevelPriority = [
|
|
|
127204
127204
|
LoggerLevel.Stream
|
|
127205
127205
|
];
|
|
127206
127206
|
|
|
127207
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127207
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/logger/index.js
|
|
127208
127208
|
function _array_like_to_array(arr, len) {
|
|
127209
127209
|
if (len == null || len > arr.length)
|
|
127210
127210
|
len = arr.length;
|
|
@@ -127389,20 +127389,20 @@ var Logger = /* @__PURE__ */ function() {
|
|
|
127389
127389
|
return Logger2;
|
|
127390
127390
|
}();
|
|
127391
127391
|
|
|
127392
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127392
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/codesmith/index.js
|
|
127393
127393
|
var import_path7 = __toESM(require("path"));
|
|
127394
127394
|
|
|
127395
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127395
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/generator/index.js
|
|
127396
127396
|
var import_path4 = __toESM(require("path"));
|
|
127397
127397
|
var import_events = require("events");
|
|
127398
127398
|
|
|
127399
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127399
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/materials/FsMaterial.js
|
|
127400
127400
|
var import_path2 = __toESM(require("path"));
|
|
127401
127401
|
|
|
127402
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127402
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/materials/FsResource.js
|
|
127403
127403
|
var import_path = __toESM(require("path"));
|
|
127404
127404
|
|
|
127405
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127405
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/materials/constants.js
|
|
127406
127406
|
var IMAGE_EXT_LIST = [
|
|
127407
127407
|
".jpg",
|
|
127408
127408
|
".jpeg",
|
|
@@ -127416,7 +127416,7 @@ var IMAGE_EXT_LIST = [
|
|
|
127416
127416
|
".wmf"
|
|
127417
127417
|
];
|
|
127418
127418
|
|
|
127419
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127419
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/materials/FsResource.js
|
|
127420
127420
|
function asyncGeneratorStep5(gen, resolve, reject, _next, _throw, key, arg) {
|
|
127421
127421
|
try {
|
|
127422
127422
|
var info = gen[key](arg);
|
|
@@ -127648,7 +127648,7 @@ var FsResource = /* @__PURE__ */ function() {
|
|
|
127648
127648
|
return FsResource2;
|
|
127649
127649
|
}();
|
|
127650
127650
|
|
|
127651
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127651
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/materials/FsMaterial.js
|
|
127652
127652
|
function asyncGeneratorStep6(gen, resolve, reject, _next, _throw, key, arg) {
|
|
127653
127653
|
try {
|
|
127654
127654
|
var info = gen[key](arg);
|
|
@@ -127872,7 +127872,7 @@ var FsMaterial = /* @__PURE__ */ function() {
|
|
|
127872
127872
|
return FsMaterial2;
|
|
127873
127873
|
}();
|
|
127874
127874
|
|
|
127875
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127875
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/utils/nodeRequire.js
|
|
127876
127876
|
var nodeRequire = function(path18) {
|
|
127877
127877
|
try {
|
|
127878
127878
|
var module2 = __non_webpack_require__(path18);
|
|
@@ -127889,10 +127889,10 @@ var nodeRequire = function(path18) {
|
|
|
127889
127889
|
}
|
|
127890
127890
|
};
|
|
127891
127891
|
|
|
127892
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127892
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/utils/getGeneratorDir.js
|
|
127893
127893
|
var import_path3 = __toESM(require("path"));
|
|
127894
127894
|
|
|
127895
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
127895
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/utils/fsExists.js
|
|
127896
127896
|
function asyncGeneratorStep7(gen, resolve, reject, _next, _throw, key, arg) {
|
|
127897
127897
|
try {
|
|
127898
127898
|
var info = gen[key](arg);
|
|
@@ -128065,7 +128065,7 @@ function _fsExists() {
|
|
|
128065
128065
|
return _fsExists.apply(this, arguments);
|
|
128066
128066
|
}
|
|
128067
128067
|
|
|
128068
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
128068
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/utils/getGeneratorDir.js
|
|
128069
128069
|
function asyncGeneratorStep8(gen, resolve, reject, _next, _throw, key, arg) {
|
|
128070
128070
|
try {
|
|
128071
128071
|
var info = gen[key](arg);
|
|
@@ -128259,7 +128259,7 @@ function _getGeneratorDir() {
|
|
|
128259
128259
|
return _getGeneratorDir.apply(this, arguments);
|
|
128260
128260
|
}
|
|
128261
128261
|
|
|
128262
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
128262
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/generator/index.js
|
|
128263
128263
|
function asyncGeneratorStep9(gen, resolve, reject, _next, _throw, key, arg) {
|
|
128264
128264
|
try {
|
|
128265
128265
|
var info = gen[key](arg);
|
|
@@ -128473,6 +128473,7 @@ var GeneratorCore = /* @__PURE__ */ function() {
|
|
|
128473
128473
|
_define_property7(this, "logger", void 0);
|
|
128474
128474
|
_define_property7(this, "materialsManager", void 0);
|
|
128475
128475
|
_define_property7(this, "outputPath", void 0);
|
|
128476
|
+
_define_property7(this, "basePath", void 0);
|
|
128476
128477
|
var _this = this;
|
|
128477
128478
|
_define_property7(this, "output", {
|
|
128478
128479
|
fs: function() {
|
|
@@ -128510,6 +128511,7 @@ var GeneratorCore = /* @__PURE__ */ function() {
|
|
|
128510
128511
|
this.logger = logger2;
|
|
128511
128512
|
this.materialsManager = materialsManager;
|
|
128512
128513
|
this.outputPath = outputPath;
|
|
128514
|
+
this.basePath = process.cwd();
|
|
128513
128515
|
this.event = new import_events.EventEmitter();
|
|
128514
128516
|
this.event.setMaxListeners(15);
|
|
128515
128517
|
this._context = _object_spread2({
|
|
@@ -128552,6 +128554,12 @@ var GeneratorCore = /* @__PURE__ */ function() {
|
|
|
128552
128554
|
this.outputPath = outputPath;
|
|
128553
128555
|
}
|
|
128554
128556
|
},
|
|
128557
|
+
{
|
|
128558
|
+
key: "setbasePath",
|
|
128559
|
+
value: function setbasePath(basePath) {
|
|
128560
|
+
this.basePath = basePath;
|
|
128561
|
+
}
|
|
128562
|
+
},
|
|
128555
128563
|
{
|
|
128556
128564
|
key: "loadLocalGenerator",
|
|
128557
128565
|
value: function loadLocalGenerator(generator) {
|
|
@@ -128702,11 +128710,15 @@ var GeneratorCore = /* @__PURE__ */ function() {
|
|
|
128702
128710
|
value: function loadGenerator(generator) {
|
|
128703
128711
|
var _this = this;
|
|
128704
128712
|
return _async_to_generator9(function() {
|
|
128705
|
-
var loadGeneratorPromise, _ref, generatorPkg, pkgJson, materialKey, generatorScript;
|
|
128713
|
+
var generatorPath, loadGeneratorPromise, _ref, generatorPkg, pkgJson, materialKey, generatorScript;
|
|
128706
128714
|
return __generator9(this, function(_state) {
|
|
128707
128715
|
switch (_state.label) {
|
|
128708
128716
|
case 0:
|
|
128709
|
-
|
|
128717
|
+
generatorPath = generator;
|
|
128718
|
+
if (generator.startsWith("file:")) {
|
|
128719
|
+
generatorPath = import_path4.default.join(_this.basePath, generator.slice(5));
|
|
128720
|
+
}
|
|
128721
|
+
loadGeneratorPromise = import_path4.default.isAbsolute(generatorPath) ? _this.loadLocalGenerator(generatorPath) : _this.loadRemoteGenerator(generator);
|
|
128710
128722
|
return [
|
|
128711
128723
|
4,
|
|
128712
128724
|
loadGeneratorPromise
|
|
@@ -128767,6 +128779,7 @@ var GeneratorCore = /* @__PURE__ */ function() {
|
|
|
128767
128779
|
material: generatorPkg
|
|
128768
128780
|
});
|
|
128769
128781
|
spinner.stop();
|
|
128782
|
+
_this.setbasePath(_this._context.current.material.basePath);
|
|
128770
128783
|
return [
|
|
128771
128784
|
4,
|
|
128772
128785
|
generatorScript(_this._context, _this)
|
|
@@ -128788,7 +128801,7 @@ var GeneratorCore = /* @__PURE__ */ function() {
|
|
|
128788
128801
|
var relativePwdPath = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", config = arguments.length > 2 ? arguments[2] : void 0;
|
|
128789
128802
|
var _this = this;
|
|
128790
128803
|
return _async_to_generator9(function() {
|
|
128791
|
-
var spinner, _ref, materialKey, generatorPkg, generatorScript, subContext, preOutputPath;
|
|
128804
|
+
var spinner, _ref, materialKey, generatorPkg, generatorScript, subContext, preOutputPath, preBasePath;
|
|
128792
128805
|
return __generator9(this, function(_state) {
|
|
128793
128806
|
switch (_state.label) {
|
|
128794
128807
|
case 0:
|
|
@@ -128817,7 +128830,9 @@ var GeneratorCore = /* @__PURE__ */ function() {
|
|
|
128817
128830
|
});
|
|
128818
128831
|
_this.logger.debug("subContext", subContext);
|
|
128819
128832
|
preOutputPath = _this.outputPath;
|
|
128833
|
+
preBasePath = _this.basePath;
|
|
128820
128834
|
_this.setOutputPath(import_path4.default.resolve(_this.outputPath, relativePwdPath || ""));
|
|
128835
|
+
_this.setbasePath(subContext.current.material.basePath);
|
|
128821
128836
|
spinner.stop();
|
|
128822
128837
|
return [
|
|
128823
128838
|
4,
|
|
@@ -128826,6 +128841,7 @@ var GeneratorCore = /* @__PURE__ */ function() {
|
|
|
128826
128841
|
case 2:
|
|
128827
128842
|
_state.sent();
|
|
128828
128843
|
_this.setOutputPath(preOutputPath);
|
|
128844
|
+
_this.setbasePath(preBasePath);
|
|
128829
128845
|
return [
|
|
128830
128846
|
2
|
|
128831
128847
|
];
|
|
@@ -128838,10 +128854,10 @@ var GeneratorCore = /* @__PURE__ */ function() {
|
|
|
128838
128854
|
return GeneratorCore2;
|
|
128839
128855
|
}();
|
|
128840
128856
|
|
|
128841
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
128857
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/materials/index.js
|
|
128842
128858
|
var import_path6 = __toESM(require("path"));
|
|
128843
128859
|
|
|
128844
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
128860
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/utils/packageManager.js
|
|
128845
128861
|
var import_path5 = __toESM(require("path"));
|
|
128846
128862
|
function asyncGeneratorStep10(gen, resolve, reject, _next, _throw, key, arg) {
|
|
128847
128863
|
try {
|
|
@@ -129174,7 +129190,7 @@ function _runInstall() {
|
|
|
129174
129190
|
return _runInstall.apply(this, arguments);
|
|
129175
129191
|
}
|
|
129176
129192
|
|
|
129177
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
129193
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/utils/timeoutPromise.js
|
|
129178
129194
|
function asyncGeneratorStep11(gen, resolve, reject, _next, _throw, key, arg) {
|
|
129179
129195
|
try {
|
|
129180
129196
|
var info = gen[key](arg);
|
|
@@ -129364,16 +129380,16 @@ function _timeoutPromise() {
|
|
|
129364
129380
|
return _timeoutPromise.apply(this, arguments);
|
|
129365
129381
|
}
|
|
129366
129382
|
|
|
129367
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
129383
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/utils/downloadPackage.js
|
|
129368
129384
|
var import_os = __toESM(require("os"));
|
|
129369
129385
|
var import_axios = __toESM(require_axios2());
|
|
129370
129386
|
var import_tar = __toESM(require_tar());
|
|
129371
129387
|
|
|
129372
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
129388
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/constants.js
|
|
129373
129389
|
var NPM_API_TIMEOUT = 3e4;
|
|
129374
129390
|
var CATCHE_VALIDITY_PREIOD = 12 * 3600 * 1e3;
|
|
129375
129391
|
|
|
129376
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
129392
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/utils/getNpmTarballUrl.js
|
|
129377
129393
|
function asyncGeneratorStep12(gen, resolve, reject, _next, _throw, key, arg) {
|
|
129378
129394
|
try {
|
|
129379
129395
|
var info = gen[key](arg);
|
|
@@ -129550,7 +129566,7 @@ function _getNpmTarballUrl() {
|
|
|
129550
129566
|
return _getNpmTarballUrl.apply(this, arguments);
|
|
129551
129567
|
}
|
|
129552
129568
|
|
|
129553
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
129569
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/utils/getNpmVersion.js
|
|
129554
129570
|
function asyncGeneratorStep13(gen, resolve, reject, _next, _throw, key, arg) {
|
|
129555
129571
|
try {
|
|
129556
129572
|
var info = gen[key](arg);
|
|
@@ -129722,7 +129738,7 @@ function _getNpmVersion() {
|
|
|
129722
129738
|
return _getNpmVersion.apply(this, arguments);
|
|
129723
129739
|
}
|
|
129724
129740
|
|
|
129725
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
129741
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/utils/downloadPackage.js
|
|
129726
129742
|
function asyncGeneratorStep14(gen, resolve, reject, _next, _throw, key, arg) {
|
|
129727
129743
|
try {
|
|
129728
129744
|
var info = gen[key](arg);
|
|
@@ -129976,6 +129992,11 @@ function _downloadPackage() {
|
|
|
129976
129992
|
case 0:
|
|
129977
129993
|
pkgVersion = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : "latest", options = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : {};
|
|
129978
129994
|
registryUrl = options.registryUrl, install = options.install;
|
|
129995
|
+
if (!!import_semver.default.valid(pkgVersion))
|
|
129996
|
+
return [
|
|
129997
|
+
3,
|
|
129998
|
+
2
|
|
129999
|
+
];
|
|
129979
130000
|
return [
|
|
129980
130001
|
4,
|
|
129981
130002
|
getNpmVersion(pkgName, {
|
|
@@ -129988,26 +130009,34 @@ function _downloadPackage() {
|
|
|
129988
130009
|
if (version === void 0) {
|
|
129989
130010
|
throw new Error("package ".concat(pkgName, "@").concat(pkgVersion, " not found in registry"));
|
|
129990
130011
|
}
|
|
130012
|
+
return [
|
|
130013
|
+
3,
|
|
130014
|
+
3
|
|
130015
|
+
];
|
|
130016
|
+
case 2:
|
|
130017
|
+
version = pkgVersion;
|
|
130018
|
+
_state.label = 3;
|
|
130019
|
+
case 3:
|
|
129991
130020
|
targetDir = "".concat(import_os.default.tmpdir(), "/csmith-generator/").concat(pkgName, "@").concat(version);
|
|
129992
130021
|
return [
|
|
129993
130022
|
4,
|
|
129994
130023
|
fsExists(targetDir)
|
|
129995
130024
|
];
|
|
129996
|
-
case
|
|
130025
|
+
case 4:
|
|
129997
130026
|
_tmp = _state.sent();
|
|
129998
130027
|
if (!_tmp)
|
|
129999
130028
|
return [
|
|
130000
130029
|
3,
|
|
130001
|
-
|
|
130030
|
+
6
|
|
130002
130031
|
];
|
|
130003
130032
|
return [
|
|
130004
130033
|
4,
|
|
130005
130034
|
isValidCache(targetDir)
|
|
130006
130035
|
];
|
|
130007
|
-
case
|
|
130036
|
+
case 5:
|
|
130008
130037
|
_tmp = _state.sent();
|
|
130009
|
-
_state.label =
|
|
130010
|
-
case
|
|
130038
|
+
_state.label = 6;
|
|
130039
|
+
case 6:
|
|
130011
130040
|
if (_tmp) {
|
|
130012
130041
|
return [
|
|
130013
130042
|
2,
|
|
@@ -130018,13 +130047,13 @@ function _downloadPackage() {
|
|
|
130018
130047
|
4,
|
|
130019
130048
|
import_fs_extra.default.remove(targetDir)
|
|
130020
130049
|
];
|
|
130021
|
-
case
|
|
130050
|
+
case 7:
|
|
130022
130051
|
_state.sent();
|
|
130023
130052
|
return [
|
|
130024
130053
|
4,
|
|
130025
130054
|
import_fs_extra.default.mkdirp(targetDir)
|
|
130026
130055
|
];
|
|
130027
|
-
case
|
|
130056
|
+
case 8:
|
|
130028
130057
|
_state.sent();
|
|
130029
130058
|
return [
|
|
130030
130059
|
4,
|
|
@@ -130032,34 +130061,34 @@ function _downloadPackage() {
|
|
|
130032
130061
|
registryUrl
|
|
130033
130062
|
})
|
|
130034
130063
|
];
|
|
130035
|
-
case
|
|
130064
|
+
case 9:
|
|
130036
130065
|
tarballPkg = _state.sent();
|
|
130037
130066
|
return [
|
|
130038
130067
|
4,
|
|
130039
130068
|
downloadAndDecompressTargz(tarballPkg, targetDir)
|
|
130040
130069
|
];
|
|
130041
|
-
case
|
|
130070
|
+
case 10:
|
|
130042
130071
|
_state.sent();
|
|
130043
130072
|
if (!install)
|
|
130044
130073
|
return [
|
|
130045
130074
|
3,
|
|
130046
|
-
|
|
130075
|
+
12
|
|
130047
130076
|
];
|
|
130048
130077
|
return [
|
|
130049
130078
|
4,
|
|
130050
130079
|
runInstall(targetDir, registryUrl)
|
|
130051
130080
|
];
|
|
130052
|
-
case
|
|
130081
|
+
case 11:
|
|
130053
130082
|
_state.sent();
|
|
130054
|
-
_state.label =
|
|
130055
|
-
case
|
|
130083
|
+
_state.label = 12;
|
|
130084
|
+
case 12:
|
|
130056
130085
|
return [
|
|
130057
130086
|
4,
|
|
130058
130087
|
import_fs_extra.default.writeFile("".concat(targetDir, "/.codesmith.completed"), (/* @__PURE__ */ new Date()).toISOString(), {
|
|
130059
130088
|
encoding: "utf-8"
|
|
130060
130089
|
})
|
|
130061
130090
|
];
|
|
130062
|
-
case
|
|
130091
|
+
case 13:
|
|
130063
130092
|
_state.sent();
|
|
130064
130093
|
return [
|
|
130065
130094
|
2,
|
|
@@ -130071,7 +130100,7 @@ function _downloadPackage() {
|
|
|
130071
130100
|
return _downloadPackage.apply(this, arguments);
|
|
130072
130101
|
}
|
|
130073
130102
|
|
|
130074
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
130103
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/utils/getPackageInfo.js
|
|
130075
130104
|
function getPackageInfo(packageName) {
|
|
130076
130105
|
if (!packageName) {
|
|
130077
130106
|
throw new Error("package is not exisit");
|
|
@@ -130095,7 +130124,7 @@ function getPackageInfo(packageName) {
|
|
|
130095
130124
|
};
|
|
130096
130125
|
}
|
|
130097
130126
|
|
|
130098
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
130127
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/materials/index.js
|
|
130099
130128
|
function asyncGeneratorStep15(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130100
130129
|
try {
|
|
130101
130130
|
var info = gen[key](arg);
|
|
@@ -130320,7 +130349,7 @@ var MaterialsManager = /* @__PURE__ */ function() {
|
|
|
130320
130349
|
return MaterialsManager2;
|
|
130321
130350
|
}();
|
|
130322
130351
|
|
|
130323
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.
|
|
130352
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith/dist/esm/codesmith/index.js
|
|
130324
130353
|
function asyncGeneratorStep16(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130325
130354
|
try {
|
|
130326
130355
|
var info = gen[key](arg);
|
|
@@ -130631,7 +130660,7 @@ var CodeSmith = /* @__PURE__ */ function() {
|
|
|
130631
130660
|
return CodeSmith2;
|
|
130632
130661
|
}();
|
|
130633
130662
|
|
|
130634
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.2.
|
|
130663
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.2.5_@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith-api-handlebars/dist/esm/utils/renderString.js
|
|
130635
130664
|
var import_handlebars = __toESM(require_lib());
|
|
130636
130665
|
function _define_property10(obj, key, value) {
|
|
130637
130666
|
if (key in obj) {
|
|
@@ -130673,7 +130702,7 @@ function renderString(template, fullData, registers) {
|
|
|
130673
130702
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
130674
130703
|
}
|
|
130675
130704
|
|
|
130676
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.2.
|
|
130705
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.2.5_@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith-api-handlebars/dist/esm/index.js
|
|
130677
130706
|
function asyncGeneratorStep17(gen, resolve, reject, _next, _throw, key, arg) {
|
|
130678
130707
|
try {
|
|
130679
130708
|
var info = gen[key](arg);
|
|
@@ -130945,7 +130974,9 @@ var HandlebarsAPI = /* @__PURE__ */ function() {
|
|
|
130945
130974
|
case 0:
|
|
130946
130975
|
return [
|
|
130947
130976
|
4,
|
|
130948
|
-
material.find(findGlob,
|
|
130977
|
+
material.find(findGlob, _object_spread4({
|
|
130978
|
+
nodir: true
|
|
130979
|
+
}, options))
|
|
130949
130980
|
];
|
|
130950
130981
|
case 1:
|
|
130951
130982
|
resourceMap = _state.sent();
|
|
@@ -130991,13 +131022,13 @@ var HandlebarsAPI = /* @__PURE__ */ function() {
|
|
|
130991
131022
|
return HandlebarsAPI2;
|
|
130992
131023
|
}();
|
|
130993
131024
|
|
|
130994
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.2.
|
|
131025
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.2.5_@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith-api-ejs/dist/esm/utils/renderString.js
|
|
130995
131026
|
var import_ejs = __toESM(require_ejs());
|
|
130996
131027
|
function renderString2(template, fullData) {
|
|
130997
131028
|
return import_ejs.default.render(template, fullData) || "";
|
|
130998
131029
|
}
|
|
130999
131030
|
|
|
131000
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.2.
|
|
131031
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.2.5_@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith-api-ejs/dist/esm/index.js
|
|
131001
131032
|
function asyncGeneratorStep18(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131002
131033
|
try {
|
|
131003
131034
|
var info = gen[key](arg);
|
|
@@ -131062,6 +131093,21 @@ function _define_property12(obj, key, value) {
|
|
|
131062
131093
|
}
|
|
131063
131094
|
return obj;
|
|
131064
131095
|
}
|
|
131096
|
+
function _object_spread5(target) {
|
|
131097
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
131098
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
131099
|
+
var ownKeys7 = Object.keys(source);
|
|
131100
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
131101
|
+
ownKeys7 = ownKeys7.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
131102
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
131103
|
+
}));
|
|
131104
|
+
}
|
|
131105
|
+
ownKeys7.forEach(function(key) {
|
|
131106
|
+
_define_property12(target, key, source[key]);
|
|
131107
|
+
});
|
|
131108
|
+
}
|
|
131109
|
+
return target;
|
|
131110
|
+
}
|
|
131065
131111
|
var __generator18 = function(thisArg, body) {
|
|
131066
131112
|
var f, y, t, g, _ = {
|
|
131067
131113
|
label: 0,
|
|
@@ -131221,7 +131267,9 @@ var EjsAPI = /* @__PURE__ */ function() {
|
|
|
131221
131267
|
case 0:
|
|
131222
131268
|
return [
|
|
131223
131269
|
4,
|
|
131224
|
-
material.find(findGlob,
|
|
131270
|
+
material.find(findGlob, _object_spread5({
|
|
131271
|
+
nodir: true
|
|
131272
|
+
}, options))
|
|
131225
131273
|
];
|
|
131226
131274
|
case 1:
|
|
131227
131275
|
resourceMap = _state.sent();
|
|
@@ -131267,7 +131315,7 @@ var EjsAPI = /* @__PURE__ */ function() {
|
|
|
131267
131315
|
return EjsAPI2;
|
|
131268
131316
|
}();
|
|
131269
131317
|
|
|
131270
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.2.
|
|
131318
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.2.5_@modern-js+codesmith@2.2.5/node_modules/@modern-js/codesmith-api-fs/dist/esm/index.js
|
|
131271
131319
|
var import_path8 = __toESM(require("path"));
|
|
131272
131320
|
function asyncGeneratorStep19(gen, resolve, reject, _next, _throw, key, arg) {
|
|
131273
131321
|
try {
|
|
@@ -131333,6 +131381,21 @@ function _define_property13(obj, key, value) {
|
|
|
131333
131381
|
}
|
|
131334
131382
|
return obj;
|
|
131335
131383
|
}
|
|
131384
|
+
function _object_spread6(target) {
|
|
131385
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
131386
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
131387
|
+
var ownKeys7 = Object.keys(source);
|
|
131388
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
131389
|
+
ownKeys7 = ownKeys7.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
131390
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
131391
|
+
}));
|
|
131392
|
+
}
|
|
131393
|
+
ownKeys7.forEach(function(key) {
|
|
131394
|
+
_define_property13(target, key, source[key]);
|
|
131395
|
+
});
|
|
131396
|
+
}
|
|
131397
|
+
return target;
|
|
131398
|
+
}
|
|
131336
131399
|
var __generator19 = function(thisArg, body) {
|
|
131337
131400
|
var f, y, t, g, _ = {
|
|
131338
131401
|
label: 0,
|
|
@@ -131487,7 +131550,9 @@ var FsAPI = /* @__PURE__ */ function() {
|
|
|
131487
131550
|
case 0:
|
|
131488
131551
|
return [
|
|
131489
131552
|
4,
|
|
131490
|
-
material.find(findGlob,
|
|
131553
|
+
material.find(findGlob, _object_spread6({
|
|
131554
|
+
nodir: true
|
|
131555
|
+
}, options))
|
|
131491
131556
|
];
|
|
131492
131557
|
case 1:
|
|
131493
131558
|
resourceMap = _state.sent();
|
|
@@ -131530,7 +131595,7 @@ var FsAPI = /* @__PURE__ */ function() {
|
|
|
131530
131595
|
return FsAPI2;
|
|
131531
131596
|
}();
|
|
131532
131597
|
|
|
131533
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
131598
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/index.js
|
|
131534
131599
|
var import_lodash3 = __toESM(require_lodash3());
|
|
131535
131600
|
|
|
131536
131601
|
// ../../../../node_modules/.pnpm/@formily+shared@2.2.24/node_modules/@formily/shared/esm/checkers.js
|
|
@@ -141165,10 +141230,10 @@ var Schema = (
|
|
|
141165
141230
|
}()
|
|
141166
141231
|
);
|
|
141167
141232
|
|
|
141168
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
141233
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
|
|
141169
141234
|
var import_inquirer = __toESM(require_inquirer());
|
|
141170
141235
|
|
|
141171
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
141236
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/transform.js
|
|
141172
141237
|
var import_lodash2 = __toESM(require_lodash3());
|
|
141173
141238
|
function asyncGeneratorStep20(gen, resolve, reject, _next, _throw, key, arg) {
|
|
141174
141239
|
try {
|
|
@@ -141212,7 +141277,7 @@ function _define_property14(obj, key, value) {
|
|
|
141212
141277
|
}
|
|
141213
141278
|
return obj;
|
|
141214
141279
|
}
|
|
141215
|
-
function
|
|
141280
|
+
function _object_spread7(target) {
|
|
141216
141281
|
for (var i = 1; i < arguments.length; i++) {
|
|
141217
141282
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
141218
141283
|
var ownKeys22 = Object.keys(source);
|
|
@@ -141477,7 +141542,7 @@ function getQuestionFromSchema(schema) {
|
|
|
141477
141542
|
};
|
|
141478
141543
|
if (items) {
|
|
141479
141544
|
if ((0, import_lodash2.isArray)(defaultValue)) {
|
|
141480
|
-
return _object_spread_props3(
|
|
141545
|
+
return _object_spread_props3(_object_spread7({}, result), {
|
|
141481
141546
|
type: "checkbox",
|
|
141482
141547
|
choices: items.map(function(item) {
|
|
141483
141548
|
return {
|
|
@@ -141488,7 +141553,7 @@ function getQuestionFromSchema(schema) {
|
|
|
141488
141553
|
})
|
|
141489
141554
|
});
|
|
141490
141555
|
}
|
|
141491
|
-
return _object_spread_props3(
|
|
141556
|
+
return _object_spread_props3(_object_spread7({}, result), {
|
|
141492
141557
|
type: "list",
|
|
141493
141558
|
choices: items.map(function(item) {
|
|
141494
141559
|
return {
|
|
@@ -141500,11 +141565,11 @@ function getQuestionFromSchema(schema) {
|
|
|
141500
141565
|
});
|
|
141501
141566
|
}
|
|
141502
141567
|
if (type === "number") {
|
|
141503
|
-
return _object_spread_props3(
|
|
141568
|
+
return _object_spread_props3(_object_spread7({}, result), {
|
|
141504
141569
|
type: "number"
|
|
141505
141570
|
});
|
|
141506
141571
|
}
|
|
141507
|
-
return _object_spread_props3(
|
|
141572
|
+
return _object_spread_props3(_object_spread7({}, result), {
|
|
141508
141573
|
type: "input"
|
|
141509
141574
|
});
|
|
141510
141575
|
});
|
|
@@ -141515,7 +141580,7 @@ function transformForm(schema) {
|
|
|
141515
141580
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
141516
141581
|
}
|
|
141517
141582
|
|
|
141518
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
141583
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/prompt.js
|
|
141519
141584
|
function asyncGeneratorStep21(gen, resolve, reject, _next, _throw, key, arg) {
|
|
141520
141585
|
try {
|
|
141521
141586
|
var info = gen[key](arg);
|
|
@@ -141558,7 +141623,7 @@ function _define_property15(obj, key, value) {
|
|
|
141558
141623
|
}
|
|
141559
141624
|
return obj;
|
|
141560
141625
|
}
|
|
141561
|
-
function
|
|
141626
|
+
function _object_spread8(target) {
|
|
141562
141627
|
for (var i = 1; i < arguments.length; i++) {
|
|
141563
141628
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
141564
141629
|
var ownKeys22 = Object.keys(source);
|
|
@@ -141717,7 +141782,7 @@ var __values = function(o) {
|
|
|
141717
141782
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
141718
141783
|
};
|
|
141719
141784
|
var compileRule = function(rule, scope) {
|
|
141720
|
-
var state = Schema.compile(rule,
|
|
141785
|
+
var state = Schema.compile(rule, _object_spread8({
|
|
141721
141786
|
$self: {},
|
|
141722
141787
|
$values: {},
|
|
141723
141788
|
$target: {},
|
|
@@ -141775,7 +141840,7 @@ var handleXReactions = function() {
|
|
|
141775
141840
|
_state2.label = 2;
|
|
141776
141841
|
case 2:
|
|
141777
141842
|
scope = {
|
|
141778
|
-
$self: _object_spread_props4(
|
|
141843
|
+
$self: _object_spread_props4(_object_spread8({}, item), {
|
|
141779
141844
|
value: answer[item.name]
|
|
141780
141845
|
}),
|
|
141781
141846
|
$values: answers,
|
|
@@ -141829,7 +141894,7 @@ var handleXReactions = function() {
|
|
|
141829
141894
|
return answers[it2.name];
|
|
141830
141895
|
});
|
|
141831
141896
|
scope1 = {
|
|
141832
|
-
$self: _object_spread_props4(
|
|
141897
|
+
$self: _object_spread_props4(_object_spread8({}, item), {
|
|
141833
141898
|
value: answer[item.name]
|
|
141834
141899
|
}),
|
|
141835
141900
|
$values: answers,
|
|
@@ -141994,7 +142059,7 @@ function _prompt() {
|
|
|
141994
142059
|
answer = _state.sent();
|
|
141995
142060
|
_state.label = 7;
|
|
141996
142061
|
case 7:
|
|
141997
|
-
answers =
|
|
142062
|
+
answers = _object_spread8({}, answers, answer);
|
|
141998
142063
|
_state.label = 8;
|
|
141999
142064
|
case 8:
|
|
142000
142065
|
_iteratorNormalCompletion = true;
|
|
@@ -142039,7 +142104,7 @@ function _prompt() {
|
|
|
142039
142104
|
return _prompt.apply(this, arguments);
|
|
142040
142105
|
}
|
|
142041
142106
|
|
|
142042
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
142107
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/inquirer.js
|
|
142043
142108
|
function asyncGeneratorStep22(gen, resolve, reject, _next, _throw, key, arg) {
|
|
142044
142109
|
try {
|
|
142045
142110
|
var info = gen[key](arg);
|
|
@@ -142104,7 +142169,7 @@ function _define_property16(obj, key, value) {
|
|
|
142104
142169
|
}
|
|
142105
142170
|
return obj;
|
|
142106
142171
|
}
|
|
142107
|
-
function
|
|
142172
|
+
function _object_spread9(target) {
|
|
142108
142173
|
for (var i = 1; i < arguments.length; i++) {
|
|
142109
142174
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
142110
142175
|
var ownKeys7 = Object.keys(source);
|
|
@@ -142244,7 +142309,7 @@ var CLIReader = /* @__PURE__ */ function() {
|
|
|
142244
142309
|
{
|
|
142245
142310
|
key: "setAnswers",
|
|
142246
142311
|
value: function setAnswers(answers) {
|
|
142247
|
-
this.answers =
|
|
142312
|
+
this.answers = _object_spread9({}, this.answers, answers);
|
|
142248
142313
|
}
|
|
142249
142314
|
},
|
|
142250
142315
|
{
|
|
@@ -142279,7 +142344,7 @@ var CLIReader = /* @__PURE__ */ function() {
|
|
|
142279
142344
|
return CLIReader2;
|
|
142280
142345
|
}();
|
|
142281
142346
|
|
|
142282
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.
|
|
142347
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-formily/dist/esm/index.js
|
|
142283
142348
|
function asyncGeneratorStep23(gen, resolve, reject, _next, _throw, key, arg) {
|
|
142284
142349
|
try {
|
|
142285
142350
|
var info = gen[key](arg);
|
|
@@ -142497,7 +142562,7 @@ var FormilyAPI = /* @__PURE__ */ function() {
|
|
|
142497
142562
|
return FormilyAPI2;
|
|
142498
142563
|
}();
|
|
142499
142564
|
|
|
142500
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
142565
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
|
|
142501
142566
|
var import_inquirer3 = __toESM(require_inquirer2());
|
|
142502
142567
|
|
|
142503
142568
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.18.0/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -142576,7 +142641,7 @@ var I18n = class {
|
|
|
142576
142641
|
}
|
|
142577
142642
|
};
|
|
142578
142643
|
|
|
142579
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
142644
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/zh.js
|
|
142580
142645
|
var ZH_LOCALE = {
|
|
142581
142646
|
environment: {
|
|
142582
142647
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -142603,7 +142668,7 @@ var ZH_LOCALE = {
|
|
|
142603
142668
|
}
|
|
142604
142669
|
};
|
|
142605
142670
|
|
|
142606
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
142671
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/en.js
|
|
142607
142672
|
var EN_LOCALE = {
|
|
142608
142673
|
environment: {
|
|
142609
142674
|
node_version: "please upgrade node to lts version",
|
|
@@ -142630,14 +142695,14 @@ var EN_LOCALE = {
|
|
|
142630
142695
|
}
|
|
142631
142696
|
};
|
|
142632
142697
|
|
|
142633
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
142698
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/locale/index.js
|
|
142634
142699
|
var i18n = new I18n();
|
|
142635
142700
|
var localeKeys = i18n.init("zh", {
|
|
142636
142701
|
zh: ZH_LOCALE,
|
|
142637
142702
|
en: EN_LOCALE
|
|
142638
142703
|
});
|
|
142639
142704
|
|
|
142640
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
142705
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/transform.js
|
|
142641
142706
|
var import_lodash6 = __toESM(require_lodash3());
|
|
142642
142707
|
function asyncGeneratorStep24(gen, resolve, reject, _next, _throw, key, arg) {
|
|
142643
142708
|
try {
|
|
@@ -142846,7 +142911,7 @@ function transformInquirerSchema(questions) {
|
|
|
142846
142911
|
return questions;
|
|
142847
142912
|
}
|
|
142848
142913
|
|
|
142849
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
142914
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/utils/checkUseNvm.js
|
|
142850
142915
|
var import_path10 = __toESM(require("path"));
|
|
142851
142916
|
function asyncGeneratorStep25(gen, resolve, reject, _next, _throw, key, arg) {
|
|
142852
142917
|
try {
|
|
@@ -143110,7 +143175,7 @@ function _checkUseNvm() {
|
|
|
143110
143175
|
return _checkUseNvm.apply(this, arguments);
|
|
143111
143176
|
}
|
|
143112
143177
|
|
|
143113
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.
|
|
143178
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.2.5_g6gqsypbjnpqx7w2a6bm33mugi/node_modules/@modern-js/codesmith-api-app/dist/esm/index.js
|
|
143114
143179
|
function _array_like_to_array2(arr, len) {
|
|
143115
143180
|
if (len == null || len > arr.length)
|
|
143116
143181
|
len = arr.length;
|
|
@@ -143193,7 +143258,7 @@ function _iterable_to_array2(iter) {
|
|
|
143193
143258
|
function _non_iterable_spread2() {
|
|
143194
143259
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
143195
143260
|
}
|
|
143196
|
-
function
|
|
143261
|
+
function _object_spread10(target) {
|
|
143197
143262
|
for (var i = 1; i < arguments.length; i++) {
|
|
143198
143263
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
143199
143264
|
var ownKeys22 = Object.keys(source);
|
|
@@ -143471,15 +143536,15 @@ var AppAPI = /* @__PURE__ */ function() {
|
|
|
143471
143536
|
if (command) {
|
|
143472
143537
|
intallPromise = (0, import_execa.default)(command);
|
|
143473
143538
|
} else if (packageManager === "pnpm") {
|
|
143474
|
-
intallPromise = _this.npmApi.pnpmInstall(_object_spread_props5(
|
|
143539
|
+
intallPromise = _this.npmApi.pnpmInstall(_object_spread_props5(_object_spread10({}, options || {}), {
|
|
143475
143540
|
useNvm
|
|
143476
143541
|
}));
|
|
143477
143542
|
} else if (packageManager === "yarn") {
|
|
143478
|
-
intallPromise = _this.npmApi.yarnInstall(_object_spread_props5(
|
|
143543
|
+
intallPromise = _this.npmApi.yarnInstall(_object_spread_props5(_object_spread10({}, options || {}), {
|
|
143479
143544
|
useNvm
|
|
143480
143545
|
}));
|
|
143481
143546
|
} else {
|
|
143482
|
-
intallPromise = _this.npmApi.npmInstall(_object_spread_props5(
|
|
143547
|
+
intallPromise = _this.npmApi.npmInstall(_object_spread_props5(_object_spread10({}, options || {}), {
|
|
143483
143548
|
useNvm
|
|
143484
143549
|
}));
|
|
143485
143550
|
}
|
|
@@ -143694,7 +143759,7 @@ var AppAPI = /* @__PURE__ */ function() {
|
|
|
143694
143759
|
target = rename ? rename(resourceKey) : resourceKey.replace("templates/", "").replace(".handlebars", "").replace(".ejs", "");
|
|
143695
143760
|
return [
|
|
143696
143761
|
4,
|
|
143697
|
-
api.renderTemplate(material.get(resourceKey), target,
|
|
143762
|
+
api.renderTemplate(material.get(resourceKey), target, _object_spread10({}, _this.generatorContext.data || {}, parameters || {}))
|
|
143698
143763
|
];
|
|
143699
143764
|
case 1:
|
|
143700
143765
|
_state2.sent();
|
|
@@ -143780,7 +143845,7 @@ var AppAPI = /* @__PURE__ */ function() {
|
|
|
143780
143845
|
target = rename ? rename(resourceKey) : resourceKey.replace("templates/", "").replace(".handlebars", "");
|
|
143781
143846
|
return [
|
|
143782
143847
|
4,
|
|
143783
|
-
_this.handlebarsAPI.renderTemplate(material.get(resourceKey), target,
|
|
143848
|
+
_this.handlebarsAPI.renderTemplate(material.get(resourceKey), target, _object_spread10({}, _this.generatorContext.data || {}, parameters || {}))
|
|
143784
143849
|
];
|
|
143785
143850
|
case 1:
|
|
143786
143851
|
_state2.sent();
|
|
@@ -143797,7 +143862,7 @@ var AppAPI = /* @__PURE__ */ function() {
|
|
|
143797
143862
|
target1 = rename ? rename(resourceKey) : resourceKey.replace("templates/", "").replace(".ejs", "");
|
|
143798
143863
|
return [
|
|
143799
143864
|
4,
|
|
143800
|
-
_this.ejsAPI.renderTemplate(material.get(resourceKey), target1,
|
|
143865
|
+
_this.ejsAPI.renderTemplate(material.get(resourceKey), target1, _object_spread10({}, _this.generatorContext.data || {}, parameters || {}))
|
|
143801
143866
|
];
|
|
143802
143867
|
case 3:
|
|
143803
143868
|
_state2.sent();
|
|
@@ -145132,7 +145197,7 @@ function _create_class15(Constructor, protoProps, staticProps) {
|
|
|
145132
145197
|
}
|
|
145133
145198
|
|
|
145134
145199
|
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/esm/_object_spread.js
|
|
145135
|
-
function
|
|
145200
|
+
function _object_spread11(target) {
|
|
145136
145201
|
for (var i = 1; i < arguments.length; i++) {
|
|
145137
145202
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
145138
145203
|
var ownKeys7 = Object.keys(source);
|
|
@@ -145466,11 +145531,11 @@ var import_lodash15 = __toESM(require_lodash2());
|
|
|
145466
145531
|
// ../../generator-plugin/dist/esm/context/file.js
|
|
145467
145532
|
var import_path13 = __toESM(require("path"));
|
|
145468
145533
|
|
|
145469
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.2.
|
|
145534
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.2.5/node_modules/@modern-js/codesmith-api-json/dist/esm/index.js
|
|
145470
145535
|
var import_comment_json2 = __toESM(require_src2());
|
|
145471
145536
|
var declarationUpdate = __toESM(require_dist());
|
|
145472
145537
|
|
|
145473
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.2.
|
|
145538
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.2.5/node_modules/@modern-js/codesmith-api-json/dist/esm/utils/index.js
|
|
145474
145539
|
function asyncGeneratorStep28(gen, resolve, reject, _next, _throw, key, arg) {
|
|
145475
145540
|
try {
|
|
145476
145541
|
var info = gen[key](arg);
|
|
@@ -145644,7 +145709,7 @@ function _editJson() {
|
|
|
145644
145709
|
return _editJson.apply(this, arguments);
|
|
145645
145710
|
}
|
|
145646
145711
|
|
|
145647
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.2.
|
|
145712
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.2.5/node_modules/@modern-js/codesmith-api-json/dist/esm/index.js
|
|
145648
145713
|
function asyncGeneratorStep29(gen, resolve, reject, _next, _throw, key, arg) {
|
|
145649
145714
|
try {
|
|
145650
145715
|
var info = gen[key](arg);
|
|
@@ -146133,7 +146198,7 @@ function _addManyFiles() {
|
|
|
146133
146198
|
templateFile = _step.value;
|
|
146134
146199
|
absTemplatePath = import_path12.default.resolve(templatePath, templateFile);
|
|
146135
146200
|
targetFile = dropFileRootPath(templateFile, config.templateBase);
|
|
146136
|
-
fileCfg = _object_spread_props6(
|
|
146201
|
+
fileCfg = _object_spread_props6(_object_spread11({}, config), {
|
|
146137
146202
|
file: import_path12.default.join(config.destination, config.fileNameFunc ? config.fileNameFunc(targetFile) : targetFile),
|
|
146138
146203
|
templateFile: absTemplatePath,
|
|
146139
146204
|
force: true
|
|
@@ -146201,8 +146266,8 @@ var PluginHandlebarsAPI = /* @__PURE__ */ function() {
|
|
|
146201
146266
|
{
|
|
146202
146267
|
key: "renderString",
|
|
146203
146268
|
value: function renderString3(template, data) {
|
|
146204
|
-
var helpers =
|
|
146205
|
-
var partials =
|
|
146269
|
+
var helpers = _object_spread11({}, this.helpers);
|
|
146270
|
+
var partials = _object_spread11({}, this.partials);
|
|
146206
146271
|
Object.keys(helpers).forEach(function(h) {
|
|
146207
146272
|
return handlebars2.registerHelper(h, helpers[h]);
|
|
146208
146273
|
});
|
|
@@ -146377,7 +146442,7 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
|
146377
146442
|
_this.jsonAPI.update(fsMaterial.get(fileName), {
|
|
146378
146443
|
query: {},
|
|
146379
146444
|
update: {
|
|
146380
|
-
$set:
|
|
146445
|
+
$set: _object_spread11({}, updateInfo)
|
|
146381
146446
|
}
|
|
146382
146447
|
})
|
|
146383
146448
|
];
|
|
@@ -147300,7 +147365,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
|
147300
147365
|
return [
|
|
147301
147366
|
4,
|
|
147302
147367
|
MWANewAction({
|
|
147303
|
-
config: JSON.stringify(
|
|
147368
|
+
config: JSON.stringify(_object_spread11({
|
|
147304
147369
|
actionType: ActionType.Element,
|
|
147305
147370
|
element,
|
|
147306
147371
|
noNeedInstall: true
|
|
@@ -147339,7 +147404,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
|
147339
147404
|
return [
|
|
147340
147405
|
4,
|
|
147341
147406
|
MWANewAction({
|
|
147342
|
-
config: JSON.stringify(
|
|
147407
|
+
config: JSON.stringify(_object_spread11({
|
|
147343
147408
|
actionType: ActionType.Function,
|
|
147344
147409
|
function: func,
|
|
147345
147410
|
noNeedInstall: true
|
|
@@ -147364,7 +147429,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
|
147364
147429
|
return [
|
|
147365
147430
|
4,
|
|
147366
147431
|
ModuleNewAction({
|
|
147367
|
-
config: JSON.stringify(
|
|
147432
|
+
config: JSON.stringify(_object_spread11({
|
|
147368
147433
|
actionType: ActionType.Function,
|
|
147369
147434
|
function: func,
|
|
147370
147435
|
noNeedInstall: true
|
|
@@ -147400,7 +147465,7 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
|
147400
147465
|
return [
|
|
147401
147466
|
4,
|
|
147402
147467
|
MonorepoNewAction({
|
|
147403
|
-
config: JSON.stringify(
|
|
147468
|
+
config: JSON.stringify(_object_spread11({
|
|
147404
147469
|
solution,
|
|
147405
147470
|
noNeedInstall: true
|
|
147406
147471
|
}, _this.inputData, params)),
|
|
@@ -147453,7 +147518,7 @@ var PluginContext = /* @__PURE__ */ function() {
|
|
|
147453
147518
|
{
|
|
147454
147519
|
key: "context",
|
|
147455
147520
|
get: function get4() {
|
|
147456
|
-
return _object_spread_props6(
|
|
147521
|
+
return _object_spread_props6(_object_spread11({
|
|
147457
147522
|
locale: this.locale
|
|
147458
147523
|
}, this.inputContext.context, this.gitAPI.context, this.fileAPI.context), {
|
|
147459
147524
|
onForged: this.onForged.bind(this),
|
|
@@ -147464,13 +147529,13 @@ var PluginContext = /* @__PURE__ */ function() {
|
|
|
147464
147529
|
{
|
|
147465
147530
|
key: "forgedAPI",
|
|
147466
147531
|
get: function get4() {
|
|
147467
|
-
return
|
|
147532
|
+
return _object_spread11({}, this.fileAPI.method, this.newAPI.method);
|
|
147468
147533
|
}
|
|
147469
147534
|
},
|
|
147470
147535
|
{
|
|
147471
147536
|
key: "afterForgedAPI",
|
|
147472
147537
|
get: function get4() {
|
|
147473
|
-
return
|
|
147538
|
+
return _object_spread11({}, this.gitAPI.method, this.npmAPI.method);
|
|
147474
147539
|
}
|
|
147475
147540
|
},
|
|
147476
147541
|
{
|
|
@@ -147753,7 +147818,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
|
147753
147818
|
]);
|
|
147754
147819
|
} else if (meta.type && meta.key) {
|
|
147755
147820
|
_this.customPlugin[meta.type] = _to_consumable_array3(_this.customPlugin[meta.type] || []).concat([
|
|
147756
|
-
_object_spread_props6(
|
|
147821
|
+
_object_spread_props6(_object_spread11({}, meta), {
|
|
147757
147822
|
plugin
|
|
147758
147823
|
})
|
|
147759
147824
|
]);
|
|
@@ -147787,7 +147852,7 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
|
147787
147852
|
try {
|
|
147788
147853
|
for (var _iterator = this.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
147789
147854
|
var info = _step.value;
|
|
147790
|
-
properties =
|
|
147855
|
+
properties = _object_spread11({}, properties, info.context.inputContext.getFinalInputs());
|
|
147791
147856
|
}
|
|
147792
147857
|
} catch (err) {
|
|
147793
147858
|
_didIteratorError = true;
|
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-1685534893515",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -23,23 +23,23 @@
|
|
|
23
23
|
"/dist/index.js"
|
|
24
24
|
],
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@modern-js/codesmith": "2.2.
|
|
27
|
-
"@modern-js/codesmith-api-app": "2.2.
|
|
26
|
+
"@modern-js/codesmith": "2.2.5",
|
|
27
|
+
"@modern-js/codesmith-api-app": "2.2.5",
|
|
28
28
|
"@types/jest": "^29",
|
|
29
29
|
"@types/node": "^14",
|
|
30
30
|
"jest": "^29",
|
|
31
31
|
"typescript": "^5",
|
|
32
|
-
"@modern-js/base-generator": "0.0.0-next-
|
|
33
|
-
"@modern-js/generator-common": "0.0.0-next-
|
|
34
|
-
"@modern-js/generator-plugin": "0.0.0-next-
|
|
35
|
-
"@modern-js/generator-utils": "0.0.0-next-
|
|
36
|
-
"@modern-js/module-generator": "0.0.0-next-
|
|
37
|
-
"@modern-js/monorepo-generator": "0.0.0-next-
|
|
38
|
-
"@modern-js/mwa-generator": "0.0.0-next-
|
|
39
|
-
"@modern-js/doc-generator": "0.0.0-next-
|
|
40
|
-
"@modern-js/utils": "0.0.0-next-
|
|
41
|
-
"@scripts/build": "0.0.0-next-
|
|
42
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
32
|
+
"@modern-js/base-generator": "0.0.0-next-1685534893515",
|
|
33
|
+
"@modern-js/generator-common": "0.0.0-next-1685534893515",
|
|
34
|
+
"@modern-js/generator-plugin": "0.0.0-next-1685534893515",
|
|
35
|
+
"@modern-js/generator-utils": "0.0.0-next-1685534893515",
|
|
36
|
+
"@modern-js/module-generator": "0.0.0-next-1685534893515",
|
|
37
|
+
"@modern-js/monorepo-generator": "0.0.0-next-1685534893515",
|
|
38
|
+
"@modern-js/mwa-generator": "0.0.0-next-1685534893515",
|
|
39
|
+
"@modern-js/doc-generator": "0.0.0-next-1685534893515",
|
|
40
|
+
"@modern-js/utils": "0.0.0-next-1685534893515",
|
|
41
|
+
"@scripts/build": "0.0.0-next-1685534893515",
|
|
42
|
+
"@scripts/jest-config": "0.0.0-next-1685534893515"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"publishConfig": {
|