@modern-js/ssg-generator 3.0.4 → 3.0.6
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/README.md +14 -18
- package/dist/index.js +211 -202
- package/package.json +8 -8
- package/src/index.ts +98 -0
package/dist/index.js
CHANGED
@@ -13020,7 +13020,7 @@ var require_execa = __commonJS({
|
|
13020
13020
|
}
|
13021
13021
|
return t3;
|
13022
13022
|
};
|
13023
|
-
const
|
13023
|
+
const execa3 = (e3, t3, n3) => {
|
13024
13024
|
const r2 = handleArguments(e3, t3, n3);
|
13025
13025
|
const s2 = w(e3, t3);
|
13026
13026
|
const i2 = I(e3, t3);
|
@@ -13058,7 +13058,7 @@ var require_execa = __commonJS({
|
|
13058
13058
|
a2.all = y(a2, r2.options);
|
13059
13059
|
return S(a2, C);
|
13060
13060
|
};
|
13061
|
-
e2.exports =
|
13061
|
+
e2.exports = execa3;
|
13062
13062
|
e2.exports.sync = (e3, t3, n3) => {
|
13063
13063
|
const r2 = handleArguments(e3, t3, n3);
|
13064
13064
|
const s2 = w(e3, t3);
|
@@ -13083,11 +13083,11 @@ var require_execa = __commonJS({
|
|
13083
13083
|
};
|
13084
13084
|
e2.exports.command = (e3, t3) => {
|
13085
13085
|
const [n3, ...r2] = E(e3);
|
13086
|
-
return
|
13086
|
+
return execa3(n3, r2, t3);
|
13087
13087
|
};
|
13088
13088
|
e2.exports.commandSync = (e3, t3) => {
|
13089
13089
|
const [n3, ...r2] = E(e3);
|
13090
|
-
return
|
13090
|
+
return execa3.sync(n3, r2, t3);
|
13091
13091
|
};
|
13092
13092
|
e2.exports.node = (e3, t3, n3 = {}) => {
|
13093
13093
|
if (t3 && !Array.isArray(t3) && typeof t3 === "object") {
|
@@ -13097,7 +13097,7 @@ var require_execa = __commonJS({
|
|
13097
13097
|
const r2 = u.node(n3);
|
13098
13098
|
const o2 = process.execArgv.filter((e4) => !e4.startsWith("--inspect"));
|
13099
13099
|
const { nodePath: s2 = process.execPath, nodeOptions: i2 = o2 } = n3;
|
13100
|
-
return
|
13100
|
+
return execa3(s2, [...i2, e3, ...Array.isArray(t3) ? t3 : []], __spreadProps(__spreadValues({}, n3), { stdin: void 0, stdout: void 0, stderr: void 0, stdio: r2, shell: false }));
|
13101
13101
|
};
|
13102
13102
|
}, 192: (e2) => {
|
13103
13103
|
"use strict";
|
@@ -35739,7 +35739,7 @@ var require_nodeEnv = __commonJS({
|
|
35739
35739
|
Object.defineProperty(exports, "__esModule", { value: true });
|
35740
35740
|
exports.canUsePnpm = exports.canUseYarn = exports.canUseNpm = void 0;
|
35741
35741
|
var compiled_1 = require_compiled();
|
35742
|
-
function
|
35742
|
+
function canUseNpm3() {
|
35743
35743
|
return __async(this, null, function* () {
|
35744
35744
|
try {
|
35745
35745
|
yield (0, compiled_1.execa)("npm", ["--version"], { env: process.env });
|
@@ -35749,7 +35749,7 @@ var require_nodeEnv = __commonJS({
|
|
35749
35749
|
}
|
35750
35750
|
});
|
35751
35751
|
}
|
35752
|
-
exports.canUseNpm =
|
35752
|
+
exports.canUseNpm = canUseNpm3;
|
35753
35753
|
function canUseYarn2() {
|
35754
35754
|
return __async(this, null, function* () {
|
35755
35755
|
try {
|
@@ -35761,7 +35761,7 @@ var require_nodeEnv = __commonJS({
|
|
35761
35761
|
});
|
35762
35762
|
}
|
35763
35763
|
exports.canUseYarn = canUseYarn2;
|
35764
|
-
function
|
35764
|
+
function canUsePnpm3() {
|
35765
35765
|
return __async(this, null, function* () {
|
35766
35766
|
try {
|
35767
35767
|
yield (0, compiled_1.execa)("pnpm", ["--version"], { env: process.env });
|
@@ -35771,7 +35771,7 @@ var require_nodeEnv = __commonJS({
|
|
35771
35771
|
}
|
35772
35772
|
});
|
35773
35773
|
}
|
35774
|
-
exports.canUsePnpm =
|
35774
|
+
exports.canUsePnpm = canUsePnpm3;
|
35775
35775
|
}
|
35776
35776
|
});
|
35777
35777
|
|
@@ -35789,7 +35789,7 @@ var require_getPackageManager = __commonJS({
|
|
35789
35789
|
var compiled_1 = require_compiled();
|
35790
35790
|
var nodeEnv_1 = require_nodeEnv();
|
35791
35791
|
var MAX_TIMES = 5;
|
35792
|
-
function
|
35792
|
+
function getPackageManager2() {
|
35793
35793
|
return __async(this, arguments, function* (cwd = process.cwd()) {
|
35794
35794
|
let appDirectory = cwd;
|
35795
35795
|
let times = 0;
|
@@ -35815,7 +35815,7 @@ var require_getPackageManager = __commonJS({
|
|
35815
35815
|
return "npm";
|
35816
35816
|
});
|
35817
35817
|
}
|
35818
|
-
exports.getPackageManager =
|
35818
|
+
exports.getPackageManager = getPackageManager2;
|
35819
35819
|
}
|
35820
35820
|
});
|
35821
35821
|
|
@@ -35913,11 +35913,11 @@ var require_readTsConfig = __commonJS({
|
|
35913
35913
|
return (0, exports.readTsConfigByFile)(path_1.default.resolve(root, "./tsconfig.json"));
|
35914
35914
|
};
|
35915
35915
|
exports.readTsConfig = readTsConfig;
|
35916
|
-
var
|
35916
|
+
var readTsConfigByFile2 = (filename) => {
|
35917
35917
|
const content = compiled_1.fs.readFileSync(path_1.default.resolve(filename), "utf-8");
|
35918
35918
|
return compiled_1.json5.parse(content);
|
35919
35919
|
};
|
35920
|
-
exports.readTsConfigByFile =
|
35920
|
+
exports.readTsConfigByFile = readTsConfigByFile2;
|
35921
35921
|
}
|
35922
35922
|
});
|
35923
35923
|
|
@@ -36549,7 +36549,7 @@ var require_version = __commonJS({
|
|
36549
36549
|
});
|
36550
36550
|
}
|
36551
36551
|
exports.getPnpmVersion = getPnpmVersion;
|
36552
|
-
var
|
36552
|
+
var isReact182 = (cwd) => {
|
36553
36553
|
const pkgPath = path_1.default.join(cwd, "package.json");
|
36554
36554
|
if (!compiled_1.fs.existsSync(pkgPath)) {
|
36555
36555
|
return false;
|
@@ -36561,7 +36561,7 @@ var require_version = __commonJS({
|
|
36561
36561
|
}
|
36562
36562
|
return compiled_1.semver.satisfies(compiled_1.semver.minVersion(deps.react), ">=18.0.0");
|
36563
36563
|
};
|
36564
|
-
exports.isReact18 =
|
36564
|
+
exports.isReact18 = isReact182;
|
36565
36565
|
}
|
36566
36566
|
});
|
36567
36567
|
|
@@ -44395,9 +44395,9 @@ var require_env = __commonJS({
|
|
44395
44395
|
Object.defineProperty(exports, "__esModule", {
|
44396
44396
|
value: true
|
44397
44397
|
});
|
44398
|
-
exports.canUseNpm =
|
44398
|
+
exports.canUseNpm = canUseNpm3;
|
44399
44399
|
exports.canUseNvm = canUseNvm;
|
44400
|
-
exports.canUsePnpm =
|
44400
|
+
exports.canUsePnpm = canUsePnpm3;
|
44401
44401
|
exports.canUseYarn = canUseYarn2;
|
44402
44402
|
var _utils = require_dist();
|
44403
44403
|
function canUseNvm() {
|
@@ -44413,7 +44413,7 @@ var require_env = __commonJS({
|
|
44413
44413
|
}
|
44414
44414
|
});
|
44415
44415
|
}
|
44416
|
-
function
|
44416
|
+
function canUseNpm3() {
|
44417
44417
|
return __async(this, null, function* () {
|
44418
44418
|
try {
|
44419
44419
|
yield (0, _utils.execa)("npm", ["--version"], {
|
@@ -44437,7 +44437,7 @@ var require_env = __commonJS({
|
|
44437
44437
|
}
|
44438
44438
|
});
|
44439
44439
|
}
|
44440
|
-
function
|
44440
|
+
function canUsePnpm3() {
|
44441
44441
|
return __async(this, null, function* () {
|
44442
44442
|
try {
|
44443
44443
|
yield (0, _utils.execa)("pnpm", ["--version"], {
|
@@ -45460,7 +45460,7 @@ var require_packageManager = __commonJS({
|
|
45460
45460
|
Object.defineProperty(exports, "__esModule", {
|
45461
45461
|
value: true
|
45462
45462
|
});
|
45463
|
-
exports.canUsePnpm =
|
45463
|
+
exports.canUsePnpm = canUsePnpm3;
|
45464
45464
|
exports.canUseYarn = canUseYarn2;
|
45465
45465
|
exports.runInstall = runInstall;
|
45466
45466
|
var _path = _interopRequireDefault(require("path"));
|
@@ -45480,7 +45480,7 @@ var require_packageManager = __commonJS({
|
|
45480
45480
|
}
|
45481
45481
|
});
|
45482
45482
|
}
|
45483
|
-
function
|
45483
|
+
function canUsePnpm3() {
|
45484
45484
|
return __async(this, null, function* () {
|
45485
45485
|
try {
|
45486
45486
|
yield (0, _utils.execa)("pnpm", ["--version"], {
|
@@ -45509,7 +45509,7 @@ var require_packageManager = __commonJS({
|
|
45509
45509
|
});
|
45510
45510
|
} catch (e) {
|
45511
45511
|
}
|
45512
|
-
if (yield
|
45512
|
+
if (yield canUsePnpm3()) {
|
45513
45513
|
const params = ["install", "--prod", "--reporter=silent", "--prefer-offline", "--ignore-scripts"];
|
45514
45514
|
if (registryUrl) {
|
45515
45515
|
params.push(`--registry=${registryUrl}`);
|
@@ -70780,12 +70780,12 @@ var require_figures = __commonJS({
|
|
70780
70780
|
var require_separator = __commonJS({
|
70781
70781
|
"../../../../node_modules/.pnpm/inquirer@8.2.2/node_modules/inquirer/lib/objects/separator.js"(exports, module2) {
|
70782
70782
|
"use strict";
|
70783
|
-
var
|
70783
|
+
var chalk2 = require_chalk();
|
70784
70784
|
var figures = require_figures();
|
70785
70785
|
var Separator = class {
|
70786
70786
|
constructor(line) {
|
70787
70787
|
this.type = "separator";
|
70788
|
-
this.line =
|
70788
|
+
this.line = chalk2.dim(line || new Array(15).join(figures.line));
|
70789
70789
|
}
|
70790
70790
|
toString() {
|
70791
70791
|
return this.line;
|
@@ -90203,7 +90203,7 @@ var require_ora2 = __commonJS({
|
|
90203
90203
|
"../../../../node_modules/.pnpm/ora@5.4.1/node_modules/ora/index.js"(exports, module2) {
|
90204
90204
|
"use strict";
|
90205
90205
|
var readline = require("readline");
|
90206
|
-
var
|
90206
|
+
var chalk2 = require_chalk();
|
90207
90207
|
var cliCursor = require_cli_cursor();
|
90208
90208
|
var cliSpinners = require_cli_spinners();
|
90209
90209
|
var logSymbols = require_browser2();
|
@@ -90399,7 +90399,7 @@ var require_ora2 = __commonJS({
|
|
90399
90399
|
const { frames } = this.spinner;
|
90400
90400
|
let frame = frames[this.frameIndex];
|
90401
90401
|
if (this.color) {
|
90402
|
-
frame =
|
90402
|
+
frame = chalk2[this.color](frame);
|
90403
90403
|
}
|
90404
90404
|
this.frameIndex = ++this.frameIndex % frames.length;
|
90405
90405
|
const fullPrefixText = typeof this.prefixText === "string" && this.prefixText !== "" ? this.prefixText + " " : "";
|
@@ -90530,7 +90530,7 @@ var require_screen_manager = __commonJS({
|
|
90530
90530
|
var cliWidth = require_cli_width();
|
90531
90531
|
var stripAnsi2 = require_strip_ansi2();
|
90532
90532
|
var stringWidth = require_string_width();
|
90533
|
-
var
|
90533
|
+
var ora3 = require_ora2();
|
90534
90534
|
function height(content) {
|
90535
90535
|
return content.split("\n").length;
|
90536
90536
|
}
|
@@ -90551,11 +90551,11 @@ var require_screen_manager = __commonJS({
|
|
90551
90551
|
let contentFunc;
|
90552
90552
|
let bottomContentFunc;
|
90553
90553
|
if (bottomContent) {
|
90554
|
-
spinner =
|
90554
|
+
spinner = ora3(bottomContent);
|
90555
90555
|
contentFunc = () => content;
|
90556
90556
|
bottomContentFunc = () => spinner.frame();
|
90557
90557
|
} else {
|
90558
|
-
spinner =
|
90558
|
+
spinner = ora3(content);
|
90559
90559
|
contentFunc = () => spinner.frame();
|
90560
90560
|
bottomContentFunc = () => "";
|
90561
90561
|
}
|
@@ -90648,7 +90648,7 @@ var require_base3 = __commonJS({
|
|
90648
90648
|
defaults: require_defaults2(),
|
90649
90649
|
clone: require_clone()
|
90650
90650
|
};
|
90651
|
-
var
|
90651
|
+
var chalk2 = require_chalk();
|
90652
90652
|
var runAsync = require_run_async();
|
90653
90653
|
var { filter, flatMap, share, take, takeUntil } = require_operators();
|
90654
90654
|
var Choices = require_choices();
|
@@ -90666,7 +90666,7 @@ var require_base3 = __commonJS({
|
|
90666
90666
|
filteringText: "",
|
90667
90667
|
when: () => true,
|
90668
90668
|
suffix: "",
|
90669
|
-
prefix:
|
90669
|
+
prefix: chalk2.green("?")
|
90670
90670
|
});
|
90671
90671
|
if (!this.opt.name) {
|
90672
90672
|
this.throwParamError("name");
|
@@ -90739,12 +90739,12 @@ var require_base3 = __commonJS({
|
|
90739
90739
|
return value;
|
90740
90740
|
}
|
90741
90741
|
getQuestion() {
|
90742
|
-
let message = (this.opt.prefix ? this.opt.prefix + " " : "") +
|
90742
|
+
let message = (this.opt.prefix ? this.opt.prefix + " " : "") + chalk2.bold(this.opt.message) + this.opt.suffix + chalk2.reset(" ");
|
90743
90743
|
if (this.opt.default != null && this.status !== "touched" && this.status !== "answered") {
|
90744
90744
|
if (this.opt.type === "password") {
|
90745
|
-
message +=
|
90745
|
+
message += chalk2.italic.dim("[hidden] ");
|
90746
90746
|
} else {
|
90747
|
-
message +=
|
90747
|
+
message += chalk2.dim("(" + this.opt.default + ") ");
|
90748
90748
|
}
|
90749
90749
|
}
|
90750
90750
|
return message;
|
@@ -90806,7 +90806,7 @@ var require_events = __commonJS({
|
|
90806
90806
|
var require_paginator = __commonJS({
|
90807
90807
|
"../../../../node_modules/.pnpm/inquirer@8.2.2/node_modules/inquirer/lib/utils/paginator.js"(exports, module2) {
|
90808
90808
|
"use strict";
|
90809
|
-
var
|
90809
|
+
var chalk2 = require_chalk();
|
90810
90810
|
var Paginator = class {
|
90811
90811
|
constructor(screen, options = {}) {
|
90812
90812
|
const { isInfinite = true } = options;
|
@@ -90827,7 +90827,7 @@ var require_paginator = __commonJS({
|
|
90827
90827
|
}
|
90828
90828
|
const visibleLines = this.isInfinite ? this.getInfiniteLines(lines, active, pageSize) : this.getFiniteLines(lines, active, pageSize);
|
90829
90829
|
this.lastIndex = active;
|
90830
|
-
return visibleLines.join("\n") + "\n" +
|
90830
|
+
return visibleLines.join("\n") + "\n" + chalk2.dim("(Move up and down to reveal more choices)");
|
90831
90831
|
}
|
90832
90832
|
getInfiniteLines(lines, active, pageSize) {
|
90833
90833
|
if (this.pointer === void 0) {
|
@@ -90883,7 +90883,7 @@ var require_incrementListIndex = __commonJS({
|
|
90883
90883
|
var require_list2 = __commonJS({
|
90884
90884
|
"../../../../node_modules/.pnpm/inquirer@8.2.2/node_modules/inquirer/lib/prompts/list.js"(exports, module2) {
|
90885
90885
|
"use strict";
|
90886
|
-
var
|
90886
|
+
var chalk2 = require_chalk();
|
90887
90887
|
var figures = require_figures();
|
90888
90888
|
var cliCursor = require_cli_cursor();
|
90889
90889
|
var runAsync = require_run_async();
|
@@ -90932,10 +90932,10 @@ var require_list2 = __commonJS({
|
|
90932
90932
|
render() {
|
90933
90933
|
let message = this.getQuestion();
|
90934
90934
|
if (this.firstRender) {
|
90935
|
-
message +=
|
90935
|
+
message += chalk2.dim("(Use arrow keys)");
|
90936
90936
|
}
|
90937
90937
|
if (this.status === "answered") {
|
90938
|
-
message +=
|
90938
|
+
message += chalk2.cyan(this.opt.choices.getChoice(this.selected).short);
|
90939
90939
|
} else {
|
90940
90940
|
const choicesStr = listRender(this.opt.choices, this.selected);
|
90941
90941
|
const indexPosition = this.opt.choices.indexOf(
|
@@ -91004,7 +91004,7 @@ var require_list2 = __commonJS({
|
|
91004
91004
|
const isSelected = i - separatorOffset === pointer;
|
91005
91005
|
let line = (isSelected ? figures.pointer + " " : " ") + choice.name;
|
91006
91006
|
if (isSelected) {
|
91007
|
-
line =
|
91007
|
+
line = chalk2.cyan(line);
|
91008
91008
|
}
|
91009
91009
|
output2 += line + " \n";
|
91010
91010
|
});
|
@@ -91018,7 +91018,7 @@ var require_list2 = __commonJS({
|
|
91018
91018
|
var require_input = __commonJS({
|
91019
91019
|
"../../../../node_modules/.pnpm/inquirer@8.2.2/node_modules/inquirer/lib/prompts/input.js"(exports, module2) {
|
91020
91020
|
"use strict";
|
91021
|
-
var
|
91021
|
+
var chalk2 = require_chalk();
|
91022
91022
|
var { map: map2, takeUntil } = require_operators();
|
91023
91023
|
var Base = require_base3();
|
91024
91024
|
var observe2 = require_events();
|
@@ -91048,10 +91048,10 @@ var require_input = __commonJS({
|
|
91048
91048
|
if (transformer) {
|
91049
91049
|
message += transformer(appendContent, this.answers, { isFinal });
|
91050
91050
|
} else {
|
91051
|
-
message += isFinal ?
|
91051
|
+
message += isFinal ? chalk2.cyan(appendContent) : appendContent;
|
91052
91052
|
}
|
91053
91053
|
if (error) {
|
91054
|
-
bottomContent =
|
91054
|
+
bottomContent = chalk2.red(">> ") + error;
|
91055
91055
|
}
|
91056
91056
|
this.screen.render(message, bottomContent);
|
91057
91057
|
}
|
@@ -91107,7 +91107,7 @@ var require_number = __commonJS({
|
|
91107
91107
|
var require_confirm = __commonJS({
|
91108
91108
|
"../../../../node_modules/.pnpm/inquirer@8.2.2/node_modules/inquirer/lib/prompts/confirm.js"(exports, module2) {
|
91109
91109
|
"use strict";
|
91110
|
-
var
|
91110
|
+
var chalk2 = require_chalk();
|
91111
91111
|
var { take, takeUntil } = require_operators();
|
91112
91112
|
var Base = require_base3();
|
91113
91113
|
var observe2 = require_events();
|
@@ -91140,7 +91140,7 @@ var require_confirm = __commonJS({
|
|
91140
91140
|
render(answer) {
|
91141
91141
|
let message = this.getQuestion();
|
91142
91142
|
if (typeof answer === "boolean") {
|
91143
|
-
message +=
|
91143
|
+
message += chalk2.cyan(answer ? "Yes" : "No");
|
91144
91144
|
} else {
|
91145
91145
|
message += this.rl.line;
|
91146
91146
|
}
|
@@ -91166,7 +91166,7 @@ var require_confirm = __commonJS({
|
|
91166
91166
|
var require_rawlist = __commonJS({
|
91167
91167
|
"../../../../node_modules/.pnpm/inquirer@8.2.2/node_modules/inquirer/lib/prompts/rawlist.js"(exports, module2) {
|
91168
91168
|
"use strict";
|
91169
|
-
var
|
91169
|
+
var chalk2 = require_chalk();
|
91170
91170
|
var { map: map2, takeUntil } = require_operators();
|
91171
91171
|
var Base = require_base3();
|
91172
91172
|
var Separator = require_separator();
|
@@ -91220,7 +91220,7 @@ var require_rawlist = __commonJS({
|
|
91220
91220
|
let message = this.getQuestion();
|
91221
91221
|
let bottomContent = "";
|
91222
91222
|
if (this.status === "answered") {
|
91223
|
-
message +=
|
91223
|
+
message += chalk2.cyan(this.opt.choices.getChoice(this.selected).short);
|
91224
91224
|
} else {
|
91225
91225
|
const choicesStr = renderChoices(this.opt.choices, this.selected);
|
91226
91226
|
message += "\n" + this.paginator.paginate(choicesStr, this.selected, this.opt.pageSize);
|
@@ -91228,7 +91228,7 @@ var require_rawlist = __commonJS({
|
|
91228
91228
|
}
|
91229
91229
|
message += this.rl.line;
|
91230
91230
|
if (error) {
|
91231
|
-
bottomContent = "\n" +
|
91231
|
+
bottomContent = "\n" + chalk2.red(">> ") + error;
|
91232
91232
|
}
|
91233
91233
|
this.screen.render(message, bottomContent);
|
91234
91234
|
}
|
@@ -91295,7 +91295,7 @@ var require_rawlist = __commonJS({
|
|
91295
91295
|
const index = i - separatorOffset;
|
91296
91296
|
let display = index + 1 + ") " + choice.name;
|
91297
91297
|
if (index === pointer) {
|
91298
|
-
display =
|
91298
|
+
display = chalk2.cyan(display);
|
91299
91299
|
}
|
91300
91300
|
output2 += display;
|
91301
91301
|
});
|
@@ -91309,7 +91309,7 @@ var require_rawlist = __commonJS({
|
|
91309
91309
|
var require_expand2 = __commonJS({
|
91310
91310
|
"../../../../node_modules/.pnpm/inquirer@8.2.2/node_modules/inquirer/lib/prompts/expand.js"(exports, module2) {
|
91311
91311
|
"use strict";
|
91312
|
-
var
|
91312
|
+
var chalk2 = require_chalk();
|
91313
91313
|
var { map: map2, takeUntil } = require_operators();
|
91314
91314
|
var Base = require_base3();
|
91315
91315
|
var Separator = require_separator();
|
@@ -91352,7 +91352,7 @@ var require_expand2 = __commonJS({
|
|
91352
91352
|
let message = this.getQuestion();
|
91353
91353
|
let bottomContent = "";
|
91354
91354
|
if (this.status === "answered") {
|
91355
|
-
message +=
|
91355
|
+
message += chalk2.cyan(this.answer);
|
91356
91356
|
} else if (this.status === "expanded") {
|
91357
91357
|
const choicesStr = renderChoices(this.opt.choices, this.selectedKey);
|
91358
91358
|
message += this.paginator.paginate(choicesStr, this.selectedKey, this.opt.pageSize);
|
@@ -91360,10 +91360,10 @@ var require_expand2 = __commonJS({
|
|
91360
91360
|
}
|
91361
91361
|
message += this.rl.line;
|
91362
91362
|
if (error) {
|
91363
|
-
bottomContent =
|
91363
|
+
bottomContent = chalk2.red(">> ") + error;
|
91364
91364
|
}
|
91365
91365
|
if (hint) {
|
91366
|
-
bottomContent =
|
91366
|
+
bottomContent = chalk2.cyan(">> ") + hint;
|
91367
91367
|
}
|
91368
91368
|
this.screen.render(message, bottomContent);
|
91369
91369
|
}
|
@@ -91387,7 +91387,7 @@ var require_expand2 = __commonJS({
|
|
91387
91387
|
}
|
91388
91388
|
let choiceStr = choice.key + ") " + choice.name;
|
91389
91389
|
if (this.selectedKey === choice.key) {
|
91390
|
-
choiceStr =
|
91390
|
+
choiceStr = chalk2.cyan(choiceStr);
|
91391
91391
|
}
|
91392
91392
|
output2 += choiceStr;
|
91393
91393
|
});
|
@@ -91473,7 +91473,7 @@ var require_expand2 = __commonJS({
|
|
91473
91473
|
}
|
91474
91474
|
let choiceStr = choice.key + ") " + choice.name;
|
91475
91475
|
if (pointer === choice.key) {
|
91476
|
-
choiceStr =
|
91476
|
+
choiceStr = chalk2.cyan(choiceStr);
|
91477
91477
|
}
|
91478
91478
|
output2 += choiceStr;
|
91479
91479
|
});
|
@@ -91487,7 +91487,7 @@ var require_expand2 = __commonJS({
|
|
91487
91487
|
var require_checkbox = __commonJS({
|
91488
91488
|
"../../../../node_modules/.pnpm/inquirer@8.2.2/node_modules/inquirer/lib/prompts/checkbox.js"(exports, module2) {
|
91489
91489
|
"use strict";
|
91490
|
-
var
|
91490
|
+
var chalk2 = require_chalk();
|
91491
91491
|
var cliCursor = require_cli_cursor();
|
91492
91492
|
var figures = require_figures();
|
91493
91493
|
var { map: map2, takeUntil } = require_operators();
|
@@ -91536,10 +91536,10 @@ var require_checkbox = __commonJS({
|
|
91536
91536
|
let message = this.getQuestion();
|
91537
91537
|
let bottomContent = "";
|
91538
91538
|
if (!this.dontShowHints) {
|
91539
|
-
message += "(Press " +
|
91539
|
+
message += "(Press " + chalk2.cyan.bold("<space>") + " to select, " + chalk2.cyan.bold("<a>") + " to toggle all, " + chalk2.cyan.bold("<i>") + " to invert selection, and " + chalk2.cyan.bold("<enter>") + " to proceed)";
|
91540
91540
|
}
|
91541
91541
|
if (this.status === "answered") {
|
91542
|
-
message +=
|
91542
|
+
message += chalk2.cyan(this.selection.join(", "));
|
91543
91543
|
} else {
|
91544
91544
|
const choicesStr = renderChoices(this.opt.choices, this.pointer);
|
91545
91545
|
const indexPosition = this.opt.choices.indexOf(
|
@@ -91562,7 +91562,7 @@ var require_checkbox = __commonJS({
|
|
91562
91562
|
message += "\n" + this.paginator.paginate(choicesStr, realIndexPosition, this.opt.pageSize);
|
91563
91563
|
}
|
91564
91564
|
if (error) {
|
91565
|
-
bottomContent =
|
91565
|
+
bottomContent = chalk2.red(">> ") + error;
|
91566
91566
|
}
|
91567
91567
|
this.screen.render(message, bottomContent);
|
91568
91568
|
}
|
@@ -91645,7 +91645,7 @@ var require_checkbox = __commonJS({
|
|
91645
91645
|
} else {
|
91646
91646
|
const line = getCheckbox(choice.checked) + " " + choice.name;
|
91647
91647
|
if (i - separatorOffset === pointer) {
|
91648
|
-
output2 +=
|
91648
|
+
output2 += chalk2.cyan(figures.pointer + line);
|
91649
91649
|
} else {
|
91650
91650
|
output2 += " " + line;
|
91651
91651
|
}
|
@@ -91655,7 +91655,7 @@ var require_checkbox = __commonJS({
|
|
91655
91655
|
return output2.replace(/\n$/, "");
|
91656
91656
|
}
|
91657
91657
|
function getCheckbox(checked) {
|
91658
|
-
return checked ?
|
91658
|
+
return checked ? chalk2.green(figures.radioOn) : figures.radioOff;
|
91659
91659
|
}
|
91660
91660
|
module2.exports = CheckboxPrompt;
|
91661
91661
|
}
|
@@ -91665,7 +91665,7 @@ var require_checkbox = __commonJS({
|
|
91665
91665
|
var require_password = __commonJS({
|
91666
91666
|
"../../../../node_modules/.pnpm/inquirer@8.2.2/node_modules/inquirer/lib/prompts/password.js"(exports, module2) {
|
91667
91667
|
"use strict";
|
91668
|
-
var
|
91668
|
+
var chalk2 = require_chalk();
|
91669
91669
|
var { map: map2, takeUntil } = require_operators();
|
91670
91670
|
var Base = require_base3();
|
91671
91671
|
var observe2 = require_events();
|
@@ -91698,15 +91698,15 @@ var require_password = __commonJS({
|
|
91698
91698
|
message += this.getMaskedValue(this.rl.line || "");
|
91699
91699
|
}
|
91700
91700
|
if (error) {
|
91701
|
-
bottomContent = "\n" +
|
91701
|
+
bottomContent = "\n" + chalk2.red(">> ") + error;
|
91702
91702
|
}
|
91703
91703
|
this.screen.render(message, bottomContent);
|
91704
91704
|
}
|
91705
91705
|
getMaskedValue(value) {
|
91706
91706
|
if (this.status === "answered") {
|
91707
|
-
return this.opt.mask ?
|
91707
|
+
return this.opt.mask ? chalk2.cyan(mask(value, this.opt.mask)) : chalk2.italic.dim("[hidden]");
|
91708
91708
|
}
|
91709
|
-
return this.opt.mask ? mask(value, this.opt.mask) :
|
91709
|
+
return this.opt.mask ? mask(value, this.opt.mask) : chalk2.italic.dim("[input is hidden] ");
|
91710
91710
|
}
|
91711
91711
|
getSpinningValue(value) {
|
91712
91712
|
return this.getMaskedValue(value);
|
@@ -101214,7 +101214,7 @@ var require_main = __commonJS({
|
|
101214
101214
|
var require_editor = __commonJS({
|
101215
101215
|
"../../../../node_modules/.pnpm/inquirer@8.2.2/node_modules/inquirer/lib/prompts/editor.js"(exports, module2) {
|
101216
101216
|
"use strict";
|
101217
|
-
var
|
101217
|
+
var chalk2 = require_chalk();
|
101218
101218
|
var { editAsync } = require_main();
|
101219
101219
|
var Base = require_base3();
|
101220
101220
|
var observe2 = require_events();
|
@@ -101237,12 +101237,12 @@ var require_editor = __commonJS({
|
|
101237
101237
|
let bottomContent = "";
|
101238
101238
|
let message = this.getQuestion();
|
101239
101239
|
if (this.status === "answered") {
|
101240
|
-
message +=
|
101240
|
+
message += chalk2.dim("Received");
|
101241
101241
|
} else {
|
101242
|
-
message +=
|
101242
|
+
message += chalk2.dim("Press <enter> to launch your preferred editor.");
|
101243
101243
|
}
|
101244
101244
|
if (error) {
|
101245
|
-
bottomContent =
|
101245
|
+
bottomContent = chalk2.red(">> ") + error;
|
101246
101246
|
}
|
101247
101247
|
this.screen.render(message, bottomContent);
|
101248
101248
|
}
|
@@ -101786,12 +101786,12 @@ var require_node7 = __commonJS({
|
|
101786
101786
|
var require_separator2 = __commonJS({
|
101787
101787
|
"../../../../node_modules/.pnpm/inquirer@8.1.3/node_modules/inquirer/lib/objects/separator.js"(exports, module2) {
|
101788
101788
|
"use strict";
|
101789
|
-
var
|
101789
|
+
var chalk2 = require_chalk();
|
101790
101790
|
var figures = require_figures();
|
101791
101791
|
var Separator = class {
|
101792
101792
|
constructor(line) {
|
101793
101793
|
this.type = "separator";
|
101794
|
-
this.line =
|
101794
|
+
this.line = chalk2.dim(line || new Array(15).join(figures.line));
|
101795
101795
|
}
|
101796
101796
|
toString() {
|
101797
101797
|
return this.line;
|
@@ -102659,7 +102659,7 @@ var require_screen_manager2 = __commonJS({
|
|
102659
102659
|
var cliWidth = require_cli_width();
|
102660
102660
|
var stripAnsi2 = require_strip_ansi2();
|
102661
102661
|
var stringWidth = require_string_width();
|
102662
|
-
var
|
102662
|
+
var ora3 = require_ora2();
|
102663
102663
|
function height(content) {
|
102664
102664
|
return content.split("\n").length;
|
102665
102665
|
}
|
@@ -102680,11 +102680,11 @@ var require_screen_manager2 = __commonJS({
|
|
102680
102680
|
let contentFunc;
|
102681
102681
|
let bottomContentFunc;
|
102682
102682
|
if (bottomContent) {
|
102683
|
-
spinner =
|
102683
|
+
spinner = ora3(bottomContent);
|
102684
102684
|
contentFunc = () => content;
|
102685
102685
|
bottomContentFunc = () => spinner.frame();
|
102686
102686
|
} else {
|
102687
|
-
spinner =
|
102687
|
+
spinner = ora3(content);
|
102688
102688
|
contentFunc = () => spinner.frame();
|
102689
102689
|
bottomContentFunc = () => "";
|
102690
102690
|
}
|
@@ -102780,7 +102780,7 @@ var require_base4 = __commonJS({
|
|
102780
102780
|
defaults: require_defaults2(),
|
102781
102781
|
clone: require_clone()
|
102782
102782
|
};
|
102783
|
-
var
|
102783
|
+
var chalk2 = require_chalk();
|
102784
102784
|
var runAsync = require_run_async();
|
102785
102785
|
var { filter, flatMap, share, take, takeUntil } = require_operators();
|
102786
102786
|
var Choices = require_choices2();
|
@@ -102798,7 +102798,7 @@ var require_base4 = __commonJS({
|
|
102798
102798
|
filteringText: "",
|
102799
102799
|
when: () => true,
|
102800
102800
|
suffix: "",
|
102801
|
-
prefix:
|
102801
|
+
prefix: chalk2.green("?")
|
102802
102802
|
});
|
102803
102803
|
if (!this.opt.name) {
|
102804
102804
|
this.throwParamError("name");
|
@@ -102871,12 +102871,12 @@ var require_base4 = __commonJS({
|
|
102871
102871
|
return value;
|
102872
102872
|
}
|
102873
102873
|
getQuestion() {
|
102874
|
-
let message = (this.opt.prefix ? this.opt.prefix + " " : "") +
|
102874
|
+
let message = (this.opt.prefix ? this.opt.prefix + " " : "") + chalk2.bold(this.opt.message) + this.opt.suffix + chalk2.reset(" ");
|
102875
102875
|
if (this.opt.default != null && this.status !== "touched" && this.status !== "answered") {
|
102876
102876
|
if (this.opt.type === "password") {
|
102877
|
-
message +=
|
102877
|
+
message += chalk2.italic.dim("[hidden] ");
|
102878
102878
|
} else {
|
102879
|
-
message +=
|
102879
|
+
message += chalk2.dim("(" + this.opt.default + ") ");
|
102880
102880
|
}
|
102881
102881
|
}
|
102882
102882
|
return message;
|
@@ -102971,7 +102971,7 @@ var require_paginator2 = __commonJS({
|
|
102971
102971
|
sum: require_sum(),
|
102972
102972
|
flatten: require_flatten()
|
102973
102973
|
};
|
102974
|
-
var
|
102974
|
+
var chalk2 = require_chalk();
|
102975
102975
|
var Paginator = class {
|
102976
102976
|
constructor(screen, options = {}) {
|
102977
102977
|
const { isInfinite = true } = options;
|
@@ -102992,7 +102992,7 @@ var require_paginator2 = __commonJS({
|
|
102992
102992
|
}
|
102993
102993
|
const visibleLines = this.isInfinite ? this.getInfiniteLines(lines, active, pageSize) : this.getFiniteLines(lines, active, pageSize);
|
102994
102994
|
this.lastIndex = active;
|
102995
|
-
return visibleLines.join("\n") + "\n" +
|
102995
|
+
return visibleLines.join("\n") + "\n" + chalk2.dim("(Move up and down to reveal more choices)");
|
102996
102996
|
}
|
102997
102997
|
getInfiniteLines(lines, active, pageSize) {
|
102998
102998
|
if (this.pointer === void 0) {
|
@@ -103053,7 +103053,7 @@ var require_list3 = __commonJS({
|
|
103053
103053
|
findIndex: require_findIndex2(),
|
103054
103054
|
isString: require_isString()
|
103055
103055
|
};
|
103056
|
-
var
|
103056
|
+
var chalk2 = require_chalk();
|
103057
103057
|
var figures = require_figures();
|
103058
103058
|
var cliCursor = require_cli_cursor();
|
103059
103059
|
var runAsync = require_run_async();
|
@@ -103105,10 +103105,10 @@ var require_list3 = __commonJS({
|
|
103105
103105
|
render() {
|
103106
103106
|
let message = this.getQuestion();
|
103107
103107
|
if (this.firstRender) {
|
103108
|
-
message +=
|
103108
|
+
message += chalk2.dim("(Use arrow keys)");
|
103109
103109
|
}
|
103110
103110
|
if (this.status === "answered") {
|
103111
|
-
message +=
|
103111
|
+
message += chalk2.cyan(this.opt.choices.getChoice(this.selected).short);
|
103112
103112
|
} else {
|
103113
103113
|
const choicesStr = listRender(this.opt.choices, this.selected);
|
103114
103114
|
const indexPosition = this.opt.choices.indexOf(
|
@@ -103177,7 +103177,7 @@ var require_list3 = __commonJS({
|
|
103177
103177
|
const isSelected = i - separatorOffset === pointer;
|
103178
103178
|
let line = (isSelected ? figures.pointer + " " : " ") + choice.name;
|
103179
103179
|
if (isSelected) {
|
103180
|
-
line =
|
103180
|
+
line = chalk2.cyan(line);
|
103181
103181
|
}
|
103182
103182
|
output2 += line + " \n";
|
103183
103183
|
});
|
@@ -103191,7 +103191,7 @@ var require_list3 = __commonJS({
|
|
103191
103191
|
var require_input2 = __commonJS({
|
103192
103192
|
"../../../../node_modules/.pnpm/inquirer@8.1.3/node_modules/inquirer/lib/prompts/input.js"(exports, module2) {
|
103193
103193
|
"use strict";
|
103194
|
-
var
|
103194
|
+
var chalk2 = require_chalk();
|
103195
103195
|
var { map: map2, takeUntil } = require_operators();
|
103196
103196
|
var Base = require_base4();
|
103197
103197
|
var observe2 = require_events2();
|
@@ -103221,10 +103221,10 @@ var require_input2 = __commonJS({
|
|
103221
103221
|
if (transformer) {
|
103222
103222
|
message += transformer(appendContent, this.answers, { isFinal });
|
103223
103223
|
} else {
|
103224
|
-
message += isFinal ?
|
103224
|
+
message += isFinal ? chalk2.cyan(appendContent) : appendContent;
|
103225
103225
|
}
|
103226
103226
|
if (error) {
|
103227
|
-
bottomContent =
|
103227
|
+
bottomContent = chalk2.red(">> ") + error;
|
103228
103228
|
}
|
103229
103229
|
this.screen.render(message, bottomContent);
|
103230
103230
|
}
|
@@ -103297,7 +103297,7 @@ var require_confirm2 = __commonJS({
|
|
103297
103297
|
extend: require_extend(),
|
103298
103298
|
isBoolean: require_isBoolean()
|
103299
103299
|
};
|
103300
|
-
var
|
103300
|
+
var chalk2 = require_chalk();
|
103301
103301
|
var { take, takeUntil } = require_operators();
|
103302
103302
|
var Base = require_base4();
|
103303
103303
|
var observe2 = require_events2();
|
@@ -103330,7 +103330,7 @@ var require_confirm2 = __commonJS({
|
|
103330
103330
|
render(answer) {
|
103331
103331
|
let message = this.getQuestion();
|
103332
103332
|
if (typeof answer === "boolean") {
|
103333
|
-
message +=
|
103333
|
+
message += chalk2.cyan(answer ? "Yes" : "No");
|
103334
103334
|
} else {
|
103335
103335
|
message += this.rl.line;
|
103336
103336
|
}
|
@@ -103361,7 +103361,7 @@ var require_rawlist2 = __commonJS({
|
|
103361
103361
|
isNumber: require_isNumber(),
|
103362
103362
|
findIndex: require_findIndex2()
|
103363
103363
|
};
|
103364
|
-
var
|
103364
|
+
var chalk2 = require_chalk();
|
103365
103365
|
var { map: map2, takeUntil } = require_operators();
|
103366
103366
|
var Base = require_base4();
|
103367
103367
|
var Separator = require_separator2();
|
@@ -103416,7 +103416,7 @@ var require_rawlist2 = __commonJS({
|
|
103416
103416
|
let message = this.getQuestion();
|
103417
103417
|
let bottomContent = "";
|
103418
103418
|
if (this.status === "answered") {
|
103419
|
-
message +=
|
103419
|
+
message += chalk2.cyan(this.opt.choices.getChoice(this.selected).short);
|
103420
103420
|
} else {
|
103421
103421
|
const choicesStr = renderChoices(this.opt.choices, this.selected);
|
103422
103422
|
message += "\n" + this.paginator.paginate(choicesStr, this.selected, this.opt.pageSize);
|
@@ -103424,7 +103424,7 @@ var require_rawlist2 = __commonJS({
|
|
103424
103424
|
}
|
103425
103425
|
message += this.rl.line;
|
103426
103426
|
if (error) {
|
103427
|
-
bottomContent = "\n" +
|
103427
|
+
bottomContent = "\n" + chalk2.red(">> ") + error;
|
103428
103428
|
}
|
103429
103429
|
this.screen.render(message, bottomContent);
|
103430
103430
|
}
|
@@ -103482,7 +103482,7 @@ var require_rawlist2 = __commonJS({
|
|
103482
103482
|
const index = i - separatorOffset;
|
103483
103483
|
let display = index + 1 + ") " + choice.name;
|
103484
103484
|
if (index === pointer) {
|
103485
|
-
display =
|
103485
|
+
display = chalk2.cyan(display);
|
103486
103486
|
}
|
103487
103487
|
output2 += display;
|
103488
103488
|
});
|
@@ -103657,7 +103657,7 @@ var require_expand3 = __commonJS({
|
|
103657
103657
|
isNumber: require_isNumber(),
|
103658
103658
|
findIndex: require_findIndex2()
|
103659
103659
|
};
|
103660
|
-
var
|
103660
|
+
var chalk2 = require_chalk();
|
103661
103661
|
var { map: map2, takeUntil } = require_operators();
|
103662
103662
|
var Base = require_base4();
|
103663
103663
|
var Separator = require_separator2();
|
@@ -103700,7 +103700,7 @@ var require_expand3 = __commonJS({
|
|
103700
103700
|
let message = this.getQuestion();
|
103701
103701
|
let bottomContent = "";
|
103702
103702
|
if (this.status === "answered") {
|
103703
|
-
message +=
|
103703
|
+
message += chalk2.cyan(this.answer);
|
103704
103704
|
} else if (this.status === "expanded") {
|
103705
103705
|
const choicesStr = renderChoices(this.opt.choices, this.selectedKey);
|
103706
103706
|
message += this.paginator.paginate(choicesStr, this.selectedKey, this.opt.pageSize);
|
@@ -103708,10 +103708,10 @@ var require_expand3 = __commonJS({
|
|
103708
103708
|
}
|
103709
103709
|
message += this.rl.line;
|
103710
103710
|
if (error) {
|
103711
|
-
bottomContent =
|
103711
|
+
bottomContent = chalk2.red(">> ") + error;
|
103712
103712
|
}
|
103713
103713
|
if (hint) {
|
103714
|
-
bottomContent =
|
103714
|
+
bottomContent = chalk2.cyan(">> ") + hint;
|
103715
103715
|
}
|
103716
103716
|
this.screen.render(message, bottomContent);
|
103717
103717
|
}
|
@@ -103735,7 +103735,7 @@ var require_expand3 = __commonJS({
|
|
103735
103735
|
}
|
103736
103736
|
let choiceStr = choice.key + ") " + choice.name;
|
103737
103737
|
if (this.selectedKey === choice.key) {
|
103738
|
-
choiceStr =
|
103738
|
+
choiceStr = chalk2.cyan(choiceStr);
|
103739
103739
|
}
|
103740
103740
|
output2 += choiceStr;
|
103741
103741
|
});
|
@@ -103824,7 +103824,7 @@ var require_expand3 = __commonJS({
|
|
103824
103824
|
}
|
103825
103825
|
let choiceStr = choice.key + ") " + choice.name;
|
103826
103826
|
if (pointer === choice.key) {
|
103827
|
-
choiceStr =
|
103827
|
+
choiceStr = chalk2.cyan(choiceStr);
|
103828
103828
|
}
|
103829
103829
|
output2 += choiceStr;
|
103830
103830
|
});
|
@@ -103843,7 +103843,7 @@ var require_checkbox2 = __commonJS({
|
|
103843
103843
|
map: require_map2(),
|
103844
103844
|
isString: require_isString()
|
103845
103845
|
};
|
103846
|
-
var
|
103846
|
+
var chalk2 = require_chalk();
|
103847
103847
|
var cliCursor = require_cli_cursor();
|
103848
103848
|
var figures = require_figures();
|
103849
103849
|
var { map: map2, takeUntil } = require_operators();
|
@@ -103892,10 +103892,10 @@ var require_checkbox2 = __commonJS({
|
|
103892
103892
|
let message = this.getQuestion();
|
103893
103893
|
let bottomContent = "";
|
103894
103894
|
if (!this.spaceKeyPressed) {
|
103895
|
-
message += "(Press " +
|
103895
|
+
message += "(Press " + chalk2.cyan.bold("<space>") + " to select, " + chalk2.cyan.bold("<a>") + " to toggle all, " + chalk2.cyan.bold("<i>") + " to invert selection)";
|
103896
103896
|
}
|
103897
103897
|
if (this.status === "answered") {
|
103898
|
-
message +=
|
103898
|
+
message += chalk2.cyan(this.selection.join(", "));
|
103899
103899
|
} else {
|
103900
103900
|
const choicesStr = renderChoices(this.opt.choices, this.pointer);
|
103901
103901
|
const indexPosition = this.opt.choices.indexOf(
|
@@ -103918,7 +103918,7 @@ var require_checkbox2 = __commonJS({
|
|
103918
103918
|
message += "\n" + this.paginator.paginate(choicesStr, realIndexPosition, this.opt.pageSize);
|
103919
103919
|
}
|
103920
103920
|
if (error) {
|
103921
|
-
bottomContent =
|
103921
|
+
bottomContent = chalk2.red(">> ") + error;
|
103922
103922
|
}
|
103923
103923
|
this.screen.render(message, bottomContent);
|
103924
103924
|
}
|
@@ -104002,7 +104002,7 @@ var require_checkbox2 = __commonJS({
|
|
104002
104002
|
} else {
|
104003
104003
|
const line = getCheckbox(choice.checked) + " " + choice.name;
|
104004
104004
|
if (i - separatorOffset === pointer) {
|
104005
|
-
output2 +=
|
104005
|
+
output2 += chalk2.cyan(figures.pointer + line);
|
104006
104006
|
} else {
|
104007
104007
|
output2 += " " + line;
|
104008
104008
|
}
|
@@ -104012,7 +104012,7 @@ var require_checkbox2 = __commonJS({
|
|
104012
104012
|
return output2.replace(/\n$/, "");
|
104013
104013
|
}
|
104014
104014
|
function getCheckbox(checked) {
|
104015
|
-
return checked ?
|
104015
|
+
return checked ? chalk2.green(figures.radioOn) : figures.radioOff;
|
104016
104016
|
}
|
104017
104017
|
module2.exports = CheckboxPrompt;
|
104018
104018
|
}
|
@@ -104022,7 +104022,7 @@ var require_checkbox2 = __commonJS({
|
|
104022
104022
|
var require_password2 = __commonJS({
|
104023
104023
|
"../../../../node_modules/.pnpm/inquirer@8.1.3/node_modules/inquirer/lib/prompts/password.js"(exports, module2) {
|
104024
104024
|
"use strict";
|
104025
|
-
var
|
104025
|
+
var chalk2 = require_chalk();
|
104026
104026
|
var { map: map2, takeUntil } = require_operators();
|
104027
104027
|
var Base = require_base4();
|
104028
104028
|
var observe2 = require_events2();
|
@@ -104055,15 +104055,15 @@ var require_password2 = __commonJS({
|
|
104055
104055
|
message += this.getMaskedValue(this.rl.line || "");
|
104056
104056
|
}
|
104057
104057
|
if (error) {
|
104058
|
-
bottomContent = "\n" +
|
104058
|
+
bottomContent = "\n" + chalk2.red(">> ") + error;
|
104059
104059
|
}
|
104060
104060
|
this.screen.render(message, bottomContent);
|
104061
104061
|
}
|
104062
104062
|
getMaskedValue(value) {
|
104063
104063
|
if (this.status === "answered") {
|
104064
|
-
return this.opt.mask ?
|
104064
|
+
return this.opt.mask ? chalk2.cyan(mask(value, this.opt.mask)) : chalk2.italic.dim("[hidden]");
|
104065
104065
|
}
|
104066
|
-
return this.opt.mask ? mask(value, this.opt.mask) :
|
104066
|
+
return this.opt.mask ? mask(value, this.opt.mask) : chalk2.italic.dim("[input is hidden] ");
|
104067
104067
|
}
|
104068
104068
|
getSpinningValue(value) {
|
104069
104069
|
return this.getMaskedValue(value);
|
@@ -104099,7 +104099,7 @@ var require_password2 = __commonJS({
|
|
104099
104099
|
var require_editor2 = __commonJS({
|
104100
104100
|
"../../../../node_modules/.pnpm/inquirer@8.1.3/node_modules/inquirer/lib/prompts/editor.js"(exports, module2) {
|
104101
104101
|
"use strict";
|
104102
|
-
var
|
104102
|
+
var chalk2 = require_chalk();
|
104103
104103
|
var { editAsync } = require_main();
|
104104
104104
|
var Base = require_base4();
|
104105
104105
|
var observe2 = require_events2();
|
@@ -104122,12 +104122,12 @@ var require_editor2 = __commonJS({
|
|
104122
104122
|
let bottomContent = "";
|
104123
104123
|
let message = this.getQuestion();
|
104124
104124
|
if (this.status === "answered") {
|
104125
|
-
message +=
|
104125
|
+
message += chalk2.dim("Received");
|
104126
104126
|
} else {
|
104127
|
-
message +=
|
104127
|
+
message += chalk2.dim("Press <enter> to launch your preferred editor.");
|
104128
104128
|
}
|
104129
104129
|
if (error) {
|
104130
|
-
bottomContent =
|
104130
|
+
bottomContent = chalk2.red(">> ") + error;
|
104131
104131
|
}
|
104132
104132
|
this.screen.render(message, bottomContent);
|
104133
104133
|
}
|
@@ -117746,7 +117746,7 @@ var require_execa2 = __commonJS({
|
|
117746
117746
|
}
|
117747
117747
|
return t3;
|
117748
117748
|
};
|
117749
|
-
const
|
117749
|
+
const execa3 = (e3, t3, n3) => {
|
117750
117750
|
const r2 = handleArguments(e3, t3, n3);
|
117751
117751
|
const s2 = w(e3, t3);
|
117752
117752
|
const i2 = I(e3, t3);
|
@@ -117784,7 +117784,7 @@ var require_execa2 = __commonJS({
|
|
117784
117784
|
a2.all = y(a2, r2.options);
|
117785
117785
|
return S(a2, C);
|
117786
117786
|
};
|
117787
|
-
e2.exports =
|
117787
|
+
e2.exports = execa3;
|
117788
117788
|
e2.exports.sync = (e3, t3, n3) => {
|
117789
117789
|
const r2 = handleArguments(e3, t3, n3);
|
117790
117790
|
const s2 = w(e3, t3);
|
@@ -117809,11 +117809,11 @@ var require_execa2 = __commonJS({
|
|
117809
117809
|
};
|
117810
117810
|
e2.exports.command = (e3, t3) => {
|
117811
117811
|
const [n3, ...r2] = E(e3);
|
117812
|
-
return
|
117812
|
+
return execa3(n3, r2, t3);
|
117813
117813
|
};
|
117814
117814
|
e2.exports.commandSync = (e3, t3) => {
|
117815
117815
|
const [n3, ...r2] = E(e3);
|
117816
|
-
return
|
117816
|
+
return execa3.sync(n3, r2, t3);
|
117817
117817
|
};
|
117818
117818
|
e2.exports.node = (e3, t3, n3 = {}) => {
|
117819
117819
|
if (t3 && !Array.isArray(t3) && typeof t3 === "object") {
|
@@ -117823,7 +117823,7 @@ var require_execa2 = __commonJS({
|
|
117823
117823
|
const r2 = u.node(n3);
|
117824
117824
|
const o2 = process.execArgv.filter((e4) => !e4.startsWith("--inspect"));
|
117825
117825
|
const { nodePath: s2 = process.execPath, nodeOptions: i2 = o2 } = n3;
|
117826
|
-
return
|
117826
|
+
return execa3(s2, [...i2, e3, ...Array.isArray(t3) ? t3 : []], __spreadProps(__spreadValues({}, n3), { stdin: void 0, stdout: void 0, stderr: void 0, stdio: r2, shell: false }));
|
117827
117827
|
};
|
117828
117828
|
}, 192: (e2) => {
|
117829
117829
|
"use strict";
|
@@ -133817,6 +133817,26 @@ var require_compiled2 = __commonJS({
|
|
133817
133817
|
}
|
133818
133818
|
});
|
133819
133819
|
|
133820
|
+
// ../../../toolkit/utils/dist/commands.js
|
133821
|
+
var require_commands = __commonJS({
|
133822
|
+
"../../../toolkit/utils/dist/commands.js"(exports) {
|
133823
|
+
"use strict";
|
133824
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
133825
|
+
exports.isDevCommand = exports.getCommand = void 0;
|
133826
|
+
var getCommand = () => {
|
133827
|
+
const args = process.argv.slice(2);
|
133828
|
+
const command = args[0];
|
133829
|
+
return command;
|
133830
|
+
};
|
133831
|
+
exports.getCommand = getCommand;
|
133832
|
+
var isDevCommand = () => {
|
133833
|
+
const command = (0, exports.getCommand)();
|
133834
|
+
return command === "dev" || command === "start";
|
133835
|
+
};
|
133836
|
+
exports.isDevCommand = isDevCommand;
|
133837
|
+
}
|
133838
|
+
});
|
133839
|
+
|
133820
133840
|
// ../../../toolkit/utils/dist/format.js
|
133821
133841
|
var require_format2 = __commonJS({
|
133822
133842
|
"../../../toolkit/utils/dist/format.js"(exports) {
|
@@ -134192,12 +134212,14 @@ var require_node_env2 = __commonJS({
|
|
134192
134212
|
"../../../toolkit/utils/dist/is/node-env.js"(exports) {
|
134193
134213
|
"use strict";
|
134194
134214
|
Object.defineProperty(exports, "__esModule", { value: true });
|
134195
|
-
exports.isProdProfile = exports.isTest = exports.isProd = exports.isDev = void 0;
|
134196
|
-
var
|
134215
|
+
exports.isProdProfile = exports.isTest = exports.isProd = exports.isDev = exports.getNodeEnv = void 0;
|
134216
|
+
var getNodeEnv = () => process.env.NODE_ENV || "development";
|
134217
|
+
exports.getNodeEnv = getNodeEnv;
|
134218
|
+
var isDev = () => (0, exports.getNodeEnv)() === "development";
|
134197
134219
|
exports.isDev = isDev;
|
134198
|
-
var isProd = () =>
|
134220
|
+
var isProd = () => (0, exports.getNodeEnv)() === "production";
|
134199
134221
|
exports.isProd = isProd;
|
134200
|
-
var isTest = () =>
|
134222
|
+
var isTest = () => (0, exports.getNodeEnv)() === "test";
|
134201
134223
|
exports.isTest = isTest;
|
134202
134224
|
var isProdProfile = () => (0, exports.isProd)() && process.argv.includes("--profile");
|
134203
134225
|
exports.isProdProfile = isProdProfile;
|
@@ -134340,10 +134362,10 @@ var require_is2 = __commonJS({
|
|
134340
134362
|
|
134341
134363
|
// ../../../toolkit/utils/dist/compatRequire.js
|
134342
134364
|
var require_compatRequire2 = __commonJS({
|
134343
|
-
"../../../toolkit/utils/dist/compatRequire.js"(exports) {
|
134365
|
+
"../../../toolkit/utils/dist/compatRequire.js"(exports, module2) {
|
134344
134366
|
"use strict";
|
134345
134367
|
Object.defineProperty(exports, "__esModule", { value: true });
|
134346
|
-
exports.cleanRequireCache = exports.requireExistModule = exports.dynamicImport = exports.compatRequire = void 0;
|
134368
|
+
exports.deleteRequireCache = exports.cleanRequireCache = exports.requireExistModule = exports.dynamicImport = exports.compatRequire = void 0;
|
134347
134369
|
var findExists_1 = require_findExists2();
|
134348
134370
|
var compatRequire = (filePath, interop = true) => {
|
134349
134371
|
const mod = require(filePath);
|
@@ -134370,6 +134392,15 @@ var require_compatRequire2 = __commonJS({
|
|
134370
134392
|
});
|
134371
134393
|
};
|
134372
134394
|
exports.cleanRequireCache = cleanRequireCache;
|
134395
|
+
function deleteRequireCache(path3) {
|
134396
|
+
if (require.cache[path3]) {
|
134397
|
+
delete require.cache[path3];
|
134398
|
+
}
|
134399
|
+
if (module2.children) {
|
134400
|
+
module2.children = module2.children.filter((item) => item.filename !== path3);
|
134401
|
+
}
|
134402
|
+
}
|
134403
|
+
exports.deleteRequireCache = deleteRequireCache;
|
134373
134404
|
}
|
134374
134405
|
});
|
134375
134406
|
|
@@ -134391,7 +134422,7 @@ var require_constants6 = __commonJS({
|
|
134391
134422
|
exports.SERVER_DIR = "server";
|
134392
134423
|
exports.SHARED_DIR = "shared";
|
134393
134424
|
exports.CONFIG_CACHE_DIR = "./node_modules/.cache/node-bundle-require";
|
134394
|
-
exports.CONFIG_FILE_EXTENSIONS = [".js", ".ts", ".
|
134425
|
+
exports.CONFIG_FILE_EXTENSIONS = [".js", ".ts", ".mjs"];
|
134395
134426
|
exports.OUTPUT_CONFIG_FILE = "modern.config.json";
|
134396
134427
|
exports.DEFAULT_SERVER_CONFIG = "modern.server-runtime.config";
|
134397
134428
|
exports.ROUTE_MINIFEST_FILE = "routes-manifest.json";
|
@@ -134871,7 +134902,7 @@ var require_nodeEnv2 = __commonJS({
|
|
134871
134902
|
Object.defineProperty(exports, "__esModule", { value: true });
|
134872
134903
|
exports.canUsePnpm = exports.canUseYarn = exports.canUseNpm = void 0;
|
134873
134904
|
var compiled_1 = require_compiled2();
|
134874
|
-
function
|
134905
|
+
function canUseNpm3() {
|
134875
134906
|
return __async(this, null, function* () {
|
134876
134907
|
try {
|
134877
134908
|
yield (0, compiled_1.execa)("npm", ["--version"], { env: process.env });
|
@@ -134881,7 +134912,7 @@ var require_nodeEnv2 = __commonJS({
|
|
134881
134912
|
}
|
134882
134913
|
});
|
134883
134914
|
}
|
134884
|
-
exports.canUseNpm =
|
134915
|
+
exports.canUseNpm = canUseNpm3;
|
134885
134916
|
function canUseYarn2() {
|
134886
134917
|
return __async(this, null, function* () {
|
134887
134918
|
try {
|
@@ -134893,7 +134924,7 @@ var require_nodeEnv2 = __commonJS({
|
|
134893
134924
|
});
|
134894
134925
|
}
|
134895
134926
|
exports.canUseYarn = canUseYarn2;
|
134896
|
-
function
|
134927
|
+
function canUsePnpm3() {
|
134897
134928
|
return __async(this, null, function* () {
|
134898
134929
|
try {
|
134899
134930
|
yield (0, compiled_1.execa)("pnpm", ["--version"], { env: process.env });
|
@@ -134903,7 +134934,7 @@ var require_nodeEnv2 = __commonJS({
|
|
134903
134934
|
}
|
134904
134935
|
});
|
134905
134936
|
}
|
134906
|
-
exports.canUsePnpm =
|
134937
|
+
exports.canUsePnpm = canUsePnpm3;
|
134907
134938
|
}
|
134908
134939
|
});
|
134909
134940
|
|
@@ -134921,7 +134952,7 @@ var require_getPackageManager2 = __commonJS({
|
|
134921
134952
|
var compiled_1 = require_compiled2();
|
134922
134953
|
var nodeEnv_1 = require_nodeEnv2();
|
134923
134954
|
var MAX_TIMES = 5;
|
134924
|
-
function
|
134955
|
+
function getPackageManager2() {
|
134925
134956
|
return __async(this, arguments, function* (cwd = process.cwd()) {
|
134926
134957
|
let appDirectory = cwd;
|
134927
134958
|
let times = 0;
|
@@ -134947,7 +134978,7 @@ var require_getPackageManager2 = __commonJS({
|
|
134947
134978
|
return "npm";
|
134948
134979
|
});
|
134949
134980
|
}
|
134950
|
-
exports.getPackageManager =
|
134981
|
+
exports.getPackageManager = getPackageManager2;
|
134951
134982
|
}
|
134952
134983
|
});
|
134953
134984
|
|
@@ -135073,11 +135104,11 @@ var require_readTsConfig2 = __commonJS({
|
|
135073
135104
|
return (0, exports.readTsConfigByFile)(path_1.default.resolve(root, "./tsconfig.json"));
|
135074
135105
|
};
|
135075
135106
|
exports.readTsConfig = readTsConfig;
|
135076
|
-
var
|
135107
|
+
var readTsConfigByFile2 = (filename) => {
|
135077
135108
|
const content = compiled_1.fs.readFileSync(path_1.default.resolve(filename), "utf-8");
|
135078
135109
|
return compiled_1.json5.parse(content);
|
135079
135110
|
};
|
135080
|
-
exports.readTsConfigByFile =
|
135111
|
+
exports.readTsConfigByFile = readTsConfigByFile2;
|
135081
135112
|
}
|
135082
135113
|
});
|
135083
135114
|
|
@@ -135772,7 +135803,7 @@ var require_version2 = __commonJS({
|
|
135772
135803
|
});
|
135773
135804
|
}
|
135774
135805
|
exports.getPnpmVersion = getPnpmVersion;
|
135775
|
-
var
|
135806
|
+
var isReact182 = (cwd) => {
|
135776
135807
|
const pkgPath = path_1.default.join(cwd, "package.json");
|
135777
135808
|
if (!compiled_1.fs.existsSync(pkgPath)) {
|
135778
135809
|
return false;
|
@@ -135784,7 +135815,7 @@ var require_version2 = __commonJS({
|
|
135784
135815
|
}
|
135785
135816
|
return compiled_1.semver.satisfies(compiled_1.semver.minVersion(deps.react), ">=18.0.0");
|
135786
135817
|
};
|
135787
|
-
exports.isReact18 =
|
135818
|
+
exports.isReact18 = isReact182;
|
135788
135819
|
}
|
135789
135820
|
});
|
135790
135821
|
|
@@ -135971,6 +136002,7 @@ var require_dist2 = __commonJS({
|
|
135971
136002
|
};
|
135972
136003
|
Object.defineProperty(exports, "__esModule", { value: true });
|
135973
136004
|
__exportStar(require_compiled2(), exports);
|
136005
|
+
__exportStar(require_commands(), exports);
|
135974
136006
|
__exportStar(require_format2(), exports);
|
135975
136007
|
__exportStar(require_FileSizeReporter2(), exports);
|
135976
136008
|
__exportStar(require_printBuildError2(), exports);
|
@@ -136192,7 +136224,7 @@ var ZH_LOCALE = {
|
|
136192
136224
|
var EN_LOCALE = {
|
136193
136225
|
solution: {
|
136194
136226
|
self: "Please select the solution you want to create",
|
136195
|
-
mwa: "
|
136227
|
+
mwa: "Web App Solution",
|
136196
136228
|
module: "Module Solution",
|
136197
136229
|
monorepo: "Monorepo Solution",
|
136198
136230
|
custom: "Custom Solution",
|
@@ -136203,10 +136235,10 @@ var EN_LOCALE = {
|
|
136203
136235
|
},
|
136204
136236
|
sub_solution: {
|
136205
136237
|
self: "Please select the solution you want to create",
|
136206
|
-
mwa: "
|
136207
|
-
mwa_test: "
|
136238
|
+
mwa: "Web App Solution",
|
136239
|
+
mwa_test: "Web App Solution (Test)",
|
136208
136240
|
module: "Module Solution",
|
136209
|
-
inner_module: "Module Solution(Inner)",
|
136241
|
+
inner_module: "Module Solution (Inner)",
|
136210
136242
|
monorepo: "Monorepo Solution"
|
136211
136243
|
},
|
136212
136244
|
action: {
|
@@ -136323,6 +136355,7 @@ function fileExist(filePath) {
|
|
136323
136355
|
}
|
136324
136356
|
|
136325
136357
|
// ../../generator-utils/dist/js/modern/index.js
|
136358
|
+
var import_utils4 = __toESM(require_dist2());
|
136326
136359
|
var __async3 = (__this, __arguments, generator) => {
|
136327
136360
|
return new Promise((resolve, reject) => {
|
136328
136361
|
var fulfilled = (value) => {
|
@@ -136362,62 +136395,12 @@ function getModernConfigFile(appDir) {
|
|
136362
136395
|
|
136363
136396
|
// src/locale/zh.ts
|
136364
136397
|
var ZH_LOCALE2 = {
|
136365
|
-
|
136366
|
-
|
136367
|
-
import {pluginName} from '{pluginDependence}';
|
136368
|
-
|
136369
|
-
module.exports = {
|
136370
|
-
...,
|
136371
|
-
output: {
|
136372
|
-
...,
|
136373
|
-
ssg: true,
|
136374
|
-
},
|
136375
|
-
plugins: [..., {pluginName}()],
|
136376
|
-
};
|
136377
|
-
`,
|
136378
|
-
successTs: `安装插件依赖成功!请添加如下代码至 {configFile} 中:
|
136379
|
-
|
136380
|
-
import {pluginName} from '{pluginDependence}';
|
136381
|
-
|
136382
|
-
export default defineConfig({
|
136383
|
-
...,
|
136384
|
-
output: {
|
136385
|
-
...,
|
136386
|
-
ssg: true,
|
136387
|
-
},
|
136388
|
-
plugins: [..., {pluginName}()],
|
136389
|
-
});
|
136390
|
-
`
|
136398
|
+
success: `安装插件依赖成功!请添加如下代码至`
|
136391
136399
|
};
|
136392
136400
|
|
136393
136401
|
// src/locale/en.ts
|
136394
136402
|
var EN_LOCALE2 = {
|
136395
|
-
|
136396
|
-
|
136397
|
-
import {pluginName} from '{pluginDependence}';
|
136398
|
-
|
136399
|
-
module.exports = {
|
136400
|
-
...,
|
136401
|
-
output: {
|
136402
|
-
...,
|
136403
|
-
ssg: true,
|
136404
|
-
},
|
136405
|
-
plugins: [..., {pluginName}()],
|
136406
|
-
};
|
136407
|
-
`,
|
136408
|
-
successTs: `Plugin dependency installed successfully! Please add the following code to {configFile}:
|
136409
|
-
|
136410
|
-
import {pluginName} from '{pluginDependence}';
|
136411
|
-
|
136412
|
-
export default defineConfig({
|
136413
|
-
...,
|
136414
|
-
output: {
|
136415
|
-
...,
|
136416
|
-
ssg: true,
|
136417
|
-
},
|
136418
|
-
plugins: [..., {pluginName}()],
|
136419
|
-
});
|
136420
|
-
`
|
136403
|
+
success: `Plugin dependency installed successfully! Please add the following code to`
|
136421
136404
|
};
|
136422
136405
|
|
136423
136406
|
// src/locale/index.ts
|
@@ -136433,7 +136416,7 @@ var getGeneratorPath = (generator, distTag) => {
|
|
136433
136416
|
}
|
136434
136417
|
return generator;
|
136435
136418
|
};
|
136436
|
-
var handleTemplateFile = (context,
|
136419
|
+
var handleTemplateFile = (context, _generator, appApi) => __async(void 0, null, function* () {
|
136437
136420
|
yield appApi.runSubGenerator(
|
136438
136421
|
getGeneratorPath(DependenceGenerator, context.config.distTag),
|
136439
136422
|
void 0,
|
@@ -136461,16 +136444,42 @@ var src_default = (context, generator) => __async(void 0, null, function* () {
|
|
136461
136444
|
} else {
|
136462
136445
|
const appDir = context.materials.default.basePath;
|
136463
136446
|
const configFile = yield getModernConfigFile(appDir);
|
136464
|
-
|
136465
|
-
|
136466
|
-
|
136467
|
-
|
136468
|
-
|
136469
|
-
|
136470
|
-
|
136471
|
-
|
136472
|
-
|
136447
|
+
const isTS = configFile.endsWith("ts");
|
136448
|
+
const { pluginName, pluginDependence } = context.config;
|
136449
|
+
console.info(
|
136450
|
+
import_utils4.chalk.green(`
|
136451
|
+
[INFO]`),
|
136452
|
+
`${i18n2.t(localeKeys2.success)}`,
|
136453
|
+
import_utils4.chalk.yellow.bold(`${configFile}`),
|
136454
|
+
":",
|
136455
|
+
"\n"
|
136456
|
+
);
|
136457
|
+
console.info(
|
136458
|
+
import_utils4.chalk.yellow.bold(`import ${pluginName} from '${pluginDependence}';`)
|
136473
136459
|
);
|
136460
|
+
if (isTS) {
|
136461
|
+
console.info(`
|
136462
|
+
export default defineConfig({
|
136463
|
+
...,
|
136464
|
+
output: {
|
136465
|
+
...,
|
136466
|
+
${import_utils4.chalk.yellow.bold(`ssg: true`)},
|
136467
|
+
},
|
136468
|
+
plugins: [..., ${import_utils4.chalk.yellow.bold(`${pluginName}()`)}],
|
136469
|
+
});
|
136470
|
+
`);
|
136471
|
+
} else {
|
136472
|
+
console.info(`
|
136473
|
+
module.exports = {
|
136474
|
+
...,
|
136475
|
+
output: {
|
136476
|
+
...,
|
136477
|
+
${import_utils4.chalk.yellow.bold(`ssg: true`)},
|
136478
|
+
},
|
136479
|
+
plugins: [..., ${import_utils4.chalk.yellow.bold(`${pluginName}()`)}],
|
136480
|
+
};
|
136481
|
+
`);
|
136482
|
+
}
|
136474
136483
|
}
|
136475
136484
|
}
|
136476
136485
|
generator.logger.debug(`forge @modern-js/ssg-generator succeed `);
|