@sylphx/cli 0.1.4 → 0.1.5
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 +10 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var import_commander16 = require("commander");
|
|
|
30
30
|
// package.json
|
|
31
31
|
var package_default = {
|
|
32
32
|
name: "@sylphx/cli",
|
|
33
|
-
version: "0.1.
|
|
33
|
+
version: "0.1.5",
|
|
34
34
|
description: "Sylphx Platform CLI \u2014 deploy, manage logs, env vars, and more",
|
|
35
35
|
type: "commonjs",
|
|
36
36
|
bin: {
|
|
@@ -228,9 +228,14 @@ var api = {
|
|
|
228
228
|
},
|
|
229
229
|
/** List env vars for a project environment */
|
|
230
230
|
async listEnvVars(projectId, envType) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
const res = await request(
|
|
232
|
+
"GET",
|
|
233
|
+
`/projects/${projectId}/env-vars`,
|
|
234
|
+
{
|
|
235
|
+
query: { envType }
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
return Array.isArray(res) ? res : res.data ?? [];
|
|
234
239
|
},
|
|
235
240
|
/** Set an env var (or batch of vars) for a project environment */
|
|
236
241
|
async setEnvVar(projectId, key, value, envType, secret) {
|
|
@@ -1450,7 +1455,7 @@ var projectsListCommand = new import_commander11.Command("list").description("Li
|
|
|
1450
1455
|
);
|
|
1451
1456
|
console.log(import_chalk12.default.dim(` ${"\u2500".repeat(colSlug + colName + 30)}`));
|
|
1452
1457
|
for (const p of projects) {
|
|
1453
|
-
const envNames = p.environments && p.environments.length > 0 ? p.environments.map((e) => e.
|
|
1458
|
+
const envNames = p.environments && p.environments.length > 0 ? p.environments.map((e) => e.name || e.envType || e.id).join(", ") : import_chalk12.default.dim("\u2014");
|
|
1454
1459
|
console.log(
|
|
1455
1460
|
` ${import_chalk12.default.cyan(p.slug.padEnd(colSlug))} ${p.name.padEnd(colName)} ${envNames}`
|
|
1456
1461
|
);
|