feat(external-registry): Implement CRUD operations and connection verification for external registries
This commit is contained in:
@@ -3,10 +3,108 @@ import * as plugins from '../plugins.js';
|
||||
export interface IExternalRegistry {
|
||||
id: string;
|
||||
data: {
|
||||
/**
|
||||
* Registry type
|
||||
*/
|
||||
type: 'docker' | 'npm';
|
||||
|
||||
/**
|
||||
* Human-readable name for the registry
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Registry URL (e.g., https://registry.gitlab.com, docker.io)
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* Username for authentication
|
||||
*/
|
||||
username: string;
|
||||
|
||||
/**
|
||||
* Password or access token for authentication
|
||||
*/
|
||||
password: string;
|
||||
|
||||
/**
|
||||
* Optional description
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Whether this is the default registry for its type
|
||||
*/
|
||||
isDefault?: boolean;
|
||||
|
||||
/**
|
||||
* Authentication type
|
||||
*/
|
||||
authType?: 'basic' | 'token' | 'oauth2';
|
||||
|
||||
/**
|
||||
* Allow insecure registry connections (HTTP or self-signed certs)
|
||||
*/
|
||||
insecure?: boolean;
|
||||
|
||||
/**
|
||||
* Optional namespace/organization for the registry
|
||||
*/
|
||||
namespace?: string;
|
||||
|
||||
/**
|
||||
* Proxy configuration
|
||||
*/
|
||||
proxy?: {
|
||||
http?: string;
|
||||
https?: string;
|
||||
noProxy?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Registry-specific configuration
|
||||
*/
|
||||
config?: {
|
||||
/**
|
||||
* For Docker registries
|
||||
*/
|
||||
dockerConfig?: {
|
||||
email?: string;
|
||||
serverAddress?: string;
|
||||
};
|
||||
/**
|
||||
* For npm registries
|
||||
*/
|
||||
npmConfig?: {
|
||||
scope?: string;
|
||||
alwaysAuth?: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Status of the registry connection
|
||||
*/
|
||||
status?: 'active' | 'inactive' | 'error' | 'unverified';
|
||||
|
||||
/**
|
||||
* Last error message if status is 'error'
|
||||
*/
|
||||
lastError?: string;
|
||||
|
||||
/**
|
||||
* Timestamp when the registry was last successfully verified
|
||||
*/
|
||||
lastVerified?: number;
|
||||
|
||||
/**
|
||||
* Timestamp when the registry was created
|
||||
*/
|
||||
createdAt?: number;
|
||||
|
||||
/**
|
||||
* Timestamp when the registry was last updated
|
||||
*/
|
||||
updatedAt?: number;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user