feat: enhance app deployment command with environment selection

- Added environmentId flag to the AppDeploy command for specifying the environment.
- Implemented interactive prompts for selecting project, environment, and application if flags are not provided.
- Updated type definitions to include Application and Environment types for better type safety.
- Improved error handling for cases with no available environments or applications.
This commit is contained in:
Mauricio Siu
2025-10-05 01:33:03 -06:00
parent 82aed684b9
commit d32c3b2be2
3 changed files with 64 additions and 12 deletions

View File

@@ -5,11 +5,34 @@ import chalk from "chalk";
import type { AuthConfig } from "./utils.js";
export type Application = {
applicationId: string;
name: string;
// Add other application properties as needed
};
export type Environment = {
name: string;
environmentId: string;
description: string;
createdAt: string;
env: string;
projectId: string;
applications: Application[];
mariadb: any[];
mongo: any[];
mysql: any[];
postgres: any[];
redis: any[];
compose: any[];
};
export type Project = {
adminId: string;
name: string;
projectId?: string | undefined;
description?: string | undefined;
environments?: Environment[];
};
export const getProjects = async (