@certd/acme-client 1.35.0 → 1.35.2

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Simple and unopinionated ACME client",
4
4
  "private": false,
5
5
  "author": "nmorsman",
6
- "version": "1.35.0",
6
+ "version": "1.35.2",
7
7
  "type": "module",
8
8
  "module": "scr/index.js",
9
9
  "main": "src/index.js",
@@ -18,7 +18,7 @@
18
18
  "types"
19
19
  ],
20
20
  "dependencies": {
21
- "@certd/basic": "^1.35.0",
21
+ "@certd/basic": "^1.35.2",
22
22
  "@peculiar/x509": "^1.11.0",
23
23
  "asn1js": "^3.0.5",
24
24
  "axios": "^1.7.2",
@@ -69,5 +69,5 @@
69
69
  "bugs": {
70
70
  "url": "https://github.com/publishlab/node-acme-client/issues"
71
71
  },
72
- "gitHead": "f55f9b4dd338bb03e5ba2e1d81915c3f17b00502"
72
+ "gitHead": "f252871fb892af015c99052e3728fb0a0535b012"
73
73
  }
package/src/auto.js CHANGED
@@ -75,6 +75,9 @@ export default async (client, userOpts) => {
75
75
 
76
76
  log("[auto] Placing new certificate order with ACME provider");
77
77
  const orderPayload = { identifiers: uniqueDomains.map((d) => ({ type: "dns", value: d })) };
78
+ if (opts.profile && client.sslProvider === 'letsencrypt' ){
79
+ orderPayload.profile = opts.profile;
80
+ }
78
81
  const order = await client.createOrder(orderPayload);
79
82
  const authorizations = await client.getAuthorizations(order);
80
83
 
@@ -213,12 +216,16 @@ export default async (client, userOpts) => {
213
216
  return promise;
214
217
  }
215
218
 
216
- async function runPromisePa(tasks, waitTime = 5000) {
219
+ async function runPromisePa(tasks, waitTime = 8000) {
217
220
  const results = [];
221
+ let j = 0
218
222
  // eslint-disable-next-line no-await-in-loop,no-restricted-syntax
219
223
  for (const task of tasks) {
224
+ j++
225
+ log(`开始第${j}个任务`);
220
226
  results.push(task());
221
227
  // eslint-disable-next-line no-await-in-loop
228
+ log(`wait ${waitTime}s`)
222
229
  await wait(waitTime);
223
230
  }
224
231
  return Promise.all(results);
@@ -242,6 +249,7 @@ export default async (client, userOpts) => {
242
249
  log(`跳过本地验证(skipChallengeVerification=true),等待 60s`);
243
250
  await wait(60 * 1000);
244
251
  } else {
252
+ log("开始本地校验")
245
253
  await runPromisePa(localVerifyTasks, 1000);
246
254
  log(`本地校验完成,等待${waitDnsDiffuseTime}s`)
247
255
  await wait(waitDnsDiffuseTime * 1000)
package/src/client.js CHANGED
@@ -90,10 +90,12 @@ const defaultOpts = {
90
90
  */
91
91
 
92
92
  class AcmeClient {
93
+ sslProvider
93
94
  constructor(opts) {
94
95
  if (!Buffer.isBuffer(opts.accountKey)) {
95
96
  opts.accountKey = Buffer.from(opts.accountKey);
96
97
  }
98
+ this.sslProvider = opts.sslProvider;
97
99
 
98
100
  this.opts = { ...defaultOpts, ...opts };
99
101
  this.backoffOpts = {
package/types/index.d.ts CHANGED
@@ -66,6 +66,7 @@ export interface ClientAutoOptions {
66
66
  challengePriority?: string[];
67
67
  preferredChain?: string;
68
68
  signal?: AbortSignal;
69
+ profile?:string;
69
70
  }
70
71
 
71
72
  export class Client {