smartacme/readme.plan.md

16 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

# Plan: Move interestMap from certmanager to smartacme core
## Goal
- Pull the interest coordination mechanism out of the ICertManager implementations and into the SmartAcme class.
## Steps
1. Remove `interestMap` from `ICertManager` interface (`ts/interfaces/certmanager.ts`) and its import of `InterestMap`.
2. Strip out `interestMap` property, initialization, and usage from `MemoryCertManager` and `MongoCertManager` (`ts/certmanagers/*.ts`).
3. In `Smartacme` class (`ts/smartacme.classes.smartacme.ts`):
- Add a private `interestMap: plugins.lik.InterestMap<string, SmartacmeCert>` property.
- Initialize it in the constructor: `this.interestMap = new plugins.lik.InterestMap((domain) => domain);`.
- Update `getCertificateForDomain()` and any other consumers to reference `this.interestMap` instead of `this.certmanager.interestMap`.
4. Remove any tests or code that reference the old `interestMap` on `ICertManager` (if any).
5. Run CI (`pnpm build` and `pnpm test`) and fix any regressions.
Please review and confirm before we begin the refactor.