chore: node-acme-client转换为esm

This commit is contained in:
xiaojunnuo
2024-11-12 12:15:06 +08:00
parent a9a0967a6f
commit 087c0b8253
21 changed files with 149 additions and 147 deletions
+5 -5
View File
@@ -1,11 +1,11 @@
/**
* ACME auto helper
*/
import { readCsrDomains } from './crypto/index.js';
import { log } from './logger.js';
import { wait } from './wait.js';
import { CancelError } from './error.js';
const { readCsrDomains } = require('./crypto');
const { log } = require('./logger');
const { wait } = require('./wait');
const { CancelError } = require('./error');
const defaultOpts = {
csr: null,
@@ -30,7 +30,7 @@ const defaultOpts = {
* @returns {Promise<buffer>} Certificate
*/
module.exports = async (client, userOpts) => {
export default async (client, userOpts) => {
const opts = { ...defaultOpts, ...userOpts };
const accountPayload = { termsOfServiceAgreed: opts.termsOfServiceAgreed };