You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this.log('\nPlease append the "--disable" flag to the command in case you prefer to disable analytics, or use the "--enable" flag if you want to enable analytics back again. In case you do not know the analytics current status, then you can append the "--status" flag to be aware of it.\n');
30
+
this.log(`\nPlease append the ${blueBright('--disable')} flag to the command if you prefer to disable analytics, or use the ${blueBright('--enable')} flag if you want to enable analytics again. To check the current analytics status, use the ${blueBright('--status')} flag.\n`);
this.error(`Unable to access the analytics configuration file. We tried to access the ".asyncapi-analytics" file in in the path "${analyticsConfigFile}" but the file could not be found.`);
46
+
this.error(`Unable to access the analytics configuration file. We tried to access the ${blueBright('.asyncapi-analytics')} file in the path "${blueBright(analyticsConfigFile)}" but the file could not be found.`);
46
47
break;
47
48
case'EEXIST':
48
-
this.error(`Unable to update the analytics configuration file. We tried to update your ".asyncapi-analytics" file in the path "${analyticsConfigFile}" but the file does not exist.`);
49
+
this.error(`Unable to update the analytics configuration file. We tried to update your ".asyncapi-analytics" file in the path "${blueBright(analyticsConfigFile)}" but the file does not exist.`);
49
50
break;
50
51
default:
51
-
this.error(`Unable to change your analytics configuration. Please check the following message for further info about the error:\n\n${e}`);
52
+
this.error(`Unable to change your analytics configuration. Please check the following message for further info about the error:\n\n${redBright(e)}`);
`Added context "${contextName}".\n\nYou can set it as your current context: asyncapi config context use ${contextName}\nYou can use this context when needed by passing ${contextName} as a parameter: asyncapi validate ${contextName}`
29
-
);
30
-
28
+
this.log(`🎉 Context ${blueBright(contextName)} added successfully!\nYou can set it as your current context:\n ${blueBright('asyncapi')}${blueBright('config')}${blueBright('context')}${blueBright('use')}${blueBright(contextName)}\nYou can use this context when needed by passing ${blueBright(contextName)} as a parameter:\n ${blueBright('asyncapi')}${blueBright('validate')}${blueBright(contextName)}`);
31
29
if(setAsCurrent){
32
30
awaitsetCurrentContext(contextName);
33
-
this.log(
34
-
`The newly added context "${contextName}", is set as your current context!`
35
-
);
31
+
this.log(`\nThe newly added context, ${blueBright(contextName)}, is set as your current context!`);
'You have no context file configured. Run "asyncapi config context init" to initialize it.'
26
-
);
27
-
return;
25
+
this.error(`Unable to show current context. You have no context file configured.\nRun ${blueBright('asyncapi config context init')} to initialize it.`);
28
26
}elseif(einstanceofContextFileEmptyError){
29
-
this.log(`Context file "${CONTEXT_FILE_PATH}" is empty.`);
30
-
return;
27
+
this.error(`Context file ${blueBright(CONTEXT_FILE_PATH)} is empty.`);
31
28
}elseif(
32
29
einstanceofContextNotFoundError||
33
30
(fileContent&&!fileContent.current)
34
31
){
35
-
this.log(
36
-
'No context is set as current. Run "asyncapi config context" to see all available options.'
37
-
);
38
-
return;
32
+
this.error(`No context is set as current.\nRun ${blueBright('asyncapi config context')} to see all available options.`);
`Edited context "${contextName}".\n\nYou can set it as your current context: asyncapi config context use ${contextName}\nYou can use this context when needed by passing ${contextName} as a parameter: asyncapi validate ${contextName}`
28
-
);
27
+
this.log(`🎉 Context ${blueBright(contextName)} edited successfully!\nYou can set it as your current context:\n ${blueBright('asyncapi')}${blueBright('config')}${blueBright('context')}${blueBright('use')}${blueBright(contextName)}\nYou can use this context when needed by passing ${blueBright(contextName)} as a parameter:\n ${blueBright('asyncapi')}${blueBright('validate')}${blueBright(contextName)}`);
'You have no context file configured. Run "asyncapi config context init" to initialize it.'
32
-
);
33
-
return;
31
+
this.error(`Unable to set the current context. You have no context file configured.\nRun ${blueBright('asyncapi config context init')} to initialize it.`);
34
32
}elseif(einstanceofContextFileEmptyError){
35
-
this.log(`Context file "${CONTEXT_FILE_PATH}" is empty.`);
33
+
this.error(`Context file ${blueBright(CONTEXT_FILE_PATH)} is empty.`);
0 commit comments