diff --git a/src/modules/plugin.ts b/src/modules/plugin.ts index 53dea5f..44a5819 100644 --- a/src/modules/plugin.ts +++ b/src/modules/plugin.ts @@ -14,7 +14,7 @@ import type Config from "@lumeweb/cfg"; import EventEmitter2 from "eventemitter2"; import log from "../log.js"; import { get as getSwarm } from "./swarm.js"; -import { get as getSSl } from "./ssl.js"; +import { get as getSSl, SSLManager } from "./ssl.js"; import type { HDKey } from "micro-ed25519-hdkey"; let pluginAPIManager: PluginAPIManager; @@ -78,7 +78,7 @@ class PluginAPI extends EventEmitter2 { return getHDKey(); } - get ssl() { + get ssl(): SSLManager { return getSSl(); } diff --git a/src/modules/ssl.ts b/src/modules/ssl.ts index 0ec2fd6..322ab06 100644 --- a/src/modules/ssl.ts +++ b/src/modules/ssl.ts @@ -5,7 +5,7 @@ import config from "../config.js"; export type SSLManagerRenewHandler = (domain: string) => Promise; -class SSLManager { +export class SSLManager { private _context?: tls.SecureContext; private _key?: Buffer; private _cert?: Buffer;