@certd/plugin-lib 1.38.2 → 1.38.4

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,18 @@
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.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
7
+
8
+ **Note:** Version bump only for package @certd/plugin-lib
9
+
10
+ ## [1.38.3](https://github.com/certd/certd/compare/v1.38.2...v1.38.3) (2026-01-28)
11
+
12
+ ### Performance Improvements
13
+
14
+ * 多个dns 提供商支持导入域名 ([d3c0914](https://github.com/certd/certd/commit/d3c0914ac16db8ac77f9c60285bb20cfab7a3cb0))
15
+ * 首次使用提示新手教程按钮 ([e054c8f](https://github.com/certd/certd/commit/e054c8fc55063fd96548f1c19049070524a63411))
16
+ * ucloud支持部署到alb ([78004bd](https://github.com/certd/certd/commit/78004bdfb552a3b83298fa09d518ca282a529d90))
17
+
6
18
  ## [1.38.2](https://github.com/certd/certd/compare/v1.38.1...v1.38.2) (2026-01-22)
7
19
 
8
20
  ### Performance Improvements
@@ -58,5 +58,5 @@ export declare class CertReader {
58
58
  buildCertFileName(suffix: string, applyTime: any, prefix?: string): string;
59
59
  buildCertName(prefix?: string): string;
60
60
  static appendTimeSuffix(name?: string): string;
61
- static buildCertName(cert: any): string;
61
+ static buildCertName(cert: CertInfo): string;
62
62
  }
@@ -1,5 +1,5 @@
1
1
  import { HttpClient, ILogger, utils } from "@certd/basic";
2
- import { IAccess, IServiceGetter, Pager, PageRes, Registrable } from "@certd/pipeline";
2
+ import { IAccess, IServiceGetter, PageRes, PageSearch, Registrable } from "@certd/pipeline";
3
3
  export type DnsProviderDefine = Registrable & {
4
4
  accessType: string;
5
5
  icon?: string;
@@ -43,10 +43,11 @@ export interface IDnsProvider<T = any> {
43
43
  removeRecord(options: RemoveRecordOptions<T>): Promise<void>;
44
44
  setCtx(ctx: DnsProviderContext): void;
45
45
  usePunyCode(): boolean;
46
- getDomainListPage(pager: Pager): Promise<PageRes<DomainRecord>>;
46
+ getDomainListPage(pager: PageSearch): Promise<PageRes<DomainRecord>>;
47
47
  }
48
48
  export interface ISubDomainsGetter {
49
49
  getSubDomains(): Promise<string[]>;
50
+ hasSubDomain(domain: string): Promise<string>;
50
51
  }
51
52
  export interface IDomainParser {
52
53
  parse(fullDomain: string): Promise<string>;
@@ -1,6 +1,6 @@
1
- import { Pager, PageRes } from "@certd/pipeline";
2
- import { CreateRecordOptions, DnsProviderContext, DomainRecord, IDnsProvider, RemoveRecordOptions } from "./api.js";
3
1
  import { HttpClient, ILogger } from "@certd/basic";
2
+ import { PageRes, PageSearch } from "@certd/pipeline";
3
+ import { CreateRecordOptions, DnsProviderContext, DomainRecord, IDnsProvider, RemoveRecordOptions } from "./api.js";
4
4
  export declare abstract class AbstractDnsProvider<T = any> implements IDnsProvider<T> {
5
5
  ctx: DnsProviderContext;
6
6
  http: HttpClient;
@@ -21,7 +21,7 @@ export declare abstract class AbstractDnsProvider<T = any> implements IDnsProvid
21
21
  abstract createRecord(options: CreateRecordOptions): Promise<T>;
22
22
  abstract onInstance(): Promise<void>;
23
23
  abstract removeRecord(options: RemoveRecordOptions<T>): Promise<void>;
24
- getDomainListPage(pager: Pager): Promise<PageRes<DomainRecord>>;
24
+ getDomainListPage(req: PageSearch): Promise<PageRes<DomainRecord>>;
25
25
  }
26
26
  export declare function createDnsProvider(opts: {
27
27
  dnsProviderType: string;
@@ -1,5 +1,5 @@
1
- import { dnsProviderRegistry } from "./registry.js";
2
1
  import punycode from "punycode.js";
2
+ import { dnsProviderRegistry } from "./registry.js";
3
3
  export class AbstractDnsProvider {
4
4
  ctx;
5
5
  http;
@@ -31,7 +31,7 @@ export class AbstractDnsProvider {
31
31
  async parseDomain(fullDomain) {
32
32
  return await this.ctx.domainParser.parse(fullDomain);
33
33
  }
34
- async getDomainListPage(pager) {
34
+ async getDomainListPage(req) {
35
35
  throw new Error("Method not implemented.");
36
36
  }
37
37
  }
@@ -31,20 +31,28 @@ export class DomainParser {
31
31
  this.logger.info(`从缓存获取到主域名:${fullDomain}->${value}`);
32
32
  return value;
33
33
  }
34
- const subDomains = await this.subDomainsGetter.getSubDomains();
35
- if (subDomains && subDomains.length > 0) {
36
- const fullDomainDot = "." + fullDomain;
37
- for (const subDomain of subDomains) {
38
- if (fullDomainDot.endsWith("." + subDomain)) {
39
- //找到子域名托管
40
- utils.cache.set(cacheKey, subDomain, {
41
- ttl: 60 * 1000,
42
- });
43
- this.logger.info(`获取到子域名托管域名:${fullDomain}->${subDomain}`);
44
- return subDomain;
45
- }
46
- }
34
+ //检查是否有子域名托管
35
+ const subDomain = await this.subDomainsGetter.hasSubDomain(fullDomain);
36
+ if (subDomain) {
37
+ utils.cache.set(cacheKey, subDomain, {
38
+ ttl: 60 * 1000,
39
+ });
40
+ this.logger.info(`获取到托管域名:${fullDomain}->${subDomain}`);
41
+ return subDomain;
47
42
  }
43
+ // if (subDomains && subDomains.length > 0) {
44
+ // const fullDomainDot = "." + fullDomain;
45
+ // for (const subDomain of subDomains) {
46
+ // if (fullDomainDot.endsWith("." + subDomain)) {
47
+ // //找到子域名托管
48
+ // utils.cache.set(cacheKey, subDomain, {
49
+ // ttl: 60 * 1000,
50
+ // });
51
+ // this.logger.info(`获取到子域名托管域名:${fullDomain}->${subDomain}`);
52
+ // return subDomain;
53
+ // }
54
+ // }
55
+ // }
48
56
  const res = this.parseDomainByPsl(fullDomain);
49
57
  this.logger.info(`从psl获取主域名:${fullDomain}->${res}`);
50
58
  let soaManDomain = null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@certd/plugin-lib",
3
3
  "private": false,
4
- "version": "1.38.2",
4
+ "version": "1.38.4",
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.38.2",
26
- "@certd/basic": "^1.38.2",
27
- "@certd/pipeline": "^1.38.2",
28
- "@certd/plus-core": "^1.38.2",
25
+ "@certd/acme-client": "^1.38.4",
26
+ "@certd/basic": "^1.38.4",
27
+ "@certd/pipeline": "^1.38.4",
28
+ "@certd/plus-core": "^1.38.4",
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": "f92dc6a1ad103de9cc184da3b84096943906cb59"
60
+ "gitHead": "84291482732687cc8162c6505666ba2b29b02918"
61
61
  }