fix(typescript): Refactor types and interfaces to use consistent I prefix and update related tests
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
import * as plugins from '../../plugins.js';
|
||||
import type {
|
||||
ForwardConfig,
|
||||
DomainOptions,
|
||||
AcmeOptions
|
||||
import type {
|
||||
IForwardConfig,
|
||||
IDomainOptions,
|
||||
IAcmeOptions
|
||||
} from '../../certificate/models/certificate-types.js';
|
||||
|
||||
/**
|
||||
@ -35,8 +35,8 @@ export enum HttpStatus {
|
||||
/**
|
||||
* Represents a domain configuration with certificate status information
|
||||
*/
|
||||
export interface DomainCertificate {
|
||||
options: DomainOptions;
|
||||
export interface IDomainCertificate {
|
||||
options: IDomainOptions;
|
||||
certObtained: boolean;
|
||||
obtainingInProgress: boolean;
|
||||
certificate?: string;
|
||||
@ -82,7 +82,7 @@ export class ServerError extends HttpError {
|
||||
/**
|
||||
* Redirect configuration for HTTP requests
|
||||
*/
|
||||
export interface RedirectConfig {
|
||||
export interface IRedirectConfig {
|
||||
source: string; // Source path or pattern
|
||||
destination: string; // Destination URL
|
||||
type: HttpStatus; // Redirect status code
|
||||
@ -92,7 +92,7 @@ export interface RedirectConfig {
|
||||
/**
|
||||
* HTTP router configuration
|
||||
*/
|
||||
export interface RouterConfig {
|
||||
export interface IRouterConfig {
|
||||
routes: Array<{
|
||||
path: string;
|
||||
handler: (req: plugins.http.IncomingMessage, res: plugins.http.ServerResponse) => void;
|
||||
@ -102,5 +102,4 @@ export interface RouterConfig {
|
||||
|
||||
// Backward compatibility interfaces
|
||||
export { HttpError as Port80HandlerError };
|
||||
export { CertificateError as CertError };
|
||||
export type IDomainCertificate = DomainCertificate;
|
||||
export { CertificateError as CertError };
|
Reference in New Issue
Block a user