devwing 0.1.12 → 0.1.13

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 CHANGED
@@ -2152,8 +2152,6 @@ async function demoLoginCommand() {
2152
2152
  return;
2153
2153
  }
2154
2154
  }
2155
- logger.printBanner();
2156
- logger.newline();
2157
2155
  const { method } = await inquirer5.prompt([
2158
2156
  {
2159
2157
  type: "list",
@@ -3001,23 +2999,21 @@ var InteractiveSession = class {
3001
2999
  async checkAuthStatus() {
3002
3000
  try {
3003
3001
  const apiKey = await configManager.getApiKey();
3004
- if (!apiKey) {
3005
- this.isAuthenticated = false;
3006
- this.userProfile = null;
3007
- return;
3008
- }
3009
3002
  if (this.isDemo) {
3010
- this.isAuthenticated = true;
3011
- this.userProfile = { ...DEMO_USER2 };
3012
- } else {
3013
- try {
3014
- const profile = await apiClient.getProfile();
3003
+ if (apiKey) {
3015
3004
  this.isAuthenticated = true;
3016
- this.userProfile = profile;
3017
- } catch {
3018
- this.isAuthenticated = true;
3019
- this.userProfile = null;
3005
+ this.userProfile = { ...DEMO_USER2 };
3020
3006
  }
3007
+ return;
3008
+ }
3009
+ if (!apiKey) return;
3010
+ try {
3011
+ const profile = await apiClient.getProfile();
3012
+ this.isAuthenticated = true;
3013
+ this.userProfile = profile;
3014
+ } catch {
3015
+ this.isAuthenticated = true;
3016
+ this.userProfile = null;
3021
3017
  }
3022
3018
  } catch {
3023
3019
  this.isAuthenticated = false;