@push.rocks/smartacme 7.2.4 → 7.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/index.d.ts +2 -1
- package/dist_ts/index.js +3 -2
- package/dist_ts/smartacme.classes.smartacme.d.ts +1 -1
- package/package.json +1 -1
- package/readme.plan.md +2 -26
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/index.ts +2 -1
- package/ts/smartacme.classes.smartacme.ts +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartacme',
|
|
6
|
-
version: '7.2.
|
|
6
|
+
version: '7.2.5',
|
|
7
7
|
description: 'A TypeScript-based ACME client for LetsEncrypt certificate management with a focus on simplicity and power.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx1QkFBdUI7SUFDN0IsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLDZHQUE2RztDQUMzSCxDQUFBIn0=
|
package/dist_ts/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './smartacme.classes.smartacme.js';
|
|
2
2
|
export { SmartacmeCert as Cert } from './smartacme.classes.cert.js';
|
|
3
3
|
export type { ICertManager } from './interfaces/certmanager.js';
|
|
4
|
-
|
|
4
|
+
import * as certmanagers from './certmanagers/index.js';
|
|
5
|
+
export { certmanagers };
|
package/dist_ts/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './smartacme.classes.smartacme.js';
|
|
2
2
|
export { SmartacmeCert as Cert } from './smartacme.classes.cert.js';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import * as certmanagers from './certmanagers/index.js';
|
|
4
|
+
export { certmanagers };
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGtDQUFrQyxDQUFDO0FBQ2pELE9BQU8sRUFBRSxhQUFhLElBQUksSUFBSSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFFcEUsT0FBTyxLQUFLLFlBQVksTUFBTSx5QkFBeUIsQ0FBQztBQUN4RCxPQUFPLEVBQUUsWUFBWSxFQUFFLENBQUMifQ==
|
|
@@ -5,8 +5,8 @@ import { SmartacmeCert } from './smartacme.classes.cert.js';
|
|
|
5
5
|
* the options for the class @see SmartAcme
|
|
6
6
|
*/
|
|
7
7
|
export interface ISmartAcmeOptions {
|
|
8
|
-
accountPrivateKey?: string;
|
|
9
8
|
accountEmail: string;
|
|
9
|
+
accountPrivateKey?: string;
|
|
10
10
|
/**
|
|
11
11
|
* Certificate storage manager (e.g., Mongo or in-memory).
|
|
12
12
|
*/
|
package/package.json
CHANGED
package/readme.plan.md
CHANGED
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
## Plan
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
- Enable SmartAcme to accept wildcard domain inputs like `*.domain.com` or `*.sub.example.com` and correctly request and match wildcard certificates.
|
|
5
|
-
|
|
6
|
-
## Steps
|
|
7
|
-
1. [x] Extend SmartacmeCertMatcher:
|
|
8
|
-
- [x] Update `getCertificateDomainNameByDomainName()` to handle wildcard prefixes:
|
|
9
|
-
- If input starts with `*.` strip the prefix and return the base domain.
|
|
10
|
-
- For example:
|
|
11
|
-
- `*.example.com` → `example.com`
|
|
12
|
-
- `*.sub.example.com` → `sub.example.com`
|
|
13
|
-
- `*.a.b.example.com` → `a.b.example.com`
|
|
14
|
-
- [x] Ensure existing logic for non-wildcards remains unchanged.
|
|
15
|
-
2. [x] Update `SmartAcme.getCertificateForDomain()`:
|
|
16
|
-
- [x] Detect wildcard inputs (`domainArg.startsWith('*.')`).
|
|
17
|
-
- [x] For wildcard cases, enforce DNS-01 challenge only (throw error if handlers don't support DNS-01).
|
|
18
|
-
- [x] Use the matcher result to request wildcard certificate identifiers (e.g., `value: '*.baseDomain'`).
|
|
19
|
-
3. [x] Update tests:
|
|
20
|
-
- [x] Add unit tests in `test/test.certmatcher.ts` for wildcard handling:
|
|
21
|
-
- `*.example.com` → `example.com`
|
|
22
|
-
- `*.sub.example.com` → `sub.example.com`
|
|
23
|
-
- `*.a.b.example.com` → `a.b.example.com`
|
|
24
|
-
- [x] Add integration stub in `test/test.smartacme.ts` for wildcard input in integration mode:
|
|
25
|
-
- Call `getCertificateForDomain('*.domain.com')` and expect returned cert `domainName` equals `*.domain.com`.
|
|
26
|
-
4. [x] Update documentation (README.md) if needed.
|
|
27
|
-
5. [x] Run CI (`pnpm build` & `pnpm test`) and fix any regressions.
|
|
3
|
+
Move the
|
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './smartacme.classes.smartacme.js';
|
|
2
2
|
export { SmartacmeCert as Cert } from './smartacme.classes.cert.js';
|
|
3
3
|
export type { ICertManager } from './interfaces/certmanager.js';
|
|
4
|
-
|
|
4
|
+
import * as certmanagers from './certmanagers/index.js';
|
|
5
|
+
export { certmanagers };
|
|
@@ -8,8 +8,8 @@ import { SmartacmeCert } from './smartacme.classes.cert.js';
|
|
|
8
8
|
* the options for the class @see SmartAcme
|
|
9
9
|
*/
|
|
10
10
|
export interface ISmartAcmeOptions {
|
|
11
|
-
accountPrivateKey?: string;
|
|
12
11
|
accountEmail: string;
|
|
12
|
+
accountPrivateKey?: string;
|
|
13
13
|
/**
|
|
14
14
|
* Certificate storage manager (e.g., Mongo or in-memory).
|
|
15
15
|
*/
|