@solidactions/cli 0.2.1 → 0.2.3
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.
|
@@ -35,8 +35,12 @@ async function envList(projectName, options = {}) {
|
|
|
35
35
|
try {
|
|
36
36
|
if (projectName) {
|
|
37
37
|
// List project variable mappings
|
|
38
|
-
|
|
39
|
-
const
|
|
38
|
+
const environment = options.env || 'dev';
|
|
39
|
+
const projectSlug = environment === 'production'
|
|
40
|
+
? projectName
|
|
41
|
+
: `${projectName}-${environment}`;
|
|
42
|
+
console.log(chalk_1.default.blue(`Environment variables for project "${projectName}" (${environment}):`));
|
|
43
|
+
const response = await axios_1.default.get(`${config.host}/api/v1/projects/${projectSlug}/variable-mappings`, {
|
|
40
44
|
headers: {
|
|
41
45
|
'Authorization': `Bearer ${config.apiKey}`,
|
|
42
46
|
'Accept': 'application/json',
|
|
@@ -164,7 +168,7 @@ async function envList(projectName, options = {}) {
|
|
|
164
168
|
console.error(chalk_1.default.red('Authentication failed. Run "solidactions init <api-key>" to re-configure.'));
|
|
165
169
|
}
|
|
166
170
|
else if (error.response.status === 404) {
|
|
167
|
-
console.error(chalk_1.default.red(projectName ? `Project "${projectName}" not found.` : 'Resource not found.'));
|
|
171
|
+
console.error(chalk_1.default.red(projectName ? `Project "${projectName}" not found for the specified environment.` : 'Resource not found.'));
|
|
168
172
|
}
|
|
169
173
|
else {
|
|
170
174
|
console.error(chalk_1.default.red(`Failed: ${error.response.status}`), error.response.data);
|