From bb3ccdf49c3ce67ac2048c2e6c4679622d06aab9 Mon Sep 17 00:00:00 2001 From: Stefan Werfling Date: Sat, 18 May 2024 16:53:49 +0200 Subject: [PATCH] remove socks, update plugins add credential provider --- .../src/Routes/Main/Credential/Provider.ts | 9 +- backend/src/Routes/Main/Ssl/Details.ts | 3 +- backend/src/Routes/Main/Ssl/Providers.ts | 4 +- backend/src/inc/Credential/Credential.ts | 9 +- .../src/inc/Credential/CredentialDatabase.ts | 5 +- .../src/inc/Credential/CredentialProvider.ts | 4 +- backend/src/inc/Credential/ICredential.ts | 17 - .../CredentialProvider/CredentialProviders.ts | 25 +- .../SslCertProvider/SslCertProviders.ts | 26 +- backend/src/inc/Service/NginxService.ts | 11 +- core/src/inc/Credential/ICredential.ts | 20 + .../inc/Credential/ICredentialAuthBasic.ts | 16 + core/src/inc/PluginSystem/PluginDefinition.ts | 3 +- core/src/inc/PluginSystem/PluginManager.ts | 25 +- core/src/inc/Provider/AProviderOnLoadEvent.ts | 15 + core/src/inc/Provider/BaseProviders.ts | 29 ++ .../ACredentialProviderOnLoadEvent.ts | 7 + .../CredentialProvider/ICredentialProvider.ts | 10 +- .../ICredentialProviders.ts | 12 +- .../ASslCertProviderOnLoadEvent.ts | 12 +- core/src/inc/Utils/FileHelper.ts | 27 +- core/src/index.ts | 7 + plugins/demoplugin/dist/{src => }/LoadDb.d.ts | 0 plugins/demoplugin/dist/{src => }/index.d.ts | 0 plugins/demoplugin/dist/index.js | 6 +- plugins/demoplugin/dist/index.js.map | 2 +- plugins/demoplugin/dist/src/LoadDb.js | 10 - plugins/demoplugin/dist/src/LoadDb.js.map | 1 - plugins/demoplugin/dist/src/index.js | 15 - plugins/demoplugin/dist/src/index.js.map | 1 - plugins/demoplugin/tsconfig.json | 3 +- plugins/letsencrypt/dist/{src => }/Acme.d.ts | 0 plugins/letsencrypt/dist/Acme.js.map | 2 +- .../dist/{src => }/Acme/Client.d.ts | 0 plugins/letsencrypt/dist/Acme/Client.js.map | 2 +- .../letsencrypt/dist/{src => }/Certbot.d.ts | 0 plugins/letsencrypt/dist/Certbot.js.map | 2 +- plugins/letsencrypt/dist/ProviderLoader.js | 14 - .../letsencrypt/dist/ProviderLoader.js.map | 1 - ...Loader.d.ts => SslCertProviderLoader.d.ts} | 2 +- ...iderLoader.js => SslCertProviderLoader.js} | 4 +- .../dist/SslCertProviderLoader.js.map | 1 + plugins/letsencrypt/dist/{src => }/index.d.ts | 0 plugins/letsencrypt/dist/index.js | 9 +- plugins/letsencrypt/dist/index.js.map | 2 +- plugins/letsencrypt/dist/src/Acme.js | 118 ------ plugins/letsencrypt/dist/src/Acme.js.map | 1 - plugins/letsencrypt/dist/src/Acme/Client.js | 364 ------------------ .../letsencrypt/dist/src/Acme/Client.js.map | 1 - plugins/letsencrypt/dist/src/Certbot.js | 114 ------ plugins/letsencrypt/dist/src/Certbot.js.map | 1 - .../dist/src/ProviderLoader.js.map | 1 - plugins/letsencrypt/dist/src/index.js | 16 - plugins/letsencrypt/dist/src/index.js.map | 1 - plugins/letsencrypt/tsconfig.json | 3 +- 55 files changed, 227 insertions(+), 766 deletions(-) delete mode 100644 backend/src/inc/Credential/ICredential.ts create mode 100644 core/src/inc/Credential/ICredential.ts create mode 100644 core/src/inc/Credential/ICredentialAuthBasic.ts create mode 100644 core/src/inc/Provider/AProviderOnLoadEvent.ts create mode 100644 core/src/inc/Provider/BaseProviders.ts create mode 100644 core/src/inc/Provider/CredentialProvider/ACredentialProviderOnLoadEvent.ts rename plugins/demoplugin/dist/{src => }/LoadDb.d.ts (100%) rename plugins/demoplugin/dist/{src => }/index.d.ts (100%) delete mode 100644 plugins/demoplugin/dist/src/LoadDb.js delete mode 100644 plugins/demoplugin/dist/src/LoadDb.js.map delete mode 100644 plugins/demoplugin/dist/src/index.js delete mode 100644 plugins/demoplugin/dist/src/index.js.map rename plugins/letsencrypt/dist/{src => }/Acme.d.ts (100%) rename plugins/letsencrypt/dist/{src => }/Acme/Client.d.ts (100%) rename plugins/letsencrypt/dist/{src => }/Certbot.d.ts (100%) delete mode 100644 plugins/letsencrypt/dist/ProviderLoader.js delete mode 100644 plugins/letsencrypt/dist/ProviderLoader.js.map rename plugins/letsencrypt/dist/{src/ProviderLoader.d.ts => SslCertProviderLoader.d.ts} (71%) rename plugins/letsencrypt/dist/{src/ProviderLoader.js => SslCertProviderLoader.js} (68%) create mode 100644 plugins/letsencrypt/dist/SslCertProviderLoader.js.map rename plugins/letsencrypt/dist/{src => }/index.d.ts (100%) delete mode 100644 plugins/letsencrypt/dist/src/Acme.js delete mode 100644 plugins/letsencrypt/dist/src/Acme.js.map delete mode 100644 plugins/letsencrypt/dist/src/Acme/Client.js delete mode 100644 plugins/letsencrypt/dist/src/Acme/Client.js.map delete mode 100644 plugins/letsencrypt/dist/src/Certbot.js delete mode 100644 plugins/letsencrypt/dist/src/Certbot.js.map delete mode 100644 plugins/letsencrypt/dist/src/ProviderLoader.js.map delete mode 100644 plugins/letsencrypt/dist/src/index.js delete mode 100644 plugins/letsencrypt/dist/src/index.js.map diff --git a/backend/src/Routes/Main/Credential/Provider.ts b/backend/src/Routes/Main/Credential/Provider.ts index c5b49f15..86a26bfe 100644 --- a/backend/src/Routes/Main/Credential/Provider.ts +++ b/backend/src/Routes/Main/Credential/Provider.ts @@ -1,9 +1,16 @@ -import {CredentialProviderResponse} from 'flyingfish_schemas'; +import {CredentialProviderResponse, StatusCodes} from 'flyingfish_schemas'; +import {CredentialProviders} from '../../../inc/Provider/CredentialProvider/CredentialProviders.js'; export class Provider { public static async getProviders(): Promise { + const cp = new CredentialProviders(); + const providers = await cp.getProviders(); + return { + statusCode: StatusCodes.OK, + list: providers + }; } } \ No newline at end of file diff --git a/backend/src/Routes/Main/Ssl/Details.ts b/backend/src/Routes/Main/Ssl/Details.ts index a5355031..6d80a866 100644 --- a/backend/src/Routes/Main/Ssl/Details.ts +++ b/backend/src/Routes/Main/Ssl/Details.ts @@ -26,7 +26,8 @@ export class Details { const domain = await DomainServiceDB.getInstance().findOne(http.domain_id); if (domain) { - const provider = await SslCertProviders.getProvider(http.cert_provider); + const sp = new SslCertProviders(); + const provider = await sp.getProvider(http.cert_provider); if (provider) { // TODO Wildcard diff --git a/backend/src/Routes/Main/Ssl/Providers.ts b/backend/src/Routes/Main/Ssl/Providers.ts index 49947449..9347dd66 100644 --- a/backend/src/Routes/Main/Ssl/Providers.ts +++ b/backend/src/Routes/Main/Ssl/Providers.ts @@ -10,9 +10,11 @@ export class Providers { * getProviders */ public static async getProviders(): Promise { + const sp = new SslCertProviders(); + return { statusCode: StatusCodes.OK, - list: await SslCertProviders.getProviders() + list: await sp.getProviders() }; } diff --git a/backend/src/inc/Credential/Credential.ts b/backend/src/inc/Credential/Credential.ts index 41ee99fa..0fa9b1c3 100644 --- a/backend/src/inc/Credential/Credential.ts +++ b/backend/src/inc/Credential/Credential.ts @@ -1,7 +1,12 @@ -import {CredentialLocationServiceDB, CredentialServiceDB, Logger, NginxLocationServiceDB} from 'flyingfish_core'; +import { + CredentialLocationServiceDB, + CredentialServiceDB, + ICredentialAuthBasic, + Logger, + NginxLocationServiceDB +} from 'flyingfish_core'; import {CredentialSchemaBasic} from 'flyingfish_schemas'; import {CredentialProvider} from './CredentialProvider.js'; -import {ICredentialAuthBasic} from './ICredential.js'; /** * Credential diff --git a/backend/src/inc/Credential/CredentialDatabase.ts b/backend/src/inc/Credential/CredentialDatabase.ts index 38adc676..9b841c90 100644 --- a/backend/src/inc/Credential/CredentialDatabase.ts +++ b/backend/src/inc/Credential/CredentialDatabase.ts @@ -1,7 +1,6 @@ import * as bcrypt from 'bcrypt'; -import {CredentialDB, CredentialUserServiceDB, Logger} from 'flyingfish_core'; -import {CredentialSchemaTypes} from 'flyingfish_schemas/dist/src/index.js'; -import {ICredential, ICredentialAuthBasic} from './ICredential.js'; +import {CredentialDB, CredentialUserServiceDB, Logger, ICredential, ICredentialAuthBasic} from 'flyingfish_core'; +import {CredentialSchemaTypes} from 'flyingfish_schemas'; /** * CredentialDB diff --git a/backend/src/inc/Credential/CredentialProvider.ts b/backend/src/inc/Credential/CredentialProvider.ts index 2096df48..36685401 100644 --- a/backend/src/inc/Credential/CredentialProvider.ts +++ b/backend/src/inc/Credential/CredentialProvider.ts @@ -1,6 +1,6 @@ -import {CredentialDB} from 'flyingfish_core'; +import {CredentialDB, ICredential} from 'flyingfish_core'; import {CredentialDatabase} from './CredentialDatabase.js'; -import {ICredential} from './ICredential.js'; + /** * CredentialProvider diff --git a/backend/src/inc/Credential/ICredential.ts b/backend/src/inc/Credential/ICredential.ts deleted file mode 100644 index cd9b36b0..00000000 --- a/backend/src/inc/Credential/ICredential.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {CredentialSchemaTypes} from 'flyingfish_schemas'; - -/** - * ICredential - */ -export interface ICredential { - getSupports(): CredentialSchemaTypes[]; - - getName(): string; -} - -/** - * ICredentialAuthBasic - */ -export interface ICredentialAuthBasic extends ICredential { - authBasic(username: string, password: string): Promise; -} \ No newline at end of file diff --git a/backend/src/inc/Provider/CredentialProvider/CredentialProviders.ts b/backend/src/inc/Provider/CredentialProvider/CredentialProviders.ts index 4acc07da..83b45fe3 100644 --- a/backend/src/inc/Provider/CredentialProvider/CredentialProviders.ts +++ b/backend/src/inc/Provider/CredentialProvider/CredentialProviders.ts @@ -1,17 +1,22 @@ -import {ICredentialProvider, ICredentialProviders} from 'flyingfish_core'; +import { + BaseProviders, + ICredentialProvider, + ICredentialProviders +} from 'flyingfish_core'; import {ProviderEntry} from 'flyingfish_schemas'; -export class CredentialProviders implements ICredentialProviders { - - public async getCredentialProvider( - name: string, - sourceCredentialId: number - ): Promise { - return null; - } +/** + * Credential providers + */ +export class CredentialProviders extends BaseProviders implements ICredentialProviders { + /** + * Return a provider by name + * @param {string} name + * @returns {ICredentialProvider | null} + */ public async getProvider(name: string): Promise { - return null; + return this._getProvider(name); } public getProviders(): Promise { diff --git a/backend/src/inc/Provider/SslCertProvider/SslCertProviders.ts b/backend/src/inc/Provider/SslCertProvider/SslCertProviders.ts index 18a845ad..96944f1e 100644 --- a/backend/src/inc/Provider/SslCertProvider/SslCertProviders.ts +++ b/backend/src/inc/Provider/SslCertProvider/SslCertProviders.ts @@ -1,10 +1,16 @@ -import {ASslCertProviderOnLoadEvent, ISslCertProvider, ISslCertProviders, PluginManager} from 'flyingfish_core'; +import { + ASslCertProviderOnLoadEvent, + BaseProviders, + ISslCertProvider, + ISslCertProviders, + PluginManager +} from 'flyingfish_core'; import {ProviderEntry} from 'flyingfish_schemas'; /** * Ssl Certificate provider. */ -export class SslCertProviders implements ISslCertProviders { +export class SslCertProviders extends BaseProviders implements ISslCertProviders { /** * Get a provider object by provider name. @@ -12,21 +18,7 @@ export class SslCertProviders implements ISslCertProviders { * @returns {ISslCertProvider|null} */ public async getProvider(name: string): Promise { - const events = PluginManager.getInstance().getAllEvents( - ASslCertProviderOnLoadEvent - ); - - for await (const event of events) { - const providers = await event.getProviders(); - - for (const provider of providers) { - if (provider.getName() === name) { - return provider; - } - } - } - - return null; + return this._getProvider(name); } /** diff --git a/backend/src/inc/Service/NginxService.ts b/backend/src/inc/Service/NginxService.ts index 6c6b5855..54dd06c2 100644 --- a/backend/src/inc/Service/NginxService.ts +++ b/backend/src/inc/Service/NginxService.ts @@ -18,7 +18,8 @@ import { NginxUpstreamDB, NginxUpstreamServiceDB, SshPortDB, - SshPortServiceDB + SshPortServiceDB, + SslCertBundel } from 'flyingfish_core'; import { NginxHttpVariableContextType, @@ -28,8 +29,7 @@ import { NginxListenVariableContextType, NginxLocationDestinationTypes, NginxStreamDestinationType, - NginxStreamSshR, - SslCertBundel + NginxStreamSshR } from 'flyingfish_schemas'; import fs from 'fs/promises'; import path from 'path'; @@ -599,7 +599,7 @@ export class NginxService { weight: 0, max_fails: 0, fail_timeout: 0, - unix_sock: unixSocket + //unix_sock: unixSocket }); } else { Logger.getLogger().silly(`Destination listen not found by domain: ${domainName}`, { @@ -982,7 +982,8 @@ export class NginxService { // ssl use --------------------------------------------------------------------------------------------- if (ssl_enable) { - const provider = await SslCertProviders.getProvider(httpSubCollect.http.cert_provider); + const sslCertProviders = new SslCertProviders(); + const provider = await sslCertProviders.getProvider(httpSubCollect.http.cert_provider); if (provider) { let sslBundel: SslCertBundel | null = null; diff --git a/core/src/inc/Credential/ICredential.ts b/core/src/inc/Credential/ICredential.ts new file mode 100644 index 00000000..00bf5a4c --- /dev/null +++ b/core/src/inc/Credential/ICredential.ts @@ -0,0 +1,20 @@ +import {CredentialSchemaTypes} from 'flyingfish_schemas'; + +/** + * Interface of credential + */ +export interface ICredential { + + /** + * Return the supported types + * @returns {CredentialSchemaTypes[]} + */ + getSupports(): CredentialSchemaTypes[]; + + /** + * Return the credential name + * @returns {string} + */ + getName(): string; + +} \ No newline at end of file diff --git a/core/src/inc/Credential/ICredentialAuthBasic.ts b/core/src/inc/Credential/ICredentialAuthBasic.ts new file mode 100644 index 00000000..869057e6 --- /dev/null +++ b/core/src/inc/Credential/ICredentialAuthBasic.ts @@ -0,0 +1,16 @@ +import {ICredential} from './ICredential.js'; + +/** + * Interface of credential auth basic + */ +export interface ICredentialAuthBasic extends ICredential { + + /** + * Check an auth by username and password + * @param {string} username + * @param {string} password + * @returns {boolean} + */ + authBasic(username: string, password: string): Promise; + +} \ No newline at end of file diff --git a/core/src/inc/PluginSystem/PluginDefinition.ts b/core/src/inc/PluginSystem/PluginDefinition.ts index 3b9c6e4f..693d8e0d 100644 --- a/core/src/inc/PluginSystem/PluginDefinition.ts +++ b/core/src/inc/PluginSystem/PluginDefinition.ts @@ -9,7 +9,8 @@ export const SchemaPluginDefinition = Vts.object({ version: Vts.string(), author: Vts.string(), url: Vts.string(), - main: Vts.string() + main: Vts.string(), + main_directory: Vts.optional(Vts.array(Vts.string())) }); /** diff --git a/core/src/inc/PluginSystem/PluginManager.ts b/core/src/inc/PluginSystem/PluginManager.ts index 29d617a4..0222d950 100644 --- a/core/src/inc/PluginSystem/PluginManager.ts +++ b/core/src/inc/PluginSystem/PluginManager.ts @@ -160,15 +160,32 @@ export class PluginManager { */ public async load(plugin: PluginInformation): Promise { try { + let importFile: string|null = null; + const pluginMain = path.join(plugin.path, plugin.definition.main); - if (!await FileHelper.fileExist(pluginMain)) { - throw new Error(`plugin main not found: ${pluginMain}`); + if (await FileHelper.fileExist(pluginMain, true)) { + importFile = pluginMain; + } + + if (plugin.definition.main_directory) { + for await (const dir of plugin.definition.main_directory) { + const pluginSubMain = path.join(plugin.path, dir, plugin.definition.main); + + if (await FileHelper.fileExist(pluginSubMain, true)) { + importFile = pluginSubMain; + break; + } + } + } + + if (importFile === null) { + throw new Error(`plugin main not found: ${plugin.path}`); } - Logger.getLogger().silly(`PluginManager::load: file plugin: ${pluginMain} (${plugin.definition.name})`); + Logger.getLogger().silly(`PluginManager::load: file plugin: ${importFile} (${plugin.definition.name})`); - const oPlugin = await import(pluginMain); + const oPlugin = await import(importFile); console.log(oPlugin); diff --git a/core/src/inc/Provider/AProviderOnLoadEvent.ts b/core/src/inc/Provider/AProviderOnLoadEvent.ts new file mode 100644 index 00000000..463397eb --- /dev/null +++ b/core/src/inc/Provider/AProviderOnLoadEvent.ts @@ -0,0 +1,15 @@ +import {APluginEvent} from '../PluginSystem/APluginEvent.js'; +import {IProvider} from './IProvider.js'; + +/** + * Provider on load event + */ +export abstract class AProviderOnLoadEvent extends APluginEvent { + + /** + * Return all supported Providers. + * @returns {T[]} + */ + public abstract getProviders(): Promise; + +} \ No newline at end of file diff --git a/core/src/inc/Provider/BaseProviders.ts b/core/src/inc/Provider/BaseProviders.ts new file mode 100644 index 00000000..c5d5acb6 --- /dev/null +++ b/core/src/inc/Provider/BaseProviders.ts @@ -0,0 +1,29 @@ +import {PluginManager} from '../PluginSystem/PluginManager.js'; +import {AProviderOnLoadEvent} from './AProviderOnLoadEvent.js'; +import {IProvider} from './IProvider.js'; + +export class BaseProviders { + + /** + * Return a provider by name + * @param {string} name + * @protected + * @returns {T|null} + */ + protected async _getProvider(name: string): Promise { + const events = PluginManager.getInstance().getAllEvents>(AProviderOnLoadEvent); + + for await (const event of events) { + const providers = await event.getProviders(); + + for (const provider of providers) { + if (provider.getName() === name) { + return provider; + } + } + } + + return null; + } + +} \ No newline at end of file diff --git a/core/src/inc/Provider/CredentialProvider/ACredentialProviderOnLoadEvent.ts b/core/src/inc/Provider/CredentialProvider/ACredentialProviderOnLoadEvent.ts new file mode 100644 index 00000000..43e607f9 --- /dev/null +++ b/core/src/inc/Provider/CredentialProvider/ACredentialProviderOnLoadEvent.ts @@ -0,0 +1,7 @@ +import {AProviderOnLoadEvent} from '../AProviderOnLoadEvent.js'; +import {ICredentialProvider} from './ICredentialProvider.js'; + +/** + * Abstract class for provider on load event + */ +export abstract class ACredentialProviderOnLoadEvent extends AProviderOnLoadEvent {} \ No newline at end of file diff --git a/core/src/inc/Provider/CredentialProvider/ICredentialProvider.ts b/core/src/inc/Provider/CredentialProvider/ICredentialProvider.ts index 2cd2ca7e..19096faf 100644 --- a/core/src/inc/Provider/CredentialProvider/ICredentialProvider.ts +++ b/core/src/inc/Provider/CredentialProvider/ICredentialProvider.ts @@ -1,6 +1,14 @@ +import {ICredential} from '../../Credential/ICredential.js'; import {IProvider} from '../IProvider.js'; /** * Interface of a Credential provider */ -export type ICredentialProvider = IProvider; \ No newline at end of file +export interface ICredentialProvider extends IProvider { + + /** + * Return the credential + */ + getCredential(): ICredential; + +} \ No newline at end of file diff --git a/core/src/inc/Provider/CredentialProvider/ICredentialProviders.ts b/core/src/inc/Provider/CredentialProvider/ICredentialProviders.ts index 9becb2fa..9119b4ae 100644 --- a/core/src/inc/Provider/CredentialProvider/ICredentialProviders.ts +++ b/core/src/inc/Provider/CredentialProvider/ICredentialProviders.ts @@ -4,14 +4,4 @@ import {ICredentialProvider} from './ICredentialProvider.js'; /** * Interface of credential providers */ -export interface ICredentialProviders extends IProviders { - - /** - * Return the credential provider by name - * @param {string} name - * @param {number} sourceCredentialId - * @returns {IProvider|null} - */ - getCredentialProvider(name: string, sourceCredentialId: number): Promise; - -} \ No newline at end of file +export type ICredentialProviders = IProviders; \ No newline at end of file diff --git a/core/src/inc/Provider/SslCertProvider/ASslCertProviderOnLoadEvent.ts b/core/src/inc/Provider/SslCertProvider/ASslCertProviderOnLoadEvent.ts index 29c55be3..5736fe05 100644 --- a/core/src/inc/Provider/SslCertProvider/ASslCertProviderOnLoadEvent.ts +++ b/core/src/inc/Provider/SslCertProvider/ASslCertProviderOnLoadEvent.ts @@ -1,15 +1,7 @@ -import {APluginEvent} from '../../PluginSystem/APluginEvent.js'; +import {AProviderOnLoadEvent} from '../AProviderOnLoadEvent.js'; import {ISslCertProvider} from './ISslCertProvider.js'; /** * Abstract certificate provider on load event. */ -export abstract class ASslCertProviderOnLoadEvent extends APluginEvent { - - /** - * Return all supported Providers. - * @returns {ISslCertProvider[]} - */ - public abstract getProviders(): Promise; - -} \ No newline at end of file +export abstract class ASslCertProviderOnLoadEvent extends AProviderOnLoadEvent {} \ No newline at end of file diff --git a/core/src/inc/Utils/FileHelper.ts b/core/src/inc/Utils/FileHelper.ts index 7f6ebcc4..2ef92da6 100644 --- a/core/src/inc/Utils/FileHelper.ts +++ b/core/src/inc/Utils/FileHelper.ts @@ -1,4 +1,5 @@ -import {mkdir, stat, unlink, readFile, readdir} from 'fs/promises'; +import {mkdir, stat, unlink, readFile, readdir, lstat} from 'fs/promises'; +import {Logger} from '../Logger/Logger.js'; /** * FileHelper @@ -30,14 +31,30 @@ export class FileHelper { /** * fileExist - * @param file + * @param {string} file + * @param {boolean} allowLink + * @returns {boolean} */ - public static async fileExist(file: string): Promise { + public static async fileExist(file: string, allowLink: boolean = false): Promise { try { - return (await stat(file)).isFile(); + if( (await stat(file)).isFile()) { + return true; + } } catch (e) { - return false; + Logger.getLogger().silly(`FileHelper::fileExist: exception by file: ${file}`, e); } + + if (allowLink) { + try { + if ((await lstat(file)).isSymbolicLink()) { + return true; + } + } catch (e) { + Logger.getLogger().silly(`FileHelper::fileExist: exception by file link: ${file}`, e); + } + } + + return false; } /** diff --git a/core/src/index.ts b/core/src/index.ts index e89c1843..8c2fa8d0 100644 --- a/core/src/index.ts +++ b/core/src/index.ts @@ -4,6 +4,10 @@ export {Args} from './inc/Env/Args.js'; // Config export {Config} from './inc/Config/Config.js'; +// Credential +export {ICredential} from './inc/Credential/ICredential.js'; +export {ICredentialAuthBasic} from './inc/Credential/ICredentialAuthBasic.js'; + // Logger export {Logger} from './inc/Logger/Logger.js'; @@ -118,10 +122,13 @@ export {APluginEvent} from './inc/PluginSystem/APluginEvent.js'; // Provider export {IProvider} from './inc/Provider/IProvider.js'; export {IProviders} from './inc/Provider/IProviders.js'; +export {AProviderOnLoadEvent} from './inc/Provider/AProviderOnLoadEvent.js'; +export {BaseProviders} from './inc/Provider/BaseProviders.js'; // Provider CredentialProvider export {ICredentialProvider} from './inc/Provider/CredentialProvider/ICredentialProvider.js'; export {ICredentialProviders} from './inc/Provider/CredentialProvider/ICredentialProviders.js'; +export {ACredentialProviderOnLoadEvent} from './inc/Provider/CredentialProvider/ACredentialProviderOnLoadEvent.js'; // Provider SslCertProvider export {ASslCertProviderOnLoadEvent} from './inc/Provider/SslCertProvider/ASslCertProviderOnLoadEvent.js'; diff --git a/plugins/demoplugin/dist/src/LoadDb.d.ts b/plugins/demoplugin/dist/LoadDb.d.ts similarity index 100% rename from plugins/demoplugin/dist/src/LoadDb.d.ts rename to plugins/demoplugin/dist/LoadDb.d.ts diff --git a/plugins/demoplugin/dist/src/index.d.ts b/plugins/demoplugin/dist/index.d.ts similarity index 100% rename from plugins/demoplugin/dist/src/index.d.ts rename to plugins/demoplugin/dist/index.d.ts diff --git a/plugins/demoplugin/dist/index.js b/plugins/demoplugin/dist/index.js index 920587eb..c5bf8ff5 100644 --- a/plugins/demoplugin/dist/index.js +++ b/plugins/demoplugin/dist/index.js @@ -1,4 +1,4 @@ -import { APlugin } from 'flyingfish_core'; +import { APlugin, PluginServiceNames } from 'flyingfish_core'; import { LoadDb } from './LoadDb.js'; export default class DemoPlugin extends APlugin { getName() { @@ -8,7 +8,9 @@ export default class DemoPlugin extends APlugin { return false; } onEnable() { - this.getPluginManager().registerEvents(new LoadDb(), this); + if (this.getPluginManager().getServiceName() === PluginServiceNames.backend) { + this.getPluginManager().registerEvents(new LoadDb(), this); + } return false; } } diff --git a/plugins/demoplugin/dist/index.js.map b/plugins/demoplugin/dist/index.js.map index edda3823..a5a15771 100644 --- a/plugins/demoplugin/dist/index.js.map +++ b/plugins/demoplugin/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAKnC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,MAAM;IAKnC,OAAO;QACV,OAAO,YAAY,CAAC;IACxB,CAAC;IAKM,SAAS;QACZ,OAAO,KAAK,CAAC;IACjB,CAAC;IAKM,QAAQ;QAEX,IAAI,CAAC,gBAAgB,EAAE,CAAC,cAAc,CAAC,IAAI,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;QAE3D,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAKnC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,OAAO;IAKpC,OAAO;QACV,OAAO,YAAY,CAAC;IACxB,CAAC;IAKM,SAAS;QACZ,OAAO,KAAK,CAAC;IACjB,CAAC;IAKM,QAAQ;QACX,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC,cAAc,EAAE,KAAK,kBAAkB,CAAC,OAAO,EAAE,CAAC;YAE1E,IAAI,CAAC,gBAAgB,EAAE,CAAC,cAAc,CAAC,IAAI,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;QAC/D,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ"} \ No newline at end of file diff --git a/plugins/demoplugin/dist/src/LoadDb.js b/plugins/demoplugin/dist/src/LoadDb.js deleted file mode 100644 index 30c14eec..00000000 --- a/plugins/demoplugin/dist/src/LoadDb.js +++ /dev/null @@ -1,10 +0,0 @@ -import { ADBTableLoaderOnLoadEvent } from 'flyingfish_core'; -export class LoadDb extends ADBTableLoaderOnLoadEvent { - getName() { - return 'LoadDb'; - } - async onRegisterEntities() { - return []; - } -} -//# sourceMappingURL=LoadDb.js.map \ No newline at end of file diff --git a/plugins/demoplugin/dist/src/LoadDb.js.map b/plugins/demoplugin/dist/src/LoadDb.js.map deleted file mode 100644 index 3fd77c2d..00000000 --- a/plugins/demoplugin/dist/src/LoadDb.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LoadDb.js","sourceRoot":"","sources":["../../src/LoadDb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,yBAAyB,EAAC,MAAM,iBAAiB,CAAC;AAM1D,MAAM,OAAO,MAAO,SAAQ,yBAAyB;IAK1C,OAAO;QACV,OAAO,QAAQ,CAAC;IACpB,CAAC;IAKM,KAAK,CAAC,kBAAkB;QAC3B,OAAO,EAAE,CAAC;IACd,CAAC;CAEJ"} \ No newline at end of file diff --git a/plugins/demoplugin/dist/src/index.js b/plugins/demoplugin/dist/src/index.js deleted file mode 100644 index 920587eb..00000000 --- a/plugins/demoplugin/dist/src/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import { APlugin } from 'flyingfish_core'; -import { LoadDb } from './LoadDb.js'; -export default class DemoPlugin extends APlugin { - getName() { - return 'DemoPlugin'; - } - onDisable() { - return false; - } - onEnable() { - this.getPluginManager().registerEvents(new LoadDb(), this); - return false; - } -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/plugins/demoplugin/dist/src/index.js.map b/plugins/demoplugin/dist/src/index.js.map deleted file mode 100644 index 1d5b57ec..00000000 --- a/plugins/demoplugin/dist/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAKnC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,MAAM;IAKnC,OAAO;QACV,OAAO,YAAY,CAAC;IACxB,CAAC;IAKM,SAAS;QACZ,OAAO,KAAK,CAAC;IACjB,CAAC;IAKM,QAAQ;QAEX,IAAI,CAAC,gBAAgB,EAAE,CAAC,cAAc,CAAC,IAAI,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;QAE3D,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ"} \ No newline at end of file diff --git a/plugins/demoplugin/tsconfig.json b/plugins/demoplugin/tsconfig.json index 0aa7dc9e..f989810c 100644 --- a/plugins/demoplugin/tsconfig.json +++ b/plugins/demoplugin/tsconfig.json @@ -13,7 +13,8 @@ "removeComments": true, "sourceMap": true, "strict": true, - "target": "ES2022" + "target": "ES2022", + "rootDir": "src" }, "include": [ "./src/**/*.ts" diff --git a/plugins/letsencrypt/dist/src/Acme.d.ts b/plugins/letsencrypt/dist/Acme.d.ts similarity index 100% rename from plugins/letsencrypt/dist/src/Acme.d.ts rename to plugins/letsencrypt/dist/Acme.d.ts diff --git a/plugins/letsencrypt/dist/Acme.js.map b/plugins/letsencrypt/dist/Acme.js.map index 1f411829..0fc3b062 100644 --- a/plugins/letsencrypt/dist/Acme.js.map +++ b/plugins/letsencrypt/dist/Acme.js.map @@ -1 +1 @@ -{"version":3,"file":"Acme.js","sourceRoot":"","sources":["../src/Acme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,EAAC,UAAU,EAAE,UAAU,EA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ACrC,KAAK,EAAE,8CAA8C;qBACxD,CAAC,CAAC;gBACP,CAAC;gBAGD,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;gBAE7C,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;oBACxB,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,oDAAoD,UAAU,YAAY,WAAW,CAAC,KAAK,EAAE,EAAE;wBACpH,KAAK,EAAE,8CAA8C;qBACxD,CAAC,CAAC;oBAEH,OAAO,KAAK,CAAC;gBACjB,CAAC;gBAED,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;gBAExD,IAAI,CAAC,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC;oBAC1C,OAAO,KAAK,CAAC;gBACjB,CAAC;gBAED,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,oCAAoC,YAAY,CAAC,QAAQ,EAAE,EAAE;oBAClF,KAAK,EAAE,8CAA8C;iBACxD,CAAC,CAAC;YACP,CAAC;QACL,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,oCAAoC,EAAE;gBAC3D,KAAK,EAAE,8CAA8C;aACxD,CAAC,CAAC;QACP,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC"} \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/Acme/Client.d.ts b/plugins/letsencrypt/dist/Acme/Client.d.ts similarity index 100% rename from plugins/letsencrypt/dist/src/Acme/Client.d.ts rename to plugins/letsencrypt/dist/Acme/Client.d.ts diff --git a/plugins/letsencrypt/dist/Acme/Client.js.map b/plugins/letsencrypt/dist/Acme/Client.js.map index 6f03ebdf..6934baac 100644 --- a/plugins/letsencrypt/dist/Acme/Client.js.map +++ b/plugins/letsencrypt/dist/Acme/Client.js.map @@ -1 +1 @@ -{"version":3,"file":"Client.js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C;oBAE/F,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;oBAElB,IAAI,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;oBAE1B,OAAO,CAAC,OAAO,EAAE,CAAC;wBAEd,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;4BAClB,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;wBACrC,CAAC,CAAC,CAAC;wBAGH,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAClG,CAAC;oBAED,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;oBAEpF,OAAO;wBACH,YAAY,EAAE,EAAE,CAAC,YAAY;wBAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;qBAC1B,CAAC;gBACN,CAAC;YACL,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC"} \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/Certbot.d.ts b/plugins/letsencrypt/dist/Certbot.d.ts similarity index 100% rename from plugins/letsencrypt/dist/src/Certbot.d.ts rename to plugins/letsencrypt/dist/Certbot.d.ts diff --git a/plugins/letsencrypt/dist/Certbot.js.map b/plugins/letsencrypt/dist/Certbot.js.map index 9d39ef97..453480fd 100644 --- a/plugins/letsencrypt/dist/Certbot.js.map +++ b/plugins/letsencrypt/dist/Certbot.js.map @@ -1 +1 @@ -{"version":3,"file":"Certbot.js","sourceRoot":"","sources":["../src/Certbot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAO/D,O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I,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7C,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;QAE7E,IAAI,CAAC,WAAW,EAAE,CAAC;YACf,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,iCAAiC,EAAE;gBACxD,KAAK,EAAE,iDAAiD;aAC3D,CAAC,CAAC;QACP,CAAC;QAED,IAAI,SAAS,GAAG,KAAK,CAAC;QAEtB,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;YACnB,SAAS,GAAG,IAAI,CAAC;QACrB,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,gBAAgB,UAAU,EAAE,EAAE;gBACnD,KAAK,EAAE,iDAAiD;aAC3D,CAAC,CAAC;QACP,CAAC;QAED,OAAO,WAAW,IAAI,SAAS,CAAC;IACpC,CAAC"} \ No newline at end of file diff --git a/plugins/letsencrypt/dist/ProviderLoader.js b/plugins/letsencrypt/dist/ProviderLoader.js deleted file mode 100644 index 929c671f..00000000 --- a/plugins/letsencrypt/dist/ProviderLoader.js +++ /dev/null @@ -1,14 +0,0 @@ -import { ASslCertProviderOnLoadEvent } from 'flyingfish_core'; -import { Certbot } from './Certbot.js'; -export class ProviderLoader extends ASslCertProviderOnLoadEvent { - _providers = [ - new Certbot(), - ]; - getName() { - return 'letsencrypt'; - } - async getProviders() { - return this._providers; - } -} -//# sourceMappingURL=ProviderLoader.js.map \ No newline at end of file diff --git a/plugins/letsencrypt/dist/ProviderLoader.js.map b/plugins/letsencrypt/dist/ProviderLoader.js.map deleted file mode 100644 index e699c7bf..00000000 --- a/plugins/letsencrypt/dist/ProviderLoader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProviderLoader.js","sourceRoot":"","sources":["../src/ProviderLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,wBAAwB,EAAC,MAAM,iBAAiB,CAAC;AAGzD,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAKrC,MAAM,OAAO,cAAe,SAAQ,wBAAwB;IAM9C,UAAU,GAAuB;QACvC,IAAI,OAAO,EAAE;KAEhB,CAAC;IAMK,OAAO;QACV,OAAO,aAAa,CAAC;IACzB,CAAC;IAMM,KAAK,CAAC,YAAY;QACrB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CAEJ"} \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/ProviderLoader.d.ts b/plugins/letsencrypt/dist/SslCertProviderLoader.d.ts similarity index 71% rename from plugins/letsencrypt/dist/src/ProviderLoader.d.ts rename to plugins/letsencrypt/dist/SslCertProviderLoader.d.ts index 0b0d3c94..bcf39865 100644 --- a/plugins/letsencrypt/dist/src/ProviderLoader.d.ts +++ b/plugins/letsencrypt/dist/SslCertProviderLoader.d.ts @@ -1,5 +1,5 @@ import { ASslCertProviderOnLoadEvent, ISslCertProvider } from 'flyingfish_core'; -export declare class ProviderLoader extends ASslCertProviderOnLoadEvent { +export declare class SslCertProviderLoader extends ASslCertProviderOnLoadEvent { protected _providers: ISslCertProvider[]; getName(): string; getProviders(): Promise; diff --git a/plugins/letsencrypt/dist/src/ProviderLoader.js b/plugins/letsencrypt/dist/SslCertProviderLoader.js similarity index 68% rename from plugins/letsencrypt/dist/src/ProviderLoader.js rename to plugins/letsencrypt/dist/SslCertProviderLoader.js index 929c671f..a1b5e53b 100644 --- a/plugins/letsencrypt/dist/src/ProviderLoader.js +++ b/plugins/letsencrypt/dist/SslCertProviderLoader.js @@ -1,6 +1,6 @@ import { ASslCertProviderOnLoadEvent } from 'flyingfish_core'; import { Certbot } from './Certbot.js'; -export class ProviderLoader extends ASslCertProviderOnLoadEvent { +export class SslCertProviderLoader extends ASslCertProviderOnLoadEvent { _providers = [ new Certbot(), ]; @@ -11,4 +11,4 @@ export class ProviderLoader extends ASslCertProviderOnLoadEvent { return this._providers; } } -//# sourceMappingURL=ProviderLoader.js.map \ No newline at end of file +//# sourceMappingURL=SslCertProviderLoader.js.map \ No newline at end of file diff --git a/plugins/letsencrypt/dist/SslCertProviderLoader.js.map b/plugins/letsencrypt/dist/SslCertProviderLoader.js.map new file mode 100644 index 00000000..96802f6d --- /dev/null +++ b/plugins/letsencrypt/dist/SslCertProviderLoader.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SslCertProviderLoader.js","sourceRoot":"","sources":["../src/SslCertProviderLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,2BAA2B,EAAmB,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAKrC,MAAM,OAAO,qBAAsB,SAAQ,2BAA2B;IAMxD,UAAU,GAAuB;QACvC,IAAI,OAAO,EAAE;KAEhB,CAAC;IAMK,OAAO;QACV,OAAO,aAAa,CAAC;IACzB,CAAC;IAMM,KAAK,CAAC,YAAY;QACrB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CAEJ"} \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/index.d.ts b/plugins/letsencrypt/dist/index.d.ts similarity index 100% rename from plugins/letsencrypt/dist/src/index.d.ts rename to plugins/letsencrypt/dist/index.d.ts diff --git a/plugins/letsencrypt/dist/index.js b/plugins/letsencrypt/dist/index.js index 7eb2a5a9..99eb17be 100644 --- a/plugins/letsencrypt/dist/index.js +++ b/plugins/letsencrypt/dist/index.js @@ -1,5 +1,5 @@ -import { APlugin } from 'flyingfish_core'; -import { ProviderLoader } from './ProviderLoader.js'; +import { APlugin, PluginServiceNames } from 'flyingfish_core'; +import { SslCertProviderLoader } from './SslCertProviderLoader.js'; export default class LetsEncrypt extends APlugin { getName() { return 'LetsEncrypt'; @@ -8,8 +8,9 @@ export default class LetsEncrypt extends APlugin { return false; } onEnable() { - const pl = new ProviderLoader(); - this.getPluginManager().registerEvents(pl, this); + if (this.getPluginManager().getServiceName() === PluginServiceNames.backend) { + this.getPluginManager().registerEvents(new SslCertProviderLoader(), this); + } return true; } } diff --git a/plugins/letsencrypt/dist/index.js.map b/plugins/letsencrypt/dist/index.js.map index 0c291197..6a1eef97 100644 --- a/plugins/letsencrypt/dist/index.js.map +++ b/plugins/letsencrypt/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAKnD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,MAAM;IAMpC,OAAO;QACV,OAAO,aAAa,CAAC;IACzB,CAAC;IAMM,SAAS;QACZ,OAAO,KAAK,CAAC;IACjB,CAAC;IAMM,QAAQ;QACX,MAAM,EAAE,GAAG,IAAI,cAAc,EAAE,CAAC;QAEhC,IAAI,CAAC,gBAAgB,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAEjD,OAAO,IAAI,CAAC;IAChB,CAAC;CAEJ"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAC,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AAKjE,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAMrC,OAAO;QACV,OAAO,aAAa,CAAC;IACzB,CAAC;IAMM,SAAS;QACZ,OAAO,KAAK,CAAC;IACjB,CAAC;IAMM,QAAQ;QACX,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC,cAAc,EAAE,KAAK,kBAAkB,CAAC,OAAO,EAAE,CAAC;YAC1E,IAAI,CAAC,gBAAgB,EAAE,CAAC,cAAc,CAAC,IAAI,qBAAqB,EAAE,EAAE,IAAI,CAAC,CAAC;QAC9E,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;CAEJ"} \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/Acme.js b/plugins/letsencrypt/dist/src/Acme.js deleted file mode 100644 index f75b3c3f..00000000 --- a/plugins/letsencrypt/dist/src/Acme.js +++ /dev/null @@ -1,118 +0,0 @@ -import { Ets } from 'ets'; -import { DateHelper, FileHelper, Logger } from 'flyingfish_core'; -import path from 'path'; -import { Client } from './Acme/Client.js'; -export class Acme { - static LIMIT_REQUESTS = 5; - static LIMIT_TIME_HOUR = 1; - static PEM_CERT = 'cert.pem'; - static PEM_CHAIN = 'chain.pem'; - static PEM_FULLCHAIN = 'fullchain.pem'; - static PEM_PRIVTKEY = 'privkey.pem'; - _livePath = '/etc/letsencrypt/live'; - getName() { - return 'letsencrypt_dns01'; - } - getTitle() { - return 'LetsEncrypt (DNS-01)'; - } - isSupportWildcard() { - return true; - } - async isReadyForRequest(lastRequest, tryCount, onResetTryCount) { - if ((tryCount >= Acme.LIMIT_REQUESTS) && !DateHelper.isOverAHour(lastRequest, Acme.LIMIT_TIME_HOUR)) { - return false; - } - else if ((tryCount >= Acme.LIMIT_REQUESTS) && - DateHelper.isOverAHour(lastRequest, Acme.LIMIT_TIME_HOUR)) { - if (onResetTryCount) { - await onResetTryCount(); - } - } - return true; - } - _getDomainDir(domainName) { - return path.join(this._livePath, domainName); - } - _getFileName(fileType, isWildcard = false) { - return `${isWildcard ?? 'wildcard'}.${fileType}`; - } - async existCertificate(domainName, options) { - const domainDir = this._getDomainDir(domainName); - if (await FileHelper.directoryExist(domainDir)) { - return FileHelper.fileExist(path.join(domainDir, this._getFileName(Acme.PEM_CERT, options.wildcard))); - } - return false; - } - async getCertificationBundel(domainName, options) { - if (await this.existCertificate(domainName, { wildcard: options.wildcard })) { - const domainDir = this._getDomainDir(domainName); - return { - certPem: path.join(domainDir, this._getFileName(Acme.PEM_CERT, options.wildcard)), - chainPem: path.join(domainDir, this._getFileName(Acme.PEM_CHAIN, options.wildcard)), - fullChainPem: path.join(domainDir, this._getFileName(Acme.PEM_FULLCHAIN, options.wildcard)), - privatKeyPem: path.join(domainDir, this._getFileName(Acme.PEM_PRIVTKEY, options.wildcard)) - }; - } - return null; - } - async createCertificate(options, global) { - if (global.dnsServer) { - const acmeClient = new Client({ - keysize: options.keySize - }); - await acmeClient.init(); - let domainName = options.domainName; - if (options.wildcard) { - domainName = `*.${options.domainName}`; - } - const acmeRequest = await acmeClient.requestDnsChallenge(domainName); - if (acmeRequest === null) { - Logger.getLogger().error(`Acme request faild for domain: ${domainName}`, { - class: 'Plugin::LetsEncrypt::Acme::createCertificate' - }); - return false; - } - const newDomain = `${acmeRequest.recordName}.${domainName}`; - const isAdd = global.dnsServer.addTempDomain(newDomain, [{ - name: acmeRequest.recordName, - type: 0x10, - class: 1, - ttl: 300, - data: acmeRequest.recordText - }]); - if (isAdd) { - let acmeFinalize = null; - try { - acmeFinalize = await acmeClient.submitDnsChallengeAndFinalize(acmeRequest.order); - } - catch (e) { - Logger.getLogger().error(Ets.formate(e), { - class: 'Plugin::LetsEncrypt::Acme::createCertificate' - }); - } - global.dnsServer.removeTempDomain(newDomain); - if (acmeFinalize === null) { - Logger.getLogger().error(`Acme callenge finalize request faild for domain: ${domainName}, order: ${acmeRequest.order}`, { - class: 'Plugin::LetsEncrypt::Acme::createCertificate' - }); - return false; - } - const certPath = this._getDomainDir(options.domainName); - if (!await FileHelper.mkdir(certPath, true)) { - return false; - } - Logger.getLogger().silly(`Acme callenge finalize response: ${acmeFinalize.pkcs8Key}`, { - class: 'Plugin::LetsEncrypt::Acme::createCertificate' - }); - } - } - else { - Logger.getLogger().error('Acme can not use without dnsserver', { - class: 'Plugin::LetsEncrypt::Acme::createCertificate' - }); - } - return false; - } -} -//# sourceMappingURL=Acme.js.map \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/Acme.js.map b/plugins/letsencrypt/dist/src/Acme.js.map deleted file mode 100644 index 130860be..00000000 --- a/plugins/letsencrypt/dist/src/Acme.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Acme.js","sourceRoot":"","sources":["../../src/Acme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,EACH,UAAU,EACV,UAAU,EAGV,MAAM,EAET,MAAM,iBAAiB,CAAC;AACzB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAC,MAAM,EAAqC,MAAM,kBAAkB,CAAC;AAK5E,MAAM,OAAO,IAAI;IAEN,MAAM,CAAU,cAAc,GAAG,CAAC,CAAC;IACnC,MAAM,CAAU,eAAe,GAAG,CAAC,CAAC;IAEpC,MAAM,CAAU,QAAQ,GAAG,UAAU,CAAC;IACtC,MAAM,CAAU,SAAS,GAAG,WAAW,CAAC;IACxC,MAAM,CAAU,aAAa,GAAG,eAAe,CAAC;IAChD,MAAM,CAAU,YAAY,GAAG,aAAa,CAAC;IAM1C,SAAS,GAAW,uBAAuB,CAAC;IAM/C,OAAO;QACV,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAMM,QAAQ;QACX,OAAO,sBAAsB,CAAC;IAClC,CAAC;IAMM,iBAAiB;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;IASM,KAAK,CAAC,iBAAiB,CAC1B,WAAmB,EACnB,QAAgB,EAChB,eAAyC;QAEzC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;YAClG,OAAO,KAAK,CAAC;QACjB,CAAC;aAAM,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC;YACxC,UAAU,CAAC,WAAW,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe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AAC,oCAAoC,EAAE;gBAC3D,KAAK,EAAE,8CAA8C;aACxD,CAAC,CAAC;QACP,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC"} \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/Acme/Client.js b/plugins/letsencrypt/dist/src/Acme/Client.js deleted file mode 100644 index 6411423a..00000000 --- a/plugins/letsencrypt/dist/src/Acme/Client.js +++ /dev/null @@ -1,364 +0,0 @@ -import { JwkHelper } from 'flyingfish_core'; -import * as crypto from 'crypto'; -import forge from 'node-forge'; -export class Client { - static POLL_DELAY = 5000; - _endpoint = 'https://acme-v02.api.letsencrypt.org'; - _keySize = 2048; - _directory; - _jwk; - _accountUrl; - constructor(options) { - if (options) { - if (options.keysize) { - this._keySize = options.keysize; - } - } - } - async init(jwk) { - this._directory = await (await fetch(`${this._endpoint}/directory`)).json(); - let nonce = await this._getNewNonce(this._directory); - if (nonce) { - if (jwk) { - this._jwk = jwk; - const newAccount = await this.postNewAccount(nonce, this._jwk, this._directory, { onlyReturnExisting: true }); - nonce = newAccount.nonce; - this._accountUrl = newAccount.accountUrl; - } - else { - this._jwk = await this._generateJwk(); - const newAccount = await this.postNewAccount(nonce, this._jwk, this._directory); - nonce = newAccount.nonce; - this._accountUrl = newAccount.accountUrl; - } - return true; - } - return false; - } - getJwk() { - return this._jwk; - } - _throwIfErrored(resJson) { - if (resJson.status && typeof resJson.status === 'number' && resJson.status >= 400) { - throw new Error(JSON.stringify(resJson)); - } - } - async _generateJwk() { - return await JwkHelper.generateJwk(); - } - async _getNewNonce(directory) { - const res = await fetch(directory.newNonce, { - method: 'HEAD' - }); - return res.headers.get('Replay-Nonce'); - } - _parseJwt(jwt) { - const jwtParts = jwt.split('.'); - return { - protected: jwtParts[0], - payload: jwtParts[1], - signature: jwtParts[2] - }; - } - _jsonToBase64Url(json) { - return btoa(JSON.stringify(json)) - .replace(/\+/gu, '-') - .replace(/\//gu, '_') - .replace(/[=]+$/gu, ''); - } - _arrayBufferToBase64Url(buf) { - return btoa(Array.prototype.map.call(new Uint8Array(buf), (ch) => String.fromCharCode(ch)).join('')) - .replace(/\+/gu, '-') - .replace(/\//gu, '_') - .replace(/[=]+$/gu, ''); - } - async _jwtFromJson(jwk, header, payload) { - const privateKey = await crypto.subtle.importKey('jwk', jwk, { - name: 'ECDSA', - namedCurve: 'P-256' - }, false, ['sign']); - const base64Header = this._jsonToBase64Url(header); - const base64Payload = payload === '' ? '' : this._jsonToBase64Url(payload); - const base64Signature = this._arrayBufferToBase64Url(await crypto.subtle.sign({ - name: 'ECDSA', - hash: { - name: 'SHA-256' - } - }, privateKey, new TextEncoder().encode(`${base64Header}.${base64Payload}`))); - return `${base64Header}.${base64Payload}.${base64Signature}`; - } - async postNewAccount(nonce, jwk, directory, options = { - onlyReturnExisting: false - }) { - const pubJwk = { - crv: jwk.crv, - kty: jwk.kty, - x: jwk.x, - y: jwk.y - }; - const header = { - nonce: nonce, - url: directory.newAccount, - alg: 'ES256', - jwk: pubJwk - }; - const payload = { - termsOfServiceAgreed: true, - onlyReturnExisting: options.onlyReturnExisting - }; - const jwt = await this._jwtFromJson(jwk, header, payload); - const res = await fetch(directory.newAccount, { - mode: 'cors', - method: 'POST', - headers: { 'Content-Type': 'application/jose+json' }, - body: JSON.stringify(this._parseJwt(jwt)) - }); - this._throwIfErrored(await res.json()); - return { - nonce: res.headers.get('Replay-Nonce'), - accountUrl: res.headers.get('location') - }; - } - async postNewOrder(nonce, jwk, directory, accountUrl, domainName) { - const header = { - alg: 'ES256', - kid: accountUrl, - nonce: nonce, - url: directory.newOrder - }; - const payload = { - identifiers: [{ - type: 'dns', - value: domainName - }] - }; - const jwt = await this._jwtFromJson(jwk, header, payload); - const res = await fetch(directory.newOrder, { - method: 'POST', - headers: { 'Content-Type': 'application/jose+json' }, - body: JSON.stringify(this._parseJwt(jwt)) - }); - const order = await res.json(); - this._throwIfErrored(order); - return { - nonce: res.headers.get('Replay-Nonce'), - order: order - }; - } - async getOrderAuthorization(nonce, jwk, accountUrl, order) { - const header = { - alg: 'ES256', - kid: accountUrl, - nonce: nonce, - url: order.authorizations[0] - }; - const payload = ''; - const jwt = await this._jwtFromJson(jwk, header, payload); - const res = await fetch(order.authorizations[0], { - method: 'POST', - headers: { 'Content-Type': 'application/jose+json' }, - body: JSON.stringify(this._parseJwt(jwt)) - }); - const authorization = await res.json(); - this._throwIfErrored(authorization); - return { - nonce: res.headers.get('Replay-Nonce'), - authorization: authorization - }; - } - async _thumbprint(jwk) { - const pubJwk = { - crv: jwk.crv, - kty: jwk.kty, - x: jwk.x, - y: jwk.y - }; - const hash = await crypto.subtle.digest({ name: 'SHA-256' }, new TextEncoder().encode(JSON.stringify(pubJwk))); - return this._arrayBufferToBase64Url(hash); - } - async _calculateRecordText(token, jwk) { - const keyAuthorization = `${token}.${await this._thumbprint(jwk)}`; - const hash = await crypto.subtle.digest({ name: 'SHA-256' }, new TextEncoder().encode(keyAuthorization)); - return this._arrayBufferToBase64Url(hash); - } - async _postOrderChallenge(nonce, jwk, accountUrl, challenge) { - const header = { - alg: 'ES256', - kid: accountUrl, - nonce: nonce, - url: challenge.url - }; - const payload = {}; - const jwt = await this._jwtFromJson(jwk, header, payload); - const res = await fetch(challenge.url, { - method: 'POST', - headers: { 'Content-Type': 'application/jose+json' }, - body: JSON.stringify(this._parseJwt(jwt)) - }); - this._throwIfErrored(await res.json()); - return { - nonce: res.headers.get('Replay-Nonce'), - authUrl: res.headers.get('location') - }; - } - async _generateCsr(domainName) { - const keys = forge.pki.rsa.generateKeyPair(this._keySize); - const csr = forge.pki.createCertificationRequest(); - csr.publicKey = keys.publicKey; - csr.setSubject([{ - name: 'commonName', - value: domainName - }]); - csr.setAttributes([{ - name: 'extensionRequest', - extensions: [{ - name: 'subjectAltName', - altNames: [{ - type: 2, - value: domainName - }] - }] - }]); - csr.sign(keys.privateKey, forge.md.sha256.create()); - const derBase64Url = forge.pki.certificationRequestToPem(csr) - .split(/\r\n|\r|\n/u) - .slice(1, -2) - .join('') - .replace(/\+/gu, '-') - .replace(/\//gu, '_') - .replace(/[=]+$/gu, ''); - return { - csr: derBase64Url, - pkcs8Key: forge.pki.privateKeyInfoToPem(forge.pki.wrapRsaPrivateKey(forge.pki.privateKeyToAsn1(keys.privateKey))) - }; - } - async _postOrderFinalize(nonce, jwk, accountUrl, order, csr) { - const header = { - alg: 'ES256', - kid: accountUrl, - nonce: nonce, - url: order.finalize - }; - const payload = { csr: csr }; - const jwt = await this._jwtFromJson(jwk, header, payload); - const res = await fetch(order.finalize, { - method: 'POST', - headers: { 'Content-Type': 'application/jose+json' }, - body: JSON.stringify(this._parseJwt(jwt)) - }); - const body = await res.json(); - this._throwIfErrored(body); - return { - nonce: res.headers.get('Replay-Nonce'), - orderUrl: res.headers.get('location'), - certUrl: body.certificate - }; - } - async _getOrder(nonce, jwk, accountUrl, orderUrl) { - const header = { - alg: 'ES256', - kid: accountUrl, - nonce: nonce, - url: orderUrl - }; - const payload = ''; - const jwt = await this._jwtFromJson(jwk, header, payload); - const res = await fetch(orderUrl, { - method: 'POST', - headers: { 'Content-Type': 'application/jose+json' }, - body: JSON.stringify(this._parseJwt(jwt)) - }); - const order = await res.json(); - return { - nonce: res.headers.get('Replay-Nonce'), - status: order.status, - certUrl: order.certificate - }; - } - _parsePemCertChain(pemCertChain) { - const parsed = []; - let startIndex = pemCertChain.indexOf('-----BEGIN CERTIFICATE-----'); - let endIndex; - while (startIndex !== -1) { - endIndex = pemCertChain.indexOf('-----END CERTIFICATE-----', startIndex) + '-----END CERTIFICATE-----'.length; - parsed.push(pemCertChain.slice(startIndex, endIndex)); - startIndex = pemCertChain.indexOf('-----BEGIN CERTIFICATE-----', endIndex); - } - return parsed; - } - async _getPemCertChain(nonce, jwk, accountUrl, certUrl) { - const header = { - alg: 'ES256', - kid: accountUrl, - nonce: nonce, - url: certUrl - }; - const payload = ''; - const jwt = await this._jwtFromJson(jwk, header, payload); - const res = await fetch(certUrl, { - method: 'POST', - headers: { - 'Content-Type': 'application/jose+json', - 'Accept': 'application/pem-certificate-chain' - }, - body: JSON.stringify(this._parseJwt(jwt)) - }); - if (res.status >= 400) { - throw new Error(res.statusText); - } - const pemCertChain = this._parsePemCertChain(await res.text()); - return { - nonce: res.headers.get('Replay-Nonce'), - pemCertChain: pemCertChain - }; - } - async requestDnsChallenge(domainName) { - let nonce = await this._getNewNonce(this._directory); - if (nonce) { - if (this._jwk && this._accountUrl) { - const order = await this.postNewOrder(nonce, this._jwk, this._directory, this._accountUrl, domainName); - nonce = order.nonce; - const orderAuth = await this.getOrderAuthorization(nonce, this._jwk, this._accountUrl, order.order); - const challenge = orderAuth.authorization.challenges.filter((c) => c.type === 'dns-01')[0]; - return { - recordName: '_acme-challenge', - recordText: await this._calculateRecordText(challenge.token, this._jwk), - order: order.order - }; - } - } - return null; - } - async submitDnsChallengeAndFinalize(order) { - let nonce = await this._getNewNonce(this._directory); - if (nonce) { - if (this._jwk && this._accountUrl) { - const orderAuth = await this.getOrderAuthorization(nonce, this._jwk, this._accountUrl, order); - nonce = orderAuth.nonce; - const challenge = orderAuth.authorization.challenges.filter((c) => c.type === 'dns-01')[0]; - const postOrder = await this._postOrderChallenge(nonce, this._jwk, this._accountUrl, challenge); - nonce = postOrder.nonce; - const domainName = orderAuth.authorization.identifier.value; - const gCsr = await this._generateCsr(domainName); - if (gCsr) { - const pOf = await this._postOrderFinalize(nonce, this._jwk, this._accountUrl, order, gCsr.csr); - nonce = pOf.nonce; - let certUrl = pOf.certUrl; - while (!certUrl) { - await new Promise(r => { - setTimeout(r, Client.POLL_DELAY); - }); - ({ nonce, certUrl } = await this._getOrder(nonce, this._jwk, this._accountUrl, pOf.orderUrl)); - } - const pC = await this._getPemCertChain(nonce, this._jwk, this._accountUrl, certUrl); - return { - pemCertChain: pC.pemCertChain, - pkcs8Key: gCsr.pkcs8Key - }; - } - } - } - return null; - } -} -//# sourceMappingURL=Client.js.map \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/Acme/Client.js.map b/plugins/letsencrypt/dist/src/Acme/Client.js.map deleted file mode 100644 index f91acc2e..00000000 --- a/plugins/letsencrypt/dist/src/Acme/Client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../src/Acme/Client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,MAAM,YAAY,CAAC;AA8G/B,MAAM,OAAO,MAAM;IAER,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC;IAMtB,SAAS,GAAW,sCAAsC,CAAC;IAM3D,QAAQ,GAAG,IAAI,CAAC;IAMhB,UAAU,CAAuB;IAMjC,IAAI,CAA+B;IAMnC,WAAW,CAAU;IAK/B,YAAmB,OAAkC;QACjD,IAAI,OAAO,EAAE,CAAC;YACV,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;gBAClB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;YACpC,CAAC;QACL,CAAC;IACL,CAAC;IAOM,KAAK,CAAC,IAAI,CAAC,GAAiC;QAC/C,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,IAAI,EAA0B,CAAC;QACpG,IAAI,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAErD,IAAI,KAAK,EAAE,CAAC;YACR,IAAI,GAAG,EAAE,CAAC;gBACN,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;gBAChB,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,EAAC,kBAAkB,EAAE,IAAI,EAAC,CAAC,CAAC;gBAE5G,KAAK,GAAG,UAAU,CAAC,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dist/src/Certbot.js b/plugins/letsencrypt/dist/src/Certbot.js deleted file mode 100644 index c1e28375..00000000 --- a/plugins/letsencrypt/dist/src/Certbot.js +++ /dev/null @@ -1,114 +0,0 @@ -import { DateHelper, FileHelper, Logger } from 'flyingfish_core'; -import path from 'path'; -import { spawn } from 'child_process'; -export class Certbot { - static LIMIT_REQUESTS = 5; - static LIMIT_TIME_HOUR = 1; - static PEM_CERT = 'cert.pem'; - static PEM_CHAIN = 'chain.pem'; - static PEM_FULLCHAIN = 'fullchain.pem'; - static PEM_PRIVTKEY = 'privkey.pem'; - _command = 'certbot'; - _config = '/etc/letsencrypt.ini'; - _livePath = '/etc/letsencrypt/live'; - getName() { - return 'letsencrypt'; - } - getTitle() { - return 'LetsEncrypt (HTTP-01)'; - } - isSupportWildcard() { - return false; - } - async isReadyForRequest(lastRequest, tryCount, onResetTryCount) { - if ((tryCount >= Certbot.LIMIT_REQUESTS) && !DateHelper.isOverAHour(lastRequest, Certbot.LIMIT_TIME_HOUR)) { - return false; - } - else if ((tryCount >= Certbot.LIMIT_REQUESTS) && - DateHelper.isOverAHour(lastRequest, Certbot.LIMIT_TIME_HOUR)) { - if (onResetTryCount) { - await onResetTryCount(); - } - } - return true; - } - _getDomainDir(domainName) { - return path.join(this._livePath, domainName); - } - async existCertificate(domainName) { - const domainDir = this._getDomainDir(domainName); - if (await FileHelper.directoryExist(domainDir)) { - return FileHelper.fileExist(path.join(domainDir, Certbot.PEM_CERT)); - } - return false; - } - async getCertificationBundel(domainName) { - if (await this.existCertificate(domainName)) { - const domainDir = this._getDomainDir(domainName); - return { - certPem: path.join(domainDir, Certbot.PEM_CERT), - chainPem: path.join(domainDir, Certbot.PEM_CHAIN), - fullChainPem: path.join(domainDir, Certbot.PEM_FULLCHAIN), - privatKeyPem: path.join(domainDir, Certbot.PEM_PRIVTKEY) - }; - } - return null; - } - async createCertificate(options) { - if (!await FileHelper.mkdir(options.webRootPath, true)) { - Logger.getLogger().error(`Web root path can not create/found: ${options.webRootPath}`, { - class: 'Plugin::LetsEncrypt::Certbot::createCertificate' - }); - return false; - } - let keySize = 4096; - if (options.keySize) { - keySize = options.keySize; - } - const process = spawn(this._command, [ - 'certonly', - '--non-interactive', - '--rsa-key-size', - `${keySize}`, - '--webroot', - '--agree-tos', - '--no-eff-email', - '--email', - options.email, - '-w', - options.webRootPath, - '-d', - options.domainName - ]); - process.stdout.on('data', (buf) => { - Logger.getLogger().info(buf.toString(), { - class: 'Plugin::LetsEncrypt::Certbot::createCertificate::process:stdout' - }); - }); - process.stderr.on('data', (buf) => { - Logger.getLogger().error(buf.toString(), { - class: 'Plugin::LetsEncrypt::Certbot::createCertificate::process:stderr' - }); - }); - const returnCode = await new Promise((resolve) => { - process.on('close', resolve); - }); - const isCertExist = await this.existCertificate(options.domainName) !== null; - if (!isCertExist) { - Logger.getLogger().error('Certification not create/found.', { - class: 'Plugin::LetsEncrypt::Certbot::createCertificate' - }); - } - let isSuccess = false; - if (returnCode === 0) { - isSuccess = true; - } - else { - Logger.getLogger().error(`Return code: ${returnCode}`, { - class: 'Plugin::LetsEncrypt::Certbot::createCertificate' - }); - } - return isCertExist && isSuccess; - } -} -//# sourceMappingURL=Certbot.js.map \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/Certbot.js.map b/plugins/letsencrypt/dist/src/Certbot.js.map deleted file mode 100644 index cc8478fe..00000000 --- a/plugins/letsencrypt/dist/src/Certbot.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Certbot.js","sourceRoot":"","sources":["../../src/Certbot.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EACV,UAAU,EAGV,MAAM,EAET,MAAM,iBAAiB,CAAC;AACzB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAKpC,MAAM,OAAO,OAAO;IAET,MAAM,CAAU,cAAc,GAAG,CAAC,CAAC;IACnC,MAAM,CAAU,eAAe,GAAG,CAAC,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CAAC,KAAK,CAAC,gBAAgB,UAAU,EAAE,EAAE;gBACnD,KAAK,EAAE,iDAAiD;aAC3D,CAAC,CAAC;QACP,CAAC;QAED,OAAO,WAAW,IAAI,SAAS,CAAC;IACpC,CAAC"} \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/ProviderLoader.js.map b/plugins/letsencrypt/dist/src/ProviderLoader.js.map deleted file mode 100644 index 8779b831..00000000 --- a/plugins/letsencrypt/dist/src/ProviderLoader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProviderLoader.js","sourceRoot":"","sources":["../../src/ProviderLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,2BAA2B,EAAmB,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAKrC,MAAM,OAAO,cAAe,SAAQ,2BAA2B;IAMjD,UAAU,GAAuB;QACvC,IAAI,OAAO,EAAE;KAEhB,CAAC;IAMK,OAAO;QACV,OAAO,aAAa,CAAC;IACzB,CAAC;IAMM,KAAK,CAAC,YAAY;QACrB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;CAEJ"} \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/index.js b/plugins/letsencrypt/dist/src/index.js deleted file mode 100644 index 7eb2a5a9..00000000 --- a/plugins/letsencrypt/dist/src/index.js +++ /dev/null @@ -1,16 +0,0 @@ -import { APlugin } from 'flyingfish_core'; -import { ProviderLoader } from './ProviderLoader.js'; -export default class LetsEncrypt extends APlugin { - getName() { - return 'LetsEncrypt'; - } - onDisable() { - return false; - } - onEnable() { - const pl = new ProviderLoader(); - this.getPluginManager().registerEvents(pl, this); - return true; - } -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/plugins/letsencrypt/dist/src/index.js.map b/plugins/letsencrypt/dist/src/index.js.map deleted file mode 100644 index 86b6263a..00000000 --- a/plugins/letsencrypt/dist/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAKnD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,MAAM;IAMpC,OAAO;QACV,OAAO,aAAa,CAAC;IACzB,CAAC;IAMM,SAAS;QACZ,OAAO,KAAK,CAAC;IACjB,CAAC;IAMM,QAAQ;QACX,MAAM,EAAE,GAAG,IAAI,cAAc,EAAE,CAAC;QAEhC,IAAI,CAAC,gBAAgB,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAEjD,OAAO,IAAI,CAAC;IAChB,CAAC;CAEJ"} \ No newline at end of file diff --git a/plugins/letsencrypt/tsconfig.json b/plugins/letsencrypt/tsconfig.json index 0aa7dc9e..f989810c 100644 --- a/plugins/letsencrypt/tsconfig.json +++ b/plugins/letsencrypt/tsconfig.json @@ -13,7 +13,8 @@ "removeComments": true, "sourceMap": true, "strict": true, - "target": "ES2022" + "target": "ES2022", + "rootDir": "src" }, "include": [ "./src/**/*.ts"