premanmcp 0.15.2 → 0.15.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/integrations.js +24 -5
- package/package.json +1 -1
package/bin/integrations.js
CHANGED
|
@@ -615,7 +615,9 @@ export async function onboardCommand(
|
|
|
615
615
|
// why they are looking at a login screen.
|
|
616
616
|
process.stdout.write("Opened PreMan \u2014 sign in with the account you just used.\n");
|
|
617
617
|
}
|
|
618
|
-
|
|
618
|
+
// Whether the app is on screen decides what the last line of the walk
|
|
619
|
+
// should say, and only this closure knows.
|
|
620
|
+
return { ...installed, appOpened: opened.state !== "not-installed" };
|
|
619
621
|
} finally {
|
|
620
622
|
stopOpening?.();
|
|
621
623
|
}
|
|
@@ -665,10 +667,18 @@ export async function onboardCommand(
|
|
|
665
667
|
}
|
|
666
668
|
|
|
667
669
|
try {
|
|
668
|
-
// A step that caught its own failure and already explained it says so
|
|
669
|
-
//
|
|
670
|
+
// A step that caught its own failure and already explained it says so; a step
|
|
671
|
+
// with nothing to do says that; anything else that returns is done.
|
|
672
|
+
//
|
|
673
|
+
// Translated rather than spread over, because the summary knows three words
|
|
674
|
+
// and a step may report any of its own. Spreading put `Desktop app: undefined`
|
|
675
|
+
// at the end of a successful install: the install reports state "installed",
|
|
676
|
+
// which is none of the three, so it printed as a failure with no detail.
|
|
670
677
|
const reported = await step.run();
|
|
671
|
-
|
|
678
|
+
const state =
|
|
679
|
+
{ failed: "failed", skipped: "skipped", unsupported: "skipped" }[reported?.state] ||
|
|
680
|
+
"done";
|
|
681
|
+
outcome.set(step.name, { ...(reported || {}), state });
|
|
672
682
|
} catch (err) {
|
|
673
683
|
// Report and carry on: a failed Slack install must not cost the customer
|
|
674
684
|
// the AWS connection they just finished.
|
|
@@ -687,7 +697,16 @@ export async function onboardCommand(
|
|
|
687
697
|
else if (result.state === "skipped") process.stdout.write(`${MARK.skip()} ${step.name} (skipped)\n`);
|
|
688
698
|
else process.stdout.write(`${MARK.fail()} ${step.name}: ${result.detail}\n`);
|
|
689
699
|
}
|
|
690
|
-
|
|
700
|
+
// The app is on screen by the time this prints, so telling them to go and open
|
|
701
|
+
// a website is a step backwards. The website still earns its mention -- it is
|
|
702
|
+
// the way in from a machine that has no app, and the account is the same one --
|
|
703
|
+
// but as an alternative, not as the next thing to do.
|
|
704
|
+
const appOpened = outcome.get("Desktop app")?.appOpened === true;
|
|
705
|
+
process.stdout.write(
|
|
706
|
+
appOpened
|
|
707
|
+
? `\nPreMan is open. You can also sign in at ${frontendUrl(args)}.\n`
|
|
708
|
+
: `\nOpen ${frontendUrl(args)} to see your logs and endpoints.\n`
|
|
709
|
+
);
|
|
691
710
|
}
|
|
692
711
|
|
|
693
712
|
export const INTEGRATIONS_HELP = `
|