adhdev 0.1.17 → 0.1.18
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 +0 -41
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -519,7 +519,6 @@ async function runWizard(options = {}) {
|
|
|
519
519
|
message: "What would you like to do?",
|
|
520
520
|
choices: [
|
|
521
521
|
{ name: "\u{1F504} Reconfigure (run setup again)", value: "reconfigure" },
|
|
522
|
-
{ name: "\u2795 Add more extensions", value: "add-extensions" },
|
|
523
522
|
{ name: "\u{1F527} Install/Update CLI (adhdev command)", value: "install-cli" },
|
|
524
523
|
{ name: "\u{1F510} Re-login", value: "relogin" },
|
|
525
524
|
{ name: "\u274C Exit", value: "exit" }
|
|
@@ -527,10 +526,6 @@ async function runWizard(options = {}) {
|
|
|
527
526
|
}
|
|
528
527
|
]);
|
|
529
528
|
if (action === "exit") return;
|
|
530
|
-
if (action === "add-extensions") {
|
|
531
|
-
await addExtensionsFlow();
|
|
532
|
-
return;
|
|
533
|
-
}
|
|
534
529
|
if (action === "relogin") {
|
|
535
530
|
await loginFlow();
|
|
536
531
|
return;
|
|
@@ -873,42 +868,6 @@ async function injectTokenToIDE(ide, connectionToken) {
|
|
|
873
868
|
console.log(import_chalk.default.gray(` You can set it manually: adhdev.connectionToken = ${connectionToken}`));
|
|
874
869
|
}
|
|
875
870
|
}
|
|
876
|
-
async function addExtensionsFlow() {
|
|
877
|
-
const config = loadConfig();
|
|
878
|
-
const ides = await detectIDEs();
|
|
879
|
-
const selectedIDE = ides.find((i) => i.id === config.selectedIde);
|
|
880
|
-
if (!selectedIDE || !selectedIDE.installed) {
|
|
881
|
-
console.log(import_chalk.default.yellow("\u26A0 Previously selected IDE not found."));
|
|
882
|
-
return;
|
|
883
|
-
}
|
|
884
|
-
const aiExtensions = getAIExtensions();
|
|
885
|
-
const notInstalled = aiExtensions.filter((e) => !config.installedExtensions.includes(e.id));
|
|
886
|
-
if (notInstalled.length === 0) {
|
|
887
|
-
console.log(import_chalk.default.green("\u2713 All extensions already installed!"));
|
|
888
|
-
return;
|
|
889
|
-
}
|
|
890
|
-
const { selectedExtIds } = await import_inquirer.default.prompt([
|
|
891
|
-
{
|
|
892
|
-
type: "checkbox",
|
|
893
|
-
name: "selectedExtIds",
|
|
894
|
-
message: "Select extensions to install:",
|
|
895
|
-
choices: notInstalled.map((ext) => ({
|
|
896
|
-
name: `${ext.icon} ${ext.displayName}`,
|
|
897
|
-
value: ext.id
|
|
898
|
-
}))
|
|
899
|
-
}
|
|
900
|
-
]);
|
|
901
|
-
if (selectedExtIds.length === 0) return;
|
|
902
|
-
const extensions = notInstalled.filter((e) => selectedExtIds.includes(e.id));
|
|
903
|
-
await installExtensions(selectedIDE, extensions, (current, total, ext, result) => {
|
|
904
|
-
const status = result.success ? import_chalk.default.green("installed \u2713") : import_chalk.default.red("failed \u2717");
|
|
905
|
-
console.log(` [${current}/${total}] ${ext.icon} ${ext.displayName} \u2014 ${status}`);
|
|
906
|
-
});
|
|
907
|
-
updateConfig({
|
|
908
|
-
installedExtensions: [...config.installedExtensions, ...selectedExtIds]
|
|
909
|
-
});
|
|
910
|
-
console.log(import_chalk.default.green("\n\u2713 Extensions added!"));
|
|
911
|
-
}
|
|
912
871
|
async function installCliOnly() {
|
|
913
872
|
const { execSync: execSyncLocal } = await import("child_process");
|
|
914
873
|
let currentVersion = null;
|