devwing 0.1.11 → 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 +16 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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",
|
|
@@ -2935,6 +2933,10 @@ var InteractiveSession = class {
|
|
|
2935
2933
|
console.log(
|
|
2936
2934
|
` ${chalk7.bold("Auth")} ${chalk7.green("\u25CF")} ${name} ${planColor(`(${plan})`)}`
|
|
2937
2935
|
);
|
|
2936
|
+
} else if (this.isAuthenticated) {
|
|
2937
|
+
console.log(
|
|
2938
|
+
` ${chalk7.bold("Auth")} ${chalk7.green("\u25CF")} Authenticated ${chalk7.dim("(offline)")}`
|
|
2939
|
+
);
|
|
2938
2940
|
} else {
|
|
2939
2941
|
console.log(
|
|
2940
2942
|
` ${chalk7.bold("Auth")} ${chalk7.red("\u25CF")} Not logged in ${chalk7.dim("\u2014 type /login")}`
|
|
@@ -2997,15 +2999,21 @@ var InteractiveSession = class {
|
|
|
2997
2999
|
async checkAuthStatus() {
|
|
2998
3000
|
try {
|
|
2999
3001
|
const apiKey = await configManager.getApiKey();
|
|
3000
|
-
if (
|
|
3001
|
-
if (
|
|
3002
|
+
if (this.isDemo) {
|
|
3003
|
+
if (apiKey) {
|
|
3002
3004
|
this.isAuthenticated = true;
|
|
3003
3005
|
this.userProfile = { ...DEMO_USER2 };
|
|
3004
|
-
} else {
|
|
3005
|
-
const profile = await apiClient.getProfile();
|
|
3006
|
-
this.isAuthenticated = true;
|
|
3007
|
-
this.userProfile = profile;
|
|
3008
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;
|
|
3009
3017
|
}
|
|
3010
3018
|
} catch {
|
|
3011
3019
|
this.isAuthenticated = false;
|