From 47e3c864871a1ccafb9bd866485a06a650bb0e0a Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Mon, 5 May 2025 14:47:20 +0000 Subject: [PATCH] fix(dependencies): Update @push.rocks/smartacme to ^7.3.2; replace DisklessHttp01Handler with Http01MemoryHandler in Port80Handler --- package.json | 2 +- pnpm-lock.yaml | 12 +++++++----- ts/port80handler/classes.port80handler.ts | 17 +---------------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 9940ef2..a4e9d08 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "dependencies": { "@push.rocks/lik": "^6.2.2", - "@push.rocks/smartacme": "^7.2.5", + "@push.rocks/smartacme": "^7.3.2", "@push.rocks/smartdelay": "^3.0.5", "@push.rocks/smartnetwork": "^4.0.1", "@push.rocks/smartpromise": "^4.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d730db0..5fa3697 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^6.2.2 version: 6.2.2 '@push.rocks/smartacme': - specifier: ^7.2.5 - version: 7.2.5(@aws-sdk/credential-providers@3.798.0)(socks@2.8.4) + specifier: ^7.3.2 + version: 7.3.2(@aws-sdk/credential-providers@3.798.0)(socks@2.8.4) '@push.rocks/smartdelay': specifier: ^3.0.5 version: 3.0.5 @@ -872,8 +872,8 @@ packages: '@push.rocks/qenv@6.1.0': resolution: {integrity: sha512-1FUFMlSVwFSFg8LbqfkzJ2LLP4lMGApUtgOpsvrde6+AxBmB4gjoNgCUH7z3xXfDAtYqcrtSELXBNE0xVL1MqQ==} - '@push.rocks/smartacme@7.2.5': - resolution: {integrity: sha512-Mn7qutAHd+mIbyq0Br/zyBBki7ATaZ/ofZQvnrR4xDvZiL8sBKeNx3iotb7jyHNYax5JUBh7slDKUxVjQBFC6Q==} + '@push.rocks/smartacme@7.3.2': + resolution: {integrity: sha512-pfNd31wqvEn/2Bi9qZGCzvpV6/5V1jB9xOuWlsUTp4RihDVwQq2/se69pUeXDd1smWOM1yF4zq+45VO5DMDsCg==} '@push.rocks/smartarchive@3.0.8': resolution: {integrity: sha512-1jPmR0b7hXmjYQoRiTlRXrIbZcdcFmSdGOfznufjcDpGPe86Km0d8TBnzqghTx4dTihzKC67IxAaz/DM3lvxpA==} @@ -6284,7 +6284,7 @@ snapshots: '@push.rocks/smartlog': 3.0.7 '@push.rocks/smartpath': 5.0.18 - '@push.rocks/smartacme@7.2.5(@aws-sdk/credential-providers@3.798.0)(socks@2.8.4)': + '@push.rocks/smartacme@7.3.2(@aws-sdk/credential-providers@3.798.0)(socks@2.8.4)': dependencies: '@api.global/typedserver': 3.0.74 '@apiclient.xyz/cloudflare': 6.4.1 @@ -6292,7 +6292,9 @@ snapshots: '@push.rocks/smartdata': 5.15.1(@aws-sdk/credential-providers@3.798.0)(socks@2.8.4) '@push.rocks/smartdelay': 3.0.5 '@push.rocks/smartdns': 6.2.2 + '@push.rocks/smartfile': 11.2.0 '@push.rocks/smartlog': 3.0.7 + '@push.rocks/smartnetwork': 4.0.1 '@push.rocks/smartpromise': 4.2.3 '@push.rocks/smartrequest': 2.1.0 '@push.rocks/smartstring': 4.0.15 diff --git a/ts/port80handler/classes.port80handler.ts b/ts/port80handler/classes.port80handler.ts index 5096263..5f55554 100644 --- a/ts/port80handler/classes.port80handler.ts +++ b/ts/port80handler/classes.port80handler.ts @@ -10,21 +10,6 @@ import type { IAcmeOptions } from '../common/types.js'; // (fs and path I/O moved to CertProvisioner) -// ACME HTTP-01 challenge handler storing tokens in memory (diskless) -class DisklessHttp01Handler { - private storage: Map; - constructor(storage: Map) { this.storage = storage; } - public getSupportedTypes(): string[] { return ['http-01']; } - public async prepare(ch: any): Promise { - this.storage.set(ch.token, ch.keyAuthorization); - } - public async verify(ch: any): Promise { - return; - } - public async cleanup(ch: any): Promise { - this.storage.delete(ch.token); - } -} /** * Custom error classes for better error handling @@ -137,7 +122,7 @@ export class Port80Handler extends plugins.EventEmitter { accountEmail: this.options.accountEmail, certManager: new plugins.smartacme.certmanagers.MemoryCertManager(), environment: this.options.useProduction ? 'production' : 'integration', - challengeHandlers: [ new DisklessHttp01Handler(this.acmeHttp01Storage) ], + challengeHandlers: [ new plugins.smartacme.handlers.Http01MemoryHandler() ], challengePriority: ['http-01'], }); await this.smartAcme.start();