@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.
Files changed (2) hide show
  1. package/dist/index.js +10 -5
  2. 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.4",
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
- return request("GET", `/projects/${projectId}/env-vars`, {
232
- query: { envType }
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.slug).join(", ") : import_chalk12.default.dim("\u2014");
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
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sylphx/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Sylphx Platform CLI — deploy, manage logs, env vars, and more",
5
5
  "type": "commonjs",
6
6
  "bin": {