@modern-js/create 2.65.1 → 2.65.2
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 +195 -53
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -2915,9 +2915,9 @@ var require_commander = __commonJS({
|
|
|
2915
2915
|
}
|
|
2916
2916
|
});
|
|
2917
2917
|
|
|
2918
|
-
// ../../../node_modules/.pnpm/universalify@2.0.
|
|
2918
|
+
// ../../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
|
|
2919
2919
|
var require_universalify = __commonJS({
|
|
2920
|
-
"../../../node_modules/.pnpm/universalify@2.0.
|
|
2920
|
+
"../../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
|
|
2921
2921
|
"use strict";
|
|
2922
2922
|
exports.fromCallback = function(fn) {
|
|
2923
2923
|
return Object.defineProperty(function(...args) {
|
|
@@ -2925,11 +2925,8 @@ var require_universalify = __commonJS({
|
|
|
2925
2925
|
fn.apply(this, args);
|
|
2926
2926
|
else {
|
|
2927
2927
|
return new Promise((resolve, reject) => {
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
...args,
|
|
2931
|
-
(err, res) => err != null ? reject(err) : resolve(res)
|
|
2932
|
-
);
|
|
2928
|
+
args.push((err, res) => err != null ? reject(err) : resolve(res));
|
|
2929
|
+
fn.apply(this, args);
|
|
2933
2930
|
});
|
|
2934
2931
|
}
|
|
2935
2932
|
}, "name", { value: fn.name });
|
|
@@ -2939,8 +2936,10 @@ var require_universalify = __commonJS({
|
|
|
2939
2936
|
const cb = args[args.length - 1];
|
|
2940
2937
|
if (typeof cb !== "function")
|
|
2941
2938
|
return fn.apply(this, args);
|
|
2942
|
-
else
|
|
2943
|
-
|
|
2939
|
+
else {
|
|
2940
|
+
args.pop();
|
|
2941
|
+
fn.apply(this, args).then((r) => cb(null, r), cb);
|
|
2942
|
+
}
|
|
2944
2943
|
}, "name", { value: fn.name });
|
|
2945
2944
|
};
|
|
2946
2945
|
}
|
|
@@ -5162,6 +5161,37 @@ var require_ensure = __commonJS({
|
|
|
5162
5161
|
}
|
|
5163
5162
|
});
|
|
5164
5163
|
|
|
5164
|
+
// ../../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
|
|
5165
|
+
var require_universalify2 = __commonJS({
|
|
5166
|
+
"../../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
|
|
5167
|
+
"use strict";
|
|
5168
|
+
exports.fromCallback = function(fn) {
|
|
5169
|
+
return Object.defineProperty(function(...args) {
|
|
5170
|
+
if (typeof args[args.length - 1] === "function")
|
|
5171
|
+
fn.apply(this, args);
|
|
5172
|
+
else {
|
|
5173
|
+
return new Promise((resolve, reject) => {
|
|
5174
|
+
fn.call(
|
|
5175
|
+
this,
|
|
5176
|
+
...args,
|
|
5177
|
+
(err, res) => err != null ? reject(err) : resolve(res)
|
|
5178
|
+
);
|
|
5179
|
+
});
|
|
5180
|
+
}
|
|
5181
|
+
}, "name", { value: fn.name });
|
|
5182
|
+
};
|
|
5183
|
+
exports.fromPromise = function(fn) {
|
|
5184
|
+
return Object.defineProperty(function(...args) {
|
|
5185
|
+
const cb = args[args.length - 1];
|
|
5186
|
+
if (typeof cb !== "function")
|
|
5187
|
+
return fn.apply(this, args);
|
|
5188
|
+
else
|
|
5189
|
+
fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb);
|
|
5190
|
+
}, "name", { value: fn.name });
|
|
5191
|
+
};
|
|
5192
|
+
}
|
|
5193
|
+
});
|
|
5194
|
+
|
|
5165
5195
|
// ../../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
|
|
5166
5196
|
var require_utils2 = __commonJS({
|
|
5167
5197
|
"../../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module2) {
|
|
@@ -5190,7 +5220,7 @@ var require_jsonfile = __commonJS({
|
|
|
5190
5220
|
} catch (_) {
|
|
5191
5221
|
_fs = require("fs");
|
|
5192
5222
|
}
|
|
5193
|
-
var universalify =
|
|
5223
|
+
var universalify = require_universalify2();
|
|
5194
5224
|
var { stringify, stripBom } = require_utils2();
|
|
5195
5225
|
function _readFile(_0) {
|
|
5196
5226
|
return __async(this, arguments, function* (file, options = {}) {
|
|
@@ -18462,9 +18492,9 @@ var require_ms = __commonJS({
|
|
|
18462
18492
|
}
|
|
18463
18493
|
});
|
|
18464
18494
|
|
|
18465
|
-
// ../../../node_modules/.pnpm/debug@4.3.
|
|
18495
|
+
// ../../../node_modules/.pnpm/debug@4.3.7_supports-color@5.5.0/node_modules/debug/src/common.js
|
|
18466
18496
|
var require_common = __commonJS({
|
|
18467
|
-
"../../../node_modules/.pnpm/debug@4.3.
|
|
18497
|
+
"../../../node_modules/.pnpm/debug@4.3.7_supports-color@5.5.0/node_modules/debug/src/common.js"(exports, module2) {
|
|
18468
18498
|
"use strict";
|
|
18469
18499
|
function setup(env) {
|
|
18470
18500
|
createDebug.debug = createDebug;
|
|
@@ -18626,9 +18656,9 @@ var require_common = __commonJS({
|
|
|
18626
18656
|
}
|
|
18627
18657
|
});
|
|
18628
18658
|
|
|
18629
|
-
// ../../../node_modules/.pnpm/debug@4.3.
|
|
18659
|
+
// ../../../node_modules/.pnpm/debug@4.3.7_supports-color@5.5.0/node_modules/debug/src/browser.js
|
|
18630
18660
|
var require_browser = __commonJS({
|
|
18631
|
-
"../../../node_modules/.pnpm/debug@4.3.
|
|
18661
|
+
"../../../node_modules/.pnpm/debug@4.3.7_supports-color@5.5.0/node_modules/debug/src/browser.js"(exports, module2) {
|
|
18632
18662
|
"use strict";
|
|
18633
18663
|
exports.formatArgs = formatArgs;
|
|
18634
18664
|
exports.save = save;
|
|
@@ -18797,9 +18827,118 @@ var require_browser = __commonJS({
|
|
|
18797
18827
|
}
|
|
18798
18828
|
});
|
|
18799
18829
|
|
|
18800
|
-
// ../../../node_modules/.pnpm/
|
|
18830
|
+
// ../../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
|
|
18831
|
+
var require_has_flag2 = __commonJS({
|
|
18832
|
+
"../../../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports, module2) {
|
|
18833
|
+
"use strict";
|
|
18834
|
+
module2.exports = (flag, argv) => {
|
|
18835
|
+
argv = argv || process.argv;
|
|
18836
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
18837
|
+
const pos = argv.indexOf(prefix + flag);
|
|
18838
|
+
const terminatorPos = argv.indexOf("--");
|
|
18839
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
18840
|
+
};
|
|
18841
|
+
}
|
|
18842
|
+
});
|
|
18843
|
+
|
|
18844
|
+
// ../../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
|
|
18845
|
+
var require_supports_color2 = __commonJS({
|
|
18846
|
+
"../../../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports, module2) {
|
|
18847
|
+
"use strict";
|
|
18848
|
+
var os3 = require("os");
|
|
18849
|
+
var hasFlag = require_has_flag2();
|
|
18850
|
+
var env = process.env;
|
|
18851
|
+
var forceColor;
|
|
18852
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
18853
|
+
forceColor = false;
|
|
18854
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
18855
|
+
forceColor = true;
|
|
18856
|
+
}
|
|
18857
|
+
if ("FORCE_COLOR" in env) {
|
|
18858
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
18859
|
+
}
|
|
18860
|
+
function translateLevel(level) {
|
|
18861
|
+
if (level === 0) {
|
|
18862
|
+
return false;
|
|
18863
|
+
}
|
|
18864
|
+
return {
|
|
18865
|
+
level,
|
|
18866
|
+
hasBasic: true,
|
|
18867
|
+
has256: level >= 2,
|
|
18868
|
+
has16m: level >= 3
|
|
18869
|
+
};
|
|
18870
|
+
}
|
|
18871
|
+
function supportsColor(stream4) {
|
|
18872
|
+
if (forceColor === false) {
|
|
18873
|
+
return 0;
|
|
18874
|
+
}
|
|
18875
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
18876
|
+
return 3;
|
|
18877
|
+
}
|
|
18878
|
+
if (hasFlag("color=256")) {
|
|
18879
|
+
return 2;
|
|
18880
|
+
}
|
|
18881
|
+
if (stream4 && !stream4.isTTY && forceColor !== true) {
|
|
18882
|
+
return 0;
|
|
18883
|
+
}
|
|
18884
|
+
const min = forceColor ? 1 : 0;
|
|
18885
|
+
if (process.platform === "win32") {
|
|
18886
|
+
const osRelease = os3.release().split(".");
|
|
18887
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
18888
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
18889
|
+
}
|
|
18890
|
+
return 1;
|
|
18891
|
+
}
|
|
18892
|
+
if ("CI" in env) {
|
|
18893
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
18894
|
+
return 1;
|
|
18895
|
+
}
|
|
18896
|
+
return min;
|
|
18897
|
+
}
|
|
18898
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
18899
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
18900
|
+
}
|
|
18901
|
+
if (env.COLORTERM === "truecolor") {
|
|
18902
|
+
return 3;
|
|
18903
|
+
}
|
|
18904
|
+
if ("TERM_PROGRAM" in env) {
|
|
18905
|
+
const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
18906
|
+
switch (env.TERM_PROGRAM) {
|
|
18907
|
+
case "iTerm.app":
|
|
18908
|
+
return version2 >= 3 ? 3 : 2;
|
|
18909
|
+
case "Apple_Terminal":
|
|
18910
|
+
return 2;
|
|
18911
|
+
}
|
|
18912
|
+
}
|
|
18913
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
18914
|
+
return 2;
|
|
18915
|
+
}
|
|
18916
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
18917
|
+
return 1;
|
|
18918
|
+
}
|
|
18919
|
+
if ("COLORTERM" in env) {
|
|
18920
|
+
return 1;
|
|
18921
|
+
}
|
|
18922
|
+
if (env.TERM === "dumb") {
|
|
18923
|
+
return min;
|
|
18924
|
+
}
|
|
18925
|
+
return min;
|
|
18926
|
+
}
|
|
18927
|
+
function getSupportLevel(stream4) {
|
|
18928
|
+
const level = supportsColor(stream4);
|
|
18929
|
+
return translateLevel(level);
|
|
18930
|
+
}
|
|
18931
|
+
module2.exports = {
|
|
18932
|
+
supportsColor: getSupportLevel,
|
|
18933
|
+
stdout: getSupportLevel(process.stdout),
|
|
18934
|
+
stderr: getSupportLevel(process.stderr)
|
|
18935
|
+
};
|
|
18936
|
+
}
|
|
18937
|
+
});
|
|
18938
|
+
|
|
18939
|
+
// ../../../node_modules/.pnpm/debug@4.3.7_supports-color@5.5.0/node_modules/debug/src/node.js
|
|
18801
18940
|
var require_node2 = __commonJS({
|
|
18802
|
-
"../../../node_modules/.pnpm/debug@4.3.
|
|
18941
|
+
"../../../node_modules/.pnpm/debug@4.3.7_supports-color@5.5.0/node_modules/debug/src/node.js"(exports, module2) {
|
|
18803
18942
|
"use strict";
|
|
18804
18943
|
var tty = require("tty");
|
|
18805
18944
|
var util3 = require("util");
|
|
@@ -18816,7 +18955,7 @@ var require_node2 = __commonJS({
|
|
|
18816
18955
|
);
|
|
18817
18956
|
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
18818
18957
|
try {
|
|
18819
|
-
const supportsColor =
|
|
18958
|
+
const supportsColor = require_supports_color2();
|
|
18820
18959
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
18821
18960
|
exports.colors = [
|
|
18822
18961
|
20,
|
|
@@ -18972,9 +19111,9 @@ var require_node2 = __commonJS({
|
|
|
18972
19111
|
}
|
|
18973
19112
|
});
|
|
18974
19113
|
|
|
18975
|
-
// ../../../node_modules/.pnpm/debug@4.3.
|
|
19114
|
+
// ../../../node_modules/.pnpm/debug@4.3.7_supports-color@5.5.0/node_modules/debug/src/index.js
|
|
18976
19115
|
var require_src = __commonJS({
|
|
18977
|
-
"../../../node_modules/.pnpm/debug@4.3.
|
|
19116
|
+
"../../../node_modules/.pnpm/debug@4.3.7_supports-color@5.5.0/node_modules/debug/src/index.js"(exports, module2) {
|
|
18978
19117
|
"use strict";
|
|
18979
19118
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
18980
19119
|
module2.exports = require_browser();
|
|
@@ -41390,10 +41529,10 @@ var {
|
|
|
41390
41529
|
var import_os = __toESM(require("os"));
|
|
41391
41530
|
var import_path = __toESM(require("path"));
|
|
41392
41531
|
|
|
41393
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
41532
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/fs-extra.js
|
|
41394
41533
|
var import_fs_extra = __toESM(require_lib());
|
|
41395
41534
|
|
|
41396
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
41535
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/ora.js
|
|
41397
41536
|
var import_ora = __toESM(require_ora());
|
|
41398
41537
|
|
|
41399
41538
|
// ../../cli/plugin-i18n/dist/esm-node/index.js
|
|
@@ -41534,7 +41673,7 @@ function cleanCacheAction() {
|
|
|
41534
41673
|
// src/createAction.ts
|
|
41535
41674
|
var import_path10 = __toESM(require("path"));
|
|
41536
41675
|
|
|
41537
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41676
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
|
|
41538
41677
|
var LoggerLevel;
|
|
41539
41678
|
(function(LoggerLevel2) {
|
|
41540
41679
|
LoggerLevel2["Error"] = "error";
|
|
@@ -41546,10 +41685,10 @@ var LoggerLevel;
|
|
|
41546
41685
|
LoggerLevel2["Timing"] = "timing";
|
|
41547
41686
|
})(LoggerLevel || (LoggerLevel = {}));
|
|
41548
41687
|
|
|
41549
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
41688
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/chalk.js
|
|
41550
41689
|
var import_chalk = __toESM(require_source());
|
|
41551
41690
|
|
|
41552
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41691
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
|
|
41553
41692
|
var import_debug = __toESM(require_src());
|
|
41554
41693
|
var Logger = class {
|
|
41555
41694
|
info(...meta) {
|
|
@@ -41607,23 +41746,23 @@ var Logger = class {
|
|
|
41607
41746
|
}
|
|
41608
41747
|
};
|
|
41609
41748
|
|
|
41610
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41749
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
|
41611
41750
|
var import_path8 = __toESM(require("path"));
|
|
41612
41751
|
|
|
41613
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41752
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
|
41614
41753
|
var import_events2 = require("events");
|
|
41615
41754
|
var import_path6 = __toESM(require("path"));
|
|
41616
41755
|
|
|
41617
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41756
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
|
41618
41757
|
var import_path3 = __toESM(require("path"));
|
|
41619
41758
|
|
|
41620
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
41759
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/glob.js
|
|
41621
41760
|
var import_glob = __toESM(require_glob());
|
|
41622
41761
|
|
|
41623
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41762
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
41624
41763
|
var import_path2 = __toESM(require("path"));
|
|
41625
41764
|
|
|
41626
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41765
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
|
|
41627
41766
|
var IMAGE_EXT_LIST = [
|
|
41628
41767
|
".jpg",
|
|
41629
41768
|
".jpeg",
|
|
@@ -41637,7 +41776,7 @@ var IMAGE_EXT_LIST = [
|
|
|
41637
41776
|
".wmf"
|
|
41638
41777
|
];
|
|
41639
41778
|
|
|
41640
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41779
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
41641
41780
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
41642
41781
|
var FsResource = class {
|
|
41643
41782
|
value() {
|
|
@@ -41662,7 +41801,7 @@ var FsResource = class {
|
|
|
41662
41801
|
}
|
|
41663
41802
|
};
|
|
41664
41803
|
|
|
41665
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41804
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
|
41666
41805
|
var promisifyGlob = (pattern, options) => new Promise((resolve, reject) => {
|
|
41667
41806
|
(0, import_glob.default)(pattern, options, (err, files) => err === null ? resolve(files) : reject(err));
|
|
41668
41807
|
});
|
|
@@ -41689,7 +41828,7 @@ var FsMaterial = class {
|
|
|
41689
41828
|
}
|
|
41690
41829
|
};
|
|
41691
41830
|
|
|
41692
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41831
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
41693
41832
|
function fsExists(path11) {
|
|
41694
41833
|
return __async(this, null, function* () {
|
|
41695
41834
|
try {
|
|
@@ -41701,7 +41840,7 @@ function fsExists(path11) {
|
|
|
41701
41840
|
});
|
|
41702
41841
|
}
|
|
41703
41842
|
|
|
41704
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41843
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
|
|
41705
41844
|
var nodeRequire = (path11) => {
|
|
41706
41845
|
try {
|
|
41707
41846
|
const module2 = __non_webpack_require__(path11);
|
|
@@ -41718,13 +41857,13 @@ var nodeRequire = (path11) => {
|
|
|
41718
41857
|
}
|
|
41719
41858
|
};
|
|
41720
41859
|
|
|
41721
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41860
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
|
|
41722
41861
|
var import_path4 = __toESM(require("path"));
|
|
41723
41862
|
|
|
41724
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
41863
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/execa.js
|
|
41725
41864
|
var import_execa = __toESM(require_execa());
|
|
41726
41865
|
|
|
41727
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41866
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
|
|
41728
41867
|
function canUseYarn() {
|
|
41729
41868
|
return __async(this, null, function* () {
|
|
41730
41869
|
try {
|
|
@@ -41808,7 +41947,7 @@ function runInstall(targetDir, registryUrl, logger) {
|
|
|
41808
41947
|
});
|
|
41809
41948
|
}
|
|
41810
41949
|
|
|
41811
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41950
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
|
|
41812
41951
|
function timeoutPromise(promise, ms, reason = "Operation") {
|
|
41813
41952
|
return __async(this, null, function* () {
|
|
41814
41953
|
let timeoutId = null;
|
|
@@ -41832,14 +41971,14 @@ function timeoutPromise(promise, ms, reason = "Operation") {
|
|
|
41832
41971
|
});
|
|
41833
41972
|
}
|
|
41834
41973
|
|
|
41835
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41974
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
|
41836
41975
|
var import_os2 = __toESM(require("os"));
|
|
41837
41976
|
|
|
41838
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
41977
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
|
|
41839
41978
|
var NPM_API_TIMEOUT = 3e4;
|
|
41840
41979
|
var CATCHE_VALIDITY_PREIOD = 7 * 24 * 3600 * 1e3;
|
|
41841
41980
|
|
|
41842
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.
|
|
41981
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith-utils@2.6.6/node_modules/@modern-js/codesmith-utils/dist/esm/semver.js
|
|
41843
41982
|
var import_semver = __toESM(require_semver2());
|
|
41844
41983
|
|
|
41845
41984
|
// ../../../node_modules/.pnpm/axios@1.7.9_debug@4.3.7/node_modules/axios/lib/helpers/bind.js
|
|
@@ -45169,10 +45308,10 @@ var {
|
|
|
45169
45308
|
mergeConfig: mergeConfig2
|
|
45170
45309
|
} = axios_default;
|
|
45171
45310
|
|
|
45172
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
45311
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
|
45173
45312
|
var import_tar = __toESM(require_tar());
|
|
45174
45313
|
|
|
45175
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
45314
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmRegistry.js
|
|
45176
45315
|
function getNpmRegistry() {
|
|
45177
45316
|
return __async(this, null, function* () {
|
|
45178
45317
|
const { stdout } = yield (0, import_execa.default)("npm", [
|
|
@@ -45184,7 +45323,7 @@ function getNpmRegistry() {
|
|
|
45184
45323
|
});
|
|
45185
45324
|
}
|
|
45186
45325
|
|
|
45187
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
45326
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmPackageInfo.js
|
|
45188
45327
|
var NpmPackageInfoCache = /* @__PURE__ */ new Map();
|
|
45189
45328
|
function getNpmPackageInfoWithCommand(pkgName, pkgVersion, options) {
|
|
45190
45329
|
return __async(this, null, function* () {
|
|
@@ -45222,6 +45361,9 @@ function getNpmPackageInfo(pkgName, pkgVersion, options) {
|
|
|
45222
45361
|
let response;
|
|
45223
45362
|
try {
|
|
45224
45363
|
response = (yield timeoutPromise(axios_default.get(url2), NPM_API_TIMEOUT, `Get npm package info of '${pkgName}'`)).data;
|
|
45364
|
+
if (!response.version) {
|
|
45365
|
+
response = yield getNpmPackageInfoWithCommand(pkgName, pkgVersion, options);
|
|
45366
|
+
}
|
|
45225
45367
|
} catch (e) {
|
|
45226
45368
|
logger === null || logger === void 0 ? void 0 : logger.error(e);
|
|
45227
45369
|
response = yield getNpmPackageInfoWithCommand(pkgName, pkgVersion, options);
|
|
@@ -45232,7 +45374,7 @@ function getNpmPackageInfo(pkgName, pkgVersion, options) {
|
|
|
45232
45374
|
});
|
|
45233
45375
|
}
|
|
45234
45376
|
|
|
45235
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
45377
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
|
|
45236
45378
|
function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
45237
45379
|
return __async(this, null, function* () {
|
|
45238
45380
|
const packageInfo = yield getNpmPackageInfo(pkgName, pkgVersion, options);
|
|
@@ -45240,7 +45382,7 @@ function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
|
45240
45382
|
});
|
|
45241
45383
|
}
|
|
45242
45384
|
|
|
45243
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
45385
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
|
|
45244
45386
|
function getNpmVersion(packageName, options) {
|
|
45245
45387
|
return __async(this, null, function* () {
|
|
45246
45388
|
const { version: version2 = "latest" } = options || {};
|
|
@@ -45249,7 +45391,7 @@ function getNpmVersion(packageName, options) {
|
|
|
45249
45391
|
});
|
|
45250
45392
|
}
|
|
45251
45393
|
|
|
45252
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
45394
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
|
45253
45395
|
var GeneratorVersionMap = /* @__PURE__ */ new Map();
|
|
45254
45396
|
function getGeneratorVersion(_0) {
|
|
45255
45397
|
return __async(this, arguments, function* (pkgName, pkgVersion = "latest", options = {}) {
|
|
@@ -45385,7 +45527,7 @@ function downloadPackage(_0) {
|
|
|
45385
45527
|
});
|
|
45386
45528
|
}
|
|
45387
45529
|
|
|
45388
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
45530
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
|
|
45389
45531
|
function getPackageInfo(packageName) {
|
|
45390
45532
|
if (!packageName) {
|
|
45391
45533
|
throw new Error("package is not exisit");
|
|
@@ -45409,7 +45551,7 @@ function getPackageInfo(packageName) {
|
|
|
45409
45551
|
};
|
|
45410
45552
|
}
|
|
45411
45553
|
|
|
45412
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
45554
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
|
45413
45555
|
var import_path5 = __toESM(require("path"));
|
|
45414
45556
|
var MaxTimes = 5;
|
|
45415
45557
|
function getGeneratorDir(generator) {
|
|
@@ -45431,7 +45573,7 @@ function getGeneratorDir(generator) {
|
|
|
45431
45573
|
});
|
|
45432
45574
|
}
|
|
45433
45575
|
|
|
45434
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
45576
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
|
45435
45577
|
var GeneratorCore = class {
|
|
45436
45578
|
get lifeCycleMethod() {
|
|
45437
45579
|
return {
|
|
@@ -45647,7 +45789,7 @@ check path: ${import_chalk.default.blue.underline(generator)} exist a package.js
|
|
|
45647
45789
|
}
|
|
45648
45790
|
};
|
|
45649
45791
|
|
|
45650
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
45792
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
|
45651
45793
|
var import_path7 = __toESM(require("path"));
|
|
45652
45794
|
var MaterialsManager = class {
|
|
45653
45795
|
loadLocalGenerator(generator) {
|
|
@@ -45713,7 +45855,7 @@ var MaterialsManager = class {
|
|
|
45713
45855
|
}
|
|
45714
45856
|
};
|
|
45715
45857
|
|
|
45716
|
-
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.
|
|
45858
|
+
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.6.6/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
|
45717
45859
|
var CodeSmith = class {
|
|
45718
45860
|
forge(_0) {
|
|
45719
45861
|
return __async(this, arguments, function* ({ tasks, pwd }) {
|
|
@@ -45773,7 +45915,7 @@ var CodeSmith = class {
|
|
|
45773
45915
|
};
|
|
45774
45916
|
|
|
45775
45917
|
// package.json
|
|
45776
|
-
var version = "2.65.
|
|
45918
|
+
var version = "2.65.2";
|
|
45777
45919
|
|
|
45778
45920
|
// src/utils/index.ts
|
|
45779
45921
|
var import_path9 = __toESM(require("path"));
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.65.
|
|
18
|
+
"version": "2.65.2",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/index.js",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@modern-js/codesmith": "2.6.
|
|
41
|
-
"@modern-js/codesmith-utils": "2.6.
|
|
40
|
+
"@modern-js/codesmith": "2.6.6",
|
|
41
|
+
"@modern-js/codesmith-utils": "2.6.6",
|
|
42
42
|
"@types/jest": "^29",
|
|
43
43
|
"@types/node": "^14",
|
|
44
44
|
"commander": "10.0.1",
|
|
45
45
|
"jest": "^29",
|
|
46
46
|
"ts-node": "^10.9.1",
|
|
47
47
|
"typescript": "^5",
|
|
48
|
-
"@modern-js/mwa-generator": "3.7.
|
|
49
|
-
"@modern-js/plugin-i18n": "2.65.
|
|
50
|
-
"@scripts/build": "2.65.
|
|
51
|
-
"@scripts/jest-config": "2.65.
|
|
48
|
+
"@modern-js/mwa-generator": "3.7.20",
|
|
49
|
+
"@modern-js/plugin-i18n": "2.65.2",
|
|
50
|
+
"@scripts/build": "2.65.2",
|
|
51
|
+
"@scripts/jest-config": "2.65.2"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"registry": "https://registry.npmjs.org/",
|