dlw-machine-setup 0.9.2 → 0.9.3
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/bin/installer.js +110 -38
- package/package.json +1 -1
package/bin/installer.js
CHANGED
|
@@ -1612,14 +1612,14 @@ var require_lib = __commonJS({
|
|
|
1612
1612
|
var require_ansi_escapes = __commonJS({
|
|
1613
1613
|
"node_modules/ansi-escapes/index.js"(exports2, module2) {
|
|
1614
1614
|
"use strict";
|
|
1615
|
-
var
|
|
1616
|
-
module2.exports.default =
|
|
1615
|
+
var ansiEscapes5 = module2.exports;
|
|
1616
|
+
module2.exports.default = ansiEscapes5;
|
|
1617
1617
|
var ESC = "\x1B[";
|
|
1618
1618
|
var OSC = "\x1B]";
|
|
1619
1619
|
var BEL = "\x07";
|
|
1620
1620
|
var SEP = ";";
|
|
1621
1621
|
var isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
|
|
1622
|
-
|
|
1622
|
+
ansiEscapes5.cursorTo = (x, y) => {
|
|
1623
1623
|
if (typeof x !== "number") {
|
|
1624
1624
|
throw new TypeError("The `x` argument is required");
|
|
1625
1625
|
}
|
|
@@ -1628,7 +1628,7 @@ var require_ansi_escapes = __commonJS({
|
|
|
1628
1628
|
}
|
|
1629
1629
|
return ESC + (y + 1) + ";" + (x + 1) + "H";
|
|
1630
1630
|
};
|
|
1631
|
-
|
|
1631
|
+
ansiEscapes5.cursorMove = (x, y) => {
|
|
1632
1632
|
if (typeof x !== "number") {
|
|
1633
1633
|
throw new TypeError("The `x` argument is required");
|
|
1634
1634
|
}
|
|
@@ -1645,46 +1645,46 @@ var require_ansi_escapes = __commonJS({
|
|
|
1645
1645
|
}
|
|
1646
1646
|
return ret;
|
|
1647
1647
|
};
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1648
|
+
ansiEscapes5.cursorUp = (count = 1) => ESC + count + "A";
|
|
1649
|
+
ansiEscapes5.cursorDown = (count = 1) => ESC + count + "B";
|
|
1650
|
+
ansiEscapes5.cursorForward = (count = 1) => ESC + count + "C";
|
|
1651
|
+
ansiEscapes5.cursorBackward = (count = 1) => ESC + count + "D";
|
|
1652
|
+
ansiEscapes5.cursorLeft = ESC + "G";
|
|
1653
|
+
ansiEscapes5.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
|
|
1654
|
+
ansiEscapes5.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
|
|
1655
|
+
ansiEscapes5.cursorGetPosition = ESC + "6n";
|
|
1656
|
+
ansiEscapes5.cursorNextLine = ESC + "E";
|
|
1657
|
+
ansiEscapes5.cursorPrevLine = ESC + "F";
|
|
1658
|
+
ansiEscapes5.cursorHide = ESC + "?25l";
|
|
1659
|
+
ansiEscapes5.cursorShow = ESC + "?25h";
|
|
1660
|
+
ansiEscapes5.eraseLines = (count) => {
|
|
1661
1661
|
let clear = "";
|
|
1662
1662
|
for (let i = 0; i < count; i++) {
|
|
1663
|
-
clear +=
|
|
1663
|
+
clear += ansiEscapes5.eraseLine + (i < count - 1 ? ansiEscapes5.cursorUp() : "");
|
|
1664
1664
|
}
|
|
1665
1665
|
if (count) {
|
|
1666
|
-
clear +=
|
|
1666
|
+
clear += ansiEscapes5.cursorLeft;
|
|
1667
1667
|
}
|
|
1668
1668
|
return clear;
|
|
1669
1669
|
};
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1670
|
+
ansiEscapes5.eraseEndLine = ESC + "K";
|
|
1671
|
+
ansiEscapes5.eraseStartLine = ESC + "1K";
|
|
1672
|
+
ansiEscapes5.eraseLine = ESC + "2K";
|
|
1673
|
+
ansiEscapes5.eraseDown = ESC + "J";
|
|
1674
|
+
ansiEscapes5.eraseUp = ESC + "1J";
|
|
1675
|
+
ansiEscapes5.eraseScreen = ESC + "2J";
|
|
1676
|
+
ansiEscapes5.scrollUp = ESC + "S";
|
|
1677
|
+
ansiEscapes5.scrollDown = ESC + "T";
|
|
1678
|
+
ansiEscapes5.clearScreen = "\x1Bc";
|
|
1679
|
+
ansiEscapes5.clearTerminal = process.platform === "win32" ? `${ansiEscapes5.eraseScreen}${ESC}0f` : (
|
|
1680
1680
|
// 1. Erases the screen (Only done in case `2` is not supported)
|
|
1681
1681
|
// 2. Erases the whole screen including scrollback buffer
|
|
1682
1682
|
// 3. Moves cursor to the top-left position
|
|
1683
1683
|
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
1684
|
-
`${
|
|
1684
|
+
`${ansiEscapes5.eraseScreen}${ESC}3J${ESC}H`
|
|
1685
1685
|
);
|
|
1686
|
-
|
|
1687
|
-
|
|
1686
|
+
ansiEscapes5.beep = BEL;
|
|
1687
|
+
ansiEscapes5.link = (text, url) => {
|
|
1688
1688
|
return [
|
|
1689
1689
|
OSC,
|
|
1690
1690
|
"8",
|
|
@@ -1700,7 +1700,7 @@ var require_ansi_escapes = __commonJS({
|
|
|
1700
1700
|
BEL
|
|
1701
1701
|
].join("");
|
|
1702
1702
|
};
|
|
1703
|
-
|
|
1703
|
+
ansiEscapes5.image = (buffer, options = {}) => {
|
|
1704
1704
|
let ret = `${OSC}1337;File=inline=1`;
|
|
1705
1705
|
if (options.width) {
|
|
1706
1706
|
ret += `;width=${options.width}`;
|
|
@@ -1713,7 +1713,7 @@ var require_ansi_escapes = __commonJS({
|
|
|
1713
1713
|
}
|
|
1714
1714
|
return ret + ":" + buffer.toString("base64") + BEL;
|
|
1715
1715
|
};
|
|
1716
|
-
|
|
1716
|
+
ansiEscapes5.iTerm = {
|
|
1717
1717
|
setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
|
1718
1718
|
annotation: (message, options = {}) => {
|
|
1719
1719
|
let ret = `${OSC}1337;`;
|
|
@@ -3103,9 +3103,60 @@ var esm_default4 = createPrompt((config, done) => {
|
|
|
3103
3103
|
];
|
|
3104
3104
|
});
|
|
3105
3105
|
|
|
3106
|
+
// node_modules/@inquirer/password/dist/esm/index.mjs
|
|
3107
|
+
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
|
3108
|
+
var esm_default5 = createPrompt((config, done) => {
|
|
3109
|
+
const { validate = () => true } = config;
|
|
3110
|
+
const theme = makeTheme(config.theme);
|
|
3111
|
+
const [status, setStatus] = useState("pending");
|
|
3112
|
+
const [errorMsg, setError] = useState();
|
|
3113
|
+
const [value, setValue] = useState("");
|
|
3114
|
+
const isLoading = status === "loading";
|
|
3115
|
+
const prefix = usePrefix({ isLoading, theme });
|
|
3116
|
+
useKeypress(async (key, rl) => {
|
|
3117
|
+
if (status !== "pending") {
|
|
3118
|
+
return;
|
|
3119
|
+
}
|
|
3120
|
+
if (isEnterKey(key)) {
|
|
3121
|
+
const answer = value;
|
|
3122
|
+
setStatus("loading");
|
|
3123
|
+
const isValid = await validate(answer);
|
|
3124
|
+
if (isValid === true) {
|
|
3125
|
+
setValue(answer);
|
|
3126
|
+
setStatus("done");
|
|
3127
|
+
done(answer);
|
|
3128
|
+
} else {
|
|
3129
|
+
rl.write(value);
|
|
3130
|
+
setError(isValid || "You must provide a valid value");
|
|
3131
|
+
setStatus("pending");
|
|
3132
|
+
}
|
|
3133
|
+
} else {
|
|
3134
|
+
setValue(rl.line);
|
|
3135
|
+
setError(void 0);
|
|
3136
|
+
}
|
|
3137
|
+
});
|
|
3138
|
+
const message = theme.style.message(config.message);
|
|
3139
|
+
let formattedValue = "";
|
|
3140
|
+
let helpTip;
|
|
3141
|
+
if (config.mask) {
|
|
3142
|
+
const maskChar = typeof config.mask === "string" ? config.mask : "*";
|
|
3143
|
+
formattedValue = maskChar.repeat(value.length);
|
|
3144
|
+
} else if (status !== "done") {
|
|
3145
|
+
helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes3.default.cursorHide}`;
|
|
3146
|
+
}
|
|
3147
|
+
if (status === "done") {
|
|
3148
|
+
formattedValue = theme.style.answer(formattedValue);
|
|
3149
|
+
}
|
|
3150
|
+
let error = "";
|
|
3151
|
+
if (errorMsg) {
|
|
3152
|
+
error = theme.style.error(errorMsg);
|
|
3153
|
+
}
|
|
3154
|
+
return [[prefix, message, config.mask ? formattedValue : helpTip].join(" "), error];
|
|
3155
|
+
});
|
|
3156
|
+
|
|
3106
3157
|
// node_modules/@inquirer/select/dist/esm/index.mjs
|
|
3107
3158
|
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
|
3108
|
-
var
|
|
3159
|
+
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
|
3109
3160
|
var selectTheme = {
|
|
3110
3161
|
icon: { cursor: esm_default.pointer },
|
|
3111
3162
|
style: {
|
|
@@ -3139,7 +3190,7 @@ function normalizeChoices2(choices) {
|
|
|
3139
3190
|
};
|
|
3140
3191
|
});
|
|
3141
3192
|
}
|
|
3142
|
-
var
|
|
3193
|
+
var esm_default6 = createPrompt((config, done) => {
|
|
3143
3194
|
const { loop = true, pageSize = 7 } = config;
|
|
3144
3195
|
const firstRender = useRef(true);
|
|
3145
3196
|
const theme = makeTheme(selectTheme, config.theme);
|
|
@@ -3240,7 +3291,7 @@ ${theme.style.help("(Use arrow keys to reveal more choices)")}`;
|
|
|
3240
3291
|
const choiceDescription = selectedChoice.description ? `
|
|
3241
3292
|
${theme.style.description(selectedChoice.description)}` : ``;
|
|
3242
3293
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
|
3243
|
-
${page}${helpTipBottom}${choiceDescription}${
|
|
3294
|
+
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes4.default.cursorHide}`;
|
|
3244
3295
|
});
|
|
3245
3296
|
|
|
3246
3297
|
// src/index.ts
|
|
@@ -5821,7 +5872,7 @@ async function collectInputs(options, releaseVersion, factoryAvailable = false,
|
|
|
5821
5872
|
loop: false
|
|
5822
5873
|
});
|
|
5823
5874
|
const selectedTechnologies = options.technologies.filter((p) => selectedIds.includes(p.id));
|
|
5824
|
-
const agent = await
|
|
5875
|
+
const agent = await esm_default6({
|
|
5825
5876
|
message: "AI coding tool:",
|
|
5826
5877
|
choices: options.agents,
|
|
5827
5878
|
loop: false
|
|
@@ -5844,6 +5895,27 @@ async function collectInputs(options, releaseVersion, factoryAvailable = false,
|
|
|
5844
5895
|
}
|
|
5845
5896
|
}
|
|
5846
5897
|
}
|
|
5898
|
+
if (mcpConfig["sap_mcp_server"]) {
|
|
5899
|
+
const sapUser = (await esm_default4({
|
|
5900
|
+
message: "SAP MCP (ABAP F4P) username (leave empty to skip):"
|
|
5901
|
+
})).trim();
|
|
5902
|
+
if (sapUser === "") {
|
|
5903
|
+
delete mcpConfig["sap_mcp_server"];
|
|
5904
|
+
} else {
|
|
5905
|
+
const sapPassword = await esm_default5({
|
|
5906
|
+
message: "SAP MCP (ABAP F4P) password:",
|
|
5907
|
+
mask: "*"
|
|
5908
|
+
});
|
|
5909
|
+
if (sapPassword === "") {
|
|
5910
|
+
delete mcpConfig["sap_mcp_server"];
|
|
5911
|
+
} else {
|
|
5912
|
+
const encoded = Buffer.from(`${sapUser}:${sapPassword}`).toString("base64");
|
|
5913
|
+
if (mcpConfig["sap_mcp_server"].installCommand) {
|
|
5914
|
+
mcpConfig["sap_mcp_server"].installCommand = mcpConfig["sap_mcp_server"].installCommand.replace(/__SAP_MCP_AUTH__/g, encoded);
|
|
5915
|
+
}
|
|
5916
|
+
}
|
|
5917
|
+
}
|
|
5918
|
+
}
|
|
5847
5919
|
const projectInput = await esm_default4({
|
|
5848
5920
|
message: "Project directory:",
|
|
5849
5921
|
default: (0, import_path16.resolve)(process.cwd())
|