@certd/plugin-lib 1.39.1 → 1.39.3
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.39.3](https://github.com/certd/certd/compare/v1.39.2...v1.39.3) (2026-03-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @certd/plugin-lib
|
|
9
|
+
|
|
10
|
+
## [1.39.2](https://github.com/certd/certd/compare/v1.39.1...v1.39.2) (2026-03-16)
|
|
11
|
+
|
|
12
|
+
### Performance Improvements
|
|
13
|
+
|
|
14
|
+
* 查看证书增加证书详情显示,包括域名,过期时间,颁发机构,指纹等 ([0b9933d](https://github.com/certd/certd/commit/0b9933df1e8d1685d14271435a8a7488974cc47b))
|
|
15
|
+
* dns-provider 支持bind9 ,support bind9 ([76d12d6](https://github.com/certd/certd/commit/76d12d60624c0672fd3717a80a2cfef6845b14b8))
|
|
16
|
+
|
|
6
17
|
## [1.39.1](https://github.com/certd/certd/compare/v1.39.0...v1.39.1) (2026-03-09)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @certd/plugin-lib
|
|
@@ -48,6 +48,11 @@ export declare class CertReader {
|
|
|
48
48
|
effective: Date;
|
|
49
49
|
expires: Date;
|
|
50
50
|
};
|
|
51
|
+
static getFingerprintX509(crt: string): {
|
|
52
|
+
fingerprint: string;
|
|
53
|
+
fingerprint256: string;
|
|
54
|
+
fingerprint512: string;
|
|
55
|
+
};
|
|
51
56
|
getAllDomains(): any;
|
|
52
57
|
getAltNames(): string[];
|
|
53
58
|
static getMainDomain(crt: string): string;
|
package/dist/cert/cert-reader.js
CHANGED
|
@@ -2,6 +2,7 @@ import fs from "fs";
|
|
|
2
2
|
import os from "os";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { crypto } from "@certd/acme-client";
|
|
5
|
+
import cryptoLib from "crypto";
|
|
5
6
|
import dayjs from "dayjs";
|
|
6
7
|
import { uniq } from "lodash-es";
|
|
7
8
|
const formats = {
|
|
@@ -78,8 +79,27 @@ export class CertReader {
|
|
|
78
79
|
const detail = crypto.readCertificateInfo(crt.toString());
|
|
79
80
|
const effective = detail.notBefore;
|
|
80
81
|
const expires = detail.notAfter;
|
|
82
|
+
const fingerprints = CertReader.getFingerprintX509(crt);
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
detail.fingerprints = fingerprints;
|
|
81
85
|
return { detail, effective, expires };
|
|
82
86
|
}
|
|
87
|
+
static getFingerprintX509(crt) {
|
|
88
|
+
try {
|
|
89
|
+
// 创建X509Certificate实例
|
|
90
|
+
const cert = new cryptoLib.X509Certificate(crt);
|
|
91
|
+
// 获取指纹
|
|
92
|
+
return {
|
|
93
|
+
fingerprint: cert.fingerprint,
|
|
94
|
+
fingerprint256: cert.fingerprint256,
|
|
95
|
+
fingerprint512: cert.fingerprint512,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
console.error("处理证书失败:", error.message);
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
83
103
|
getAllDomains() {
|
|
84
104
|
const { detail } = this.getCrtDetail();
|
|
85
105
|
const domains = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient, ILogger, utils } from "@certd/basic";
|
|
2
|
-
import { IAccess, IServiceGetter, PageRes, PageSearch, Registrable } from "@certd/pipeline";
|
|
2
|
+
import { IAccess, IAccessService, IServiceGetter, PageRes, PageSearch, Registrable } from "@certd/pipeline";
|
|
3
3
|
export type DnsProviderDefine = Registrable & {
|
|
4
4
|
accessType: string;
|
|
5
5
|
icon?: string;
|
|
@@ -22,6 +22,7 @@ export type DnsProviderContext = {
|
|
|
22
22
|
utils: typeof utils;
|
|
23
23
|
domainParser: IDomainParser;
|
|
24
24
|
serviceGetter: IServiceGetter;
|
|
25
|
+
accessGetter?: IAccessService;
|
|
25
26
|
};
|
|
26
27
|
export type DomainRecord = {
|
|
27
28
|
id: string;
|
|
@@ -43,6 +43,10 @@ export async function createDnsProvider(opts) {
|
|
|
43
43
|
if (dnsProviderDefine.deprecated) {
|
|
44
44
|
context.logger.warn(dnsProviderDefine.deprecated);
|
|
45
45
|
}
|
|
46
|
+
if (!context.accessGetter) {
|
|
47
|
+
const accessGetter = await context.serviceGetter.get("accessService");
|
|
48
|
+
context.accessGetter = accessGetter;
|
|
49
|
+
}
|
|
46
50
|
// @ts-ignore
|
|
47
51
|
const dnsProvider = new DnsProviderClass();
|
|
48
52
|
dnsProvider.setCtx(context);
|
package/dist/common/util.js
CHANGED
|
@@ -30,12 +30,10 @@ export function createRemoteSelectInputDefine(opts) {
|
|
|
30
30
|
const helper = opts?.helper || "请选择";
|
|
31
31
|
const search = opts?.search ?? false;
|
|
32
32
|
const pager = opts?.pager ?? false;
|
|
33
|
-
let mode = "
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
else {
|
|
38
|
-
mode = opts?.mode ?? "tags";
|
|
33
|
+
let mode = "default";
|
|
34
|
+
const multi = opts?.multi ?? true;
|
|
35
|
+
if (multi) {
|
|
36
|
+
mode = "tags";
|
|
39
37
|
}
|
|
40
38
|
const item = {
|
|
41
39
|
title,
|
|
@@ -48,6 +46,7 @@ export function createRemoteSelectInputDefine(opts) {
|
|
|
48
46
|
action,
|
|
49
47
|
search,
|
|
50
48
|
pager,
|
|
49
|
+
multi,
|
|
51
50
|
watches: [certDomainsInputKey, accessIdInputKey, ...watches],
|
|
52
51
|
...opts.component,
|
|
53
52
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@certd/plugin-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.39.
|
|
4
|
+
"version": "1.39.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"@alicloud/pop-core": "^1.7.10",
|
|
23
23
|
"@alicloud/tea-util": "^1.4.11",
|
|
24
24
|
"@aws-sdk/client-s3": "^3.964.0",
|
|
25
|
-
"@certd/acme-client": "^1.39.
|
|
26
|
-
"@certd/basic": "^1.39.
|
|
27
|
-
"@certd/pipeline": "^1.39.
|
|
28
|
-
"@certd/plus-core": "^1.39.
|
|
25
|
+
"@certd/acme-client": "^1.39.3",
|
|
26
|
+
"@certd/basic": "^1.39.3",
|
|
27
|
+
"@certd/pipeline": "^1.39.3",
|
|
28
|
+
"@certd/plus-core": "^1.39.3",
|
|
29
29
|
"@kubernetes/client-node": "0.21.0",
|
|
30
30
|
"ali-oss": "^6.22.0",
|
|
31
31
|
"basic-ftp": "^5.0.5",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"tslib": "^2.8.1",
|
|
58
58
|
"typescript": "^5.4.2"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "6cb51bc55d8a649797b0b3bdbc6982451b5bfd5e"
|
|
61
61
|
}
|