feat: add environment selection to database commands

- Introduced environmentId flag to all database commands (create, delete, deploy, stop) for specifying the environment.
- Implemented interactive prompts for selecting project and environment if flags are not provided.
- Enhanced error handling for cases with no available environments or database instances.
- Updated type definitions to include Database for better type safety.
This commit is contained in:
Mauricio Siu
2025-10-05 01:59:37 -06:00
parent 68786fb7f1
commit a7a5e2e0a3
21 changed files with 914 additions and 209 deletions

View File

@@ -11,6 +11,16 @@ export type Application = {
// Add other application properties as needed
};
export type Database = {
mariadbId?: string;
mongoId?: string;
mysqlId?: string;
postgresId?: string;
redisId?: string;
name: string;
// Add other database properties as needed
};
export type Environment = {
name: string;
environmentId: string;
@@ -19,11 +29,11 @@ export type Environment = {
env: string;
projectId: string;
applications: Application[];
mariadb: any[];
mongo: any[];
mysql: any[];
postgres: any[];
redis: any[];
mariadb: Database[];
mongo: Database[];
mysql: Database[];
postgres: Database[];
redis: Database[];
compose: any[];
};