@stackable-labs/cli-app-extension 1.100.1 → 1.102.0
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 +6 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3732,6 +3732,10 @@ var performCLIOAuthFlow = async ({ dashboardUrl, adminApiBaseUrl }) => {
|
|
|
3732
3732
|
await writeAuthState(authState);
|
|
3733
3733
|
return { authState, loginUrl };
|
|
3734
3734
|
};
|
|
3735
|
+
var AUTH_LOGIN_REASON = {
|
|
3736
|
+
NOT_LOGGED_IN: "not-logged-in",
|
|
3737
|
+
EXPIRED: "expired"
|
|
3738
|
+
};
|
|
3735
3739
|
var AuthLogin = ({ dashboardUrl, adminApiBaseUrl, reason, onSuccess, onError }) => {
|
|
3736
3740
|
const { exit } = useApp();
|
|
3737
3741
|
const [state, setState] = useState("waiting");
|
|
@@ -3772,7 +3776,7 @@ var AuthLogin = ({ dashboardUrl, adminApiBaseUrl, reason, onSuccess, onError })
|
|
|
3772
3776
|
!reason && /* @__PURE__ */ jsx(Banner, {}),
|
|
3773
3777
|
/* @__PURE__ */ jsxs(StepShell, { title: "Authenticate with Stackable", children: [
|
|
3774
3778
|
state === "waiting" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3775
|
-
reason && /* @__PURE__ */ jsx(Box, { marginBottom: 1, children: /* @__PURE__ */ jsx(Text, { color: "yellow", children: reason ===
|
|
3779
|
+
reason && /* @__PURE__ */ jsx(Box, { marginBottom: 1, children: /* @__PURE__ */ jsx(Text, { color: "yellow", children: reason === AUTH_LOGIN_REASON.EXPIRED ? "Session expired \u2014 re-authenticating before continuing\u2026" : "Not signed in \u2014 opening browser to authenticate\u2026" }) }),
|
|
3776
3780
|
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", gap: 1, children: [
|
|
3777
3781
|
/* @__PURE__ */ jsxs(Box, { gap: 1, children: [
|
|
3778
3782
|
/* @__PURE__ */ jsx(Text, { color: "cyan", children: /* @__PURE__ */ jsx(Spinner5, { type: "dots" }) }),
|
|
@@ -3936,7 +3940,7 @@ var ensureToken = async () => {
|
|
|
3936
3940
|
{
|
|
3937
3941
|
dashboardUrl: DASHBOARD_URL,
|
|
3938
3942
|
adminApiBaseUrl: getAdminApiBaseUrl(),
|
|
3939
|
-
reason: isExpired ?
|
|
3943
|
+
reason: isExpired ? AUTH_LOGIN_REASON.EXPIRED : AUTH_LOGIN_REASON.NOT_LOGGED_IN,
|
|
3940
3944
|
onSuccess: (authState) => {
|
|
3941
3945
|
recoveredState = authState;
|
|
3942
3946
|
},
|