@catladder/cli 1.93.0 → 1.94.0

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/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "node": ">=12.0.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@catladder/pipeline": "1.93.0",
27
+ "@catladder/pipeline": "1.94.0",
28
28
  "@kubernetes/client-node": "^0.16.2",
29
29
  "@tsconfig/node14": "^1.0.1",
30
30
  "@types/common-tags": "^1.8.0",
@@ -57,5 +57,5 @@
57
57
  "typescript": "^4.5.4",
58
58
  "vorpal": "^1.12.0"
59
59
  },
60
- "version": "1.93.0"
60
+ "version": "1.94.0"
61
61
  }
@@ -1,5 +1,5 @@
1
1
  import type Vorpal from "vorpal";
2
- import { getProjectPodNames } from "../../../../kubernetes";
2
+ import { getProjectPods } from "../../../../kubernetes";
3
3
  import { logError } from "../../../../utils/log";
4
4
  import { getProjectNamespace } from "../../../../utils/projects";
5
5
  import { getShell } from "../../../../utils/shell";
@@ -17,15 +17,18 @@ export default async (vorpal: Vorpal) =>
17
17
  .action(async function ({ envComponent }) {
18
18
  await ensureCluster.call(this, envComponent);
19
19
  const namespace = await getProjectNamespace(envComponent);
20
- const podNames = await getProjectPodNames(envComponent);
21
- if (podNames.length === 0) {
22
- logError(this, "sorry, no pods found");
20
+ const pods = await getProjectPods(envComponent);
21
+ const runningPodNames = pods
22
+ .filter((p) => p.status.phase == "Running")
23
+ .map((r) => r.metadata.name);
24
+ if (runningPodNames.length === 0) {
25
+ logError(this, "sorry, no running pods found");
23
26
  return;
24
27
  }
25
28
  const { podName } = await this.prompt({
26
29
  type: "list",
27
30
  name: "podName",
28
- choices: podNames,
31
+ choices: runningPodNames,
29
32
  message: "Which pod? 🤔",
30
33
  });
31
34