@jtl-software/create-cloud-app 0.0.19 → 0.0.21
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 +10 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -456,6 +456,7 @@ async function acquireAccessToken(opts) {
|
|
|
456
456
|
authorizeUrl.searchParams.set("state", state);
|
|
457
457
|
authorizeUrl.searchParams.set("code_challenge", pkce.challenge);
|
|
458
458
|
authorizeUrl.searchParams.set("code_challenge_method", "S256");
|
|
459
|
+
authorizeUrl.searchParams.set("prompt", "login");
|
|
459
460
|
spinner3?.start("Waiting for browser login");
|
|
460
461
|
try {
|
|
461
462
|
const { code, verifier } = await captureAuthCode(
|
|
@@ -769,17 +770,18 @@ function buildHubInstallUrl(hubHost, tenantSlug, appId) {
|
|
|
769
770
|
function buildHubAppOverviewUrl(hubHost, tenantSlug) {
|
|
770
771
|
return `${hubHost}/${tenantSlug}/admin/app-overview?tab=development-apps`;
|
|
771
772
|
}
|
|
773
|
+
function terminalLink(url, text2 = url) {
|
|
774
|
+
const OSC = "\x1B]";
|
|
775
|
+
const ST = "\x1B\\";
|
|
776
|
+
return `${OSC}8;;${url}${ST}${text2}${OSC}8;;${ST}`;
|
|
777
|
+
}
|
|
772
778
|
function printHubLink(hubHost, tenantSlug, appId, isInstalled) {
|
|
773
779
|
if (isInstalled) {
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
"Already installed \u2014 open in Hub"
|
|
777
|
-
);
|
|
780
|
+
const url = buildHubAppOverviewUrl(hubHost, tenantSlug);
|
|
781
|
+
p.note(pc.cyan(terminalLink(url)), "Already installed \u2014 open in Hub");
|
|
778
782
|
} else {
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
"Install in Hub"
|
|
782
|
-
);
|
|
783
|
+
const url = buildHubInstallUrl(hubHost, tenantSlug, appId);
|
|
784
|
+
p.note(pc.cyan(terminalLink(url)), "Install in Hub");
|
|
783
785
|
}
|
|
784
786
|
}
|
|
785
787
|
function credentialLabels(backend) {
|