@pitcher/cli-scripts 2.0.2 → 2.0.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.
@@ -62,8 +62,8 @@ async function fetchAllInstances(baseUrl, apiKey) {
62
62
  }
63
63
  function filterInstancesByEnvName(instances, envName) {
64
64
  const normalizedEnvName = envName.toLowerCase();
65
- const filtered = instances.filter((instance) => instance.env_name &&
66
- instance.env_name.toLowerCase() === normalizedEnvName);
65
+ const filtered = instances.filter((instance) => instance.environment &&
66
+ instance.environment.name.toLowerCase() === normalizedEnvName);
67
67
  if (filtered.length === 0) {
68
68
  console.warn(`No instances found with environment name "${envName}"`);
69
69
  }
@@ -94,8 +94,8 @@ async function installAppToInstances(baseUrl, apiKey, appName, instances) {
94
94
  }
95
95
  const instanceIds = instances.map((inst) => inst.id);
96
96
  console.log(`\nInstalling app "${appName}" to ${instances.length} instance(s):`);
97
- instances.forEach((inst) => {
98
- console.log(` - ${inst.id}${inst.env_name ? ` (${inst.env_name})` : ""}${inst.name ? ` - ${inst.name}` : ""}`);
97
+ instances.forEach((i) => {
98
+ console.log(` - ${i.id}${i.environment?.name ? ` (${i.environment.name})` : ""}${i.name ? ` - ${i.name}` : ""}`);
99
99
  });
100
100
  try {
101
101
  const response = await axios.post(`${baseUrl}/api/v1/apps/${appName}/install/`, { instance_ids: instanceIds }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitcher/cli-scripts",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "The Pitcher CLI for various tasks in its ecosystem.",
5
5
  "author": "Pitcher AG",
6
6
  "license": "MIT",