110 lines
2.1 KiB
TypeScript
110 lines
2.1 KiB
TypeScript
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 (optional for token-based or public registries)
|
|
*/
|
|
username?: string;
|
|
|
|
/**
|
|
* Password, access token, or API key for authentication (optional for public registries)
|
|
*/
|
|
password?: string;
|
|
|
|
/**
|
|
* Optional description
|
|
*/
|
|
description?: string;
|
|
|
|
/**
|
|
* Whether this is the default registry for its type
|
|
*/
|
|
isDefault?: boolean;
|
|
|
|
/**
|
|
* Authentication type
|
|
*/
|
|
authType?: 'none' | '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;
|
|
};
|
|
} |