feat: Implement platform service providers for MinIO and MongoDB

- Added base interface and abstract class for platform service providers.
- Created MinIOProvider class for S3-compatible storage with deployment, provisioning, and deprovisioning functionalities.
- Implemented MongoDBProvider class for MongoDB service with similar capabilities.
- Introduced error handling utilities for better error management.
- Developed TokensComponent for managing registry tokens in the UI, including creation, deletion, and display of tokens.
This commit is contained in:
2025-11-25 04:20:19 +00:00
parent 9aa6906ca5
commit 8ebd677478
28 changed files with 3462 additions and 490 deletions

43
ts/utils/error.ts Normal file
View File

@@ -0,0 +1,43 @@
/**
* Error handling utilities for TypeScript strict mode compatibility
*/
/**
* Safely extract error message from unknown error type
*/
export function getErrorMessage(error: unknown): string {
if (error instanceof Error) {
return error.message;
}
return String(error);
}
/**
* Safely extract error stack from unknown error type
*/
export function getErrorStack(error: unknown): string | undefined {
if (error instanceof Error) {
return error.stack;
}
return undefined;
}
/**
* Safely extract error name from unknown error type
*/
export function getErrorName(error: unknown): string {
if (error instanceof Error) {
return error.name;
}
return 'Error';
}
/**
* Check if error is a specific error type by name
*/
export function isErrorType(error: unknown, name: string): boolean {
if (error instanceof Error) {
return error.name === name;
}
return false;
}