apeframework 0.0.0-dev.21 → 0.0.0-dev.23
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/{cipher → dist/cipher}/Cipher.d.ts +1 -1
- package/{cipher → dist/cipher}/Cipher.js +6 -6
- package/{cipher → dist/cipher}/errors/DecryptError.d.ts +1 -1
- package/{cipher → dist/cipher}/errors/DecryptError.js +1 -1
- package/{jwt → dist/cipher}/errors/SecretLengthError.d.ts +1 -1
- package/{cipher → dist/cipher}/errors/SecretLengthError.js +1 -1
- package/{cipher → dist/cipher}/validateSecretLength.d.ts +1 -1
- package/{cipher → dist/cipher}/validateSecretLength.js +2 -2
- package/{cli → dist/cli}/Command.d.ts +1 -1
- package/{cli → dist/cli}/getArgs.d.ts +1 -1
- package/{cli → dist/cli}/getArgs.js +1 -1
- package/{cli → dist/cli}/parseArgs.d.ts +1 -1
- package/{config → dist/config}/Properties.d.ts +1 -1
- package/{config → dist/config}/errors/FileReadError.d.ts +1 -1
- package/{config → dist/config}/errors/FileReadError.js +1 -1
- package/{config → dist/config}/errors/PropertyNameError.d.ts +1 -1
- package/{config → dist/config}/errors/PropertyNameError.js +1 -1
- package/{config → dist/config}/errors/PropertyParseError.d.ts +1 -1
- package/{config → dist/config}/errors/PropertyParseError.js +1 -1
- package/{config → dist/config}/getConfig.d.ts +4 -4
- package/{config → dist/config}/getConfig.js +4 -4
- package/{config → dist/config}/parseProperty.d.ts +1 -1
- package/{config → dist/config}/parseProperty.js +1 -1
- package/{config → dist/config}/readFile.js +1 -1
- package/{config → dist/config}/validatePropertyName.js +1 -1
- package/{env → dist/env}/errors/FileReadError.d.ts +1 -1
- package/{tls → dist/env}/errors/FileReadError.js +1 -1
- package/{env → dist/env}/getEnv.d.ts +1 -1
- package/{env → dist/env}/getEnv.js +1 -1
- package/{env → dist/env}/readFile.d.ts +1 -1
- package/{env → dist/env}/readFile.js +1 -1
- package/{jwt → dist/jwt}/Jwt.d.ts +2 -2
- package/{jwt → dist/jwt}/Jwt.js +1 -1
- package/{cipher → dist/jwt}/errors/SecretLengthError.d.ts +1 -1
- package/{jwt → dist/jwt}/errors/SecretLengthError.js +1 -1
- package/{jwt → dist/jwt}/validateSecretLength.d.ts +1 -1
- package/{jwt → dist/jwt}/validateSecretLength.js +2 -2
- package/{logger → dist/logger}/adapters/file/FileLogger.d.ts +2 -2
- package/{logger → dist/logger}/adapters/file/FileLogger.js +4 -4
- package/{logger → dist/logger}/adapters/file/errors/FileInitError.d.ts +1 -1
- package/{logger → dist/logger}/adapters/file/errors/FileInitError.js +1 -1
- package/{logger → dist/logger}/adapters/file/initFile.js +1 -1
- package/{logger → dist/logger}/adapters/noop/NoopLogger.d.ts +1 -1
- package/{logger → dist/logger}/adapters/noop/NoopLogger.js +1 -1
- package/{logger → dist/logger}/adapters/stdio/StdioLogger.d.ts +2 -2
- package/{logger → dist/logger}/adapters/stdio/StdioLogger.js +3 -3
- package/{mailer → dist/mailer}/Event.d.ts +2 -2
- package/{mailer → dist/mailer}/Mail.d.ts +4 -4
- package/{mailer → dist/mailer}/Mailer.d.ts +1 -1
- package/{mailer → dist/mailer}/Mailer.js +5 -5
- package/{mailer → dist/mailer}/adapters/noop/NoopMailer.d.ts +2 -2
- package/{mailer → dist/mailer}/adapters/noop/NoopMailer.js +1 -1
- package/{mailer → dist/mailer}/adapters/smtp/SmtpMailer.d.ts +3 -3
- package/{mailer → dist/mailer}/adapters/smtp/SmtpMailer.js +6 -6
- package/{mailer → dist/mailer}/adapters/smtp/getAddress.d.ts +1 -1
- package/{mailer → dist/mailer}/adapters/smtp/getAddresses.d.ts +1 -1
- package/{mailer → dist/mailer}/adapters/smtp/getAddresses.js +1 -1
- package/{mailer → dist/mailer}/adapters/smtp/getAttachments.d.ts +1 -1
- package/{mailer → dist/mailer}/errors/AddressEmailError.d.ts +1 -1
- package/{mailer → dist/mailer}/errors/AddressEmailError.js +1 -1
- package/{mailer → dist/mailer}/errors/EventAttachmentUrlError.d.ts +1 -1
- package/{mailer → dist/mailer}/errors/EventAttachmentUrlError.js +1 -1
- package/{mailer → dist/mailer}/errors/EventGeolocationError.d.ts +1 -1
- package/{mailer → dist/mailer}/errors/EventGeolocationError.js +1 -1
- package/{mailer → dist/mailer}/errors/EventUrlError.d.ts +1 -1
- package/{mailer → dist/mailer}/errors/EventUrlError.js +1 -1
- package/{mailer → dist/mailer}/errors/ListUrlError.d.ts +1 -1
- package/{mailer → dist/mailer}/errors/ListUrlError.js +1 -1
- package/{mailer → dist/mailer}/getIcalendar.d.ts +1 -1
- package/{mailer → dist/mailer}/validateAddressEmail.js +2 -2
- package/{mailer → dist/mailer}/validateEventAttachmentUrl.js +2 -2
- package/{mailer → dist/mailer}/validateEventGeolocation.js +2 -2
- package/{mailer → dist/mailer}/validateEventUrl.js +2 -2
- package/{mailer → dist/mailer}/validateListUrl.js +2 -2
- package/{parser → dist/parser}/errors/ParseError.d.ts +1 -1
- package/{parser → dist/parser}/errors/ParseError.js +1 -1
- package/dist/parser/factories/enum/createEnumParser.d.ts +6 -0
- package/{parser → dist/parser}/factories/enum/createEnumParser.js +1 -1
- package/{parser → dist/parser}/factories/unit/createUnitParser.d.ts +2 -2
- package/{parser → dist/parser}/factories/unit/createUnitParser.js +3 -3
- package/{parser → dist/parser}/parseBoolean.d.ts +1 -1
- package/{parser → dist/parser}/parseBoolean.js +1 -1
- package/dist/parser/parseBytes.d.ts +2 -0
- package/{parser → dist/parser}/parseBytes.js +1 -1
- package/{parser → dist/parser}/parseInteger.d.ts +1 -1
- package/{parser → dist/parser}/parseInteger.js +2 -2
- package/dist/parser/parseMilliseconds.d.ts +2 -0
- package/{parser → dist/parser}/parseMilliseconds.js +1 -1
- package/{parser → dist/parser}/parseNumber.d.ts +1 -1
- package/{parser → dist/parser}/parseNumber.js +1 -1
- package/{parser → dist/parser}/parseString.d.ts +1 -1
- package/{parser → dist/parser}/parseString.js +1 -1
- package/{pwd → dist/pwd}/Pwd.js +1 -1
- package/{pwd → dist/pwd}/errors/HashRoundsError.d.ts +1 -1
- package/{pwd → dist/pwd}/errors/HashRoundsError.js +1 -1
- package/{pwd → dist/pwd}/validateHashRounds.js +1 -1
- package/{server → dist/server}/Route.d.ts +3 -3
- package/{server → dist/server}/Server.d.ts +5 -5
- package/{server → dist/server}/Server.js +2 -2
- package/{server → dist/server}/getAjv.d.ts +1 -1
- package/{tls → dist/tls}/errors/FileReadError.d.ts +1 -1
- package/{env → dist/tls}/errors/FileReadError.js +1 -1
- package/{tls → dist/tls}/getTls.d.ts +1 -1
- package/{tls → dist/tls}/getTls.js +1 -1
- package/{tls → dist/tls}/readFile.js +1 -1
- package/package.json +632 -6
- package/parser/factories/enum/createEnumParser.d.ts +0 -6
- package/parser/parseBytes.d.ts +0 -2
- package/parser/parseMilliseconds.d.ts +0 -2
- /package/{cipher → dist/cipher}/Algorithm.d.ts +0 -0
- /package/{cipher → dist/cipher}/Algorithm.js +0 -0
- /package/{cli → dist/cli}/Args.d.ts +0 -0
- /package/{cli → dist/cli}/Args.js +0 -0
- /package/{cli → dist/cli}/Command.js +0 -0
- /package/{cli → dist/cli}/parseArgs.js +0 -0
- /package/{cli → dist/cli}/utils/exit.d.ts +0 -0
- /package/{cli → dist/cli}/utils/exit.js +0 -0
- /package/{cli → dist/cli}/utils/formatList.d.ts +0 -0
- /package/{cli → dist/cli}/utils/formatList.js +0 -0
- /package/{cli → dist/cli}/utils/formatTable.d.ts +0 -0
- /package/{cli → dist/cli}/utils/formatTable.js +0 -0
- /package/{cli → dist/cli}/utils/formatText.d.ts +0 -0
- /package/{cli → dist/cli}/utils/formatText.js +0 -0
- /package/{cli → dist/cli}/utils/print.d.ts +0 -0
- /package/{cli → dist/cli}/utils/print.js +0 -0
- /package/{cli → dist/cli}/utils/printLn.d.ts +0 -0
- /package/{cli → dist/cli}/utils/printLn.js +0 -0
- /package/{config → dist/config}/Config.d.ts +0 -0
- /package/{config → dist/config}/Config.js +0 -0
- /package/{config → dist/config}/Properties.js +0 -0
- /package/{config → dist/config}/getPropertyEnvVar.d.ts +0 -0
- /package/{config → dist/config}/getPropertyEnvVar.js +0 -0
- /package/{config → dist/config}/readFile.d.ts +0 -0
- /package/{config → dist/config}/validatePropertyName.d.ts +0 -0
- /package/{env → dist/env}/Env.d.ts +0 -0
- /package/{env → dist/env}/Env.js +0 -0
- /package/{error → dist/error}/BaseError.d.ts +0 -0
- /package/{error → dist/error}/BaseError.js +0 -0
- /package/{jwt → dist/jwt}/Algorithm.d.ts +0 -0
- /package/{jwt → dist/jwt}/Algorithm.js +0 -0
- /package/{jwt → dist/jwt}/Payload.d.ts +0 -0
- /package/{jwt → dist/jwt}/Payload.js +0 -0
- /package/{logger → dist/logger}/Level.d.ts +0 -0
- /package/{logger → dist/logger}/Level.js +0 -0
- /package/{logger → dist/logger}/Logger.d.ts +0 -0
- /package/{logger → dist/logger}/Logger.js +0 -0
- /package/{logger → dist/logger}/Severity.d.ts +0 -0
- /package/{logger → dist/logger}/Severity.js +0 -0
- /package/{logger → dist/logger}/adapters/file/initFile.d.ts +0 -0
- /package/{mailer → dist/mailer}/Address.d.ts +0 -0
- /package/{mailer → dist/mailer}/Address.js +0 -0
- /package/{mailer → dist/mailer}/Attachment.d.ts +0 -0
- /package/{mailer → dist/mailer}/Attachment.js +0 -0
- /package/{mailer → dist/mailer}/Event.js +0 -0
- /package/{mailer → dist/mailer}/List.d.ts +0 -0
- /package/{mailer → dist/mailer}/List.js +0 -0
- /package/{mailer → dist/mailer}/Location.d.ts +0 -0
- /package/{mailer → dist/mailer}/Location.js +0 -0
- /package/{mailer → dist/mailer}/Mail.js +0 -0
- /package/{mailer → dist/mailer}/Method.d.ts +0 -0
- /package/{mailer → dist/mailer}/Method.js +0 -0
- /package/{mailer → dist/mailer}/adapters/smtp/getAddress.js +0 -0
- /package/{mailer → dist/mailer}/adapters/smtp/getAttachments.js +0 -0
- /package/{mailer → dist/mailer}/getIcalendar.js +0 -0
- /package/{mailer → dist/mailer}/validateAddressEmail.d.ts +0 -0
- /package/{mailer → dist/mailer}/validateEventAttachmentUrl.d.ts +0 -0
- /package/{mailer → dist/mailer}/validateEventGeolocation.d.ts +0 -0
- /package/{mailer → dist/mailer}/validateEventUrl.d.ts +0 -0
- /package/{mailer → dist/mailer}/validateListUrl.d.ts +0 -0
- /package/{parser → dist/parser}/Parser.d.ts +0 -0
- /package/{parser → dist/parser}/Parser.js +0 -0
- /package/{parser → dist/parser}/factories/unit/Unit.d.ts +0 -0
- /package/{parser → dist/parser}/factories/unit/Unit.js +0 -0
- /package/{pwd → dist/pwd}/Pwd.d.ts +0 -0
- /package/{pwd → dist/pwd}/validateHashRounds.d.ts +0 -0
- /package/{server → dist/server}/ErrorHandler.d.ts +0 -0
- /package/{server → dist/server}/ErrorHandler.js +0 -0
- /package/{server → dist/server}/Format.d.ts +0 -0
- /package/{server → dist/server}/Format.js +0 -0
- /package/{server → dist/server}/Handler.d.ts +0 -0
- /package/{server → dist/server}/Handler.js +0 -0
- /package/{server → dist/server}/Method.d.ts +0 -0
- /package/{server → dist/server}/Method.js +0 -0
- /package/{server → dist/server}/OpenApiFormat.d.ts +0 -0
- /package/{server → dist/server}/OpenApiFormat.js +0 -0
- /package/{server → dist/server}/Route.js +0 -0
- /package/{server → dist/server}/Schema.d.ts +0 -0
- /package/{server → dist/server}/Schema.js +0 -0
- /package/{server → dist/server}/getAjv.js +0 -0
- /package/{tls → dist/tls}/Tls.d.ts +0 -0
- /package/{tls → dist/tls}/Tls.js +0 -0
- /package/{tls → dist/tls}/readFile.d.ts +0 -0
- /package/{utils → dist/utils}/getRandomHexString.d.ts +0 -0
- /package/{utils → dist/utils}/getRandomHexString.js +0 -0
- /package/{utils → dist/utils}/getTimestamp.d.ts +0 -0
- /package/{utils → dist/utils}/getTimestamp.js +0 -0
- /package/{utils → dist/utils}/isValidEmail.d.ts +0 -0
- /package/{utils → dist/utils}/isValidEmail.js +0 -0
- /package/{utils → dist/utils}/isValidGeolocation.d.ts +0 -0
- /package/{utils → dist/utils}/isValidGeolocation.js +0 -0
- /package/{utils → dist/utils}/isValidHexString.d.ts +0 -0
- /package/{utils → dist/utils}/isValidHexString.js +0 -0
- /package/{utils → dist/utils}/isValidIsoDate.d.ts +0 -0
- /package/{utils → dist/utils}/isValidIsoDate.js +0 -0
- /package/{utils → dist/utils}/isValidJwtToken.d.ts +0 -0
- /package/{utils → dist/utils}/isValidJwtToken.js +0 -0
- /package/{utils → dist/utils}/isValidUrl.d.ts +0 -0
- /package/{utils → dist/utils}/isValidUrl.js +0 -0
- /package/{utils → dist/utils}/isValidUuid.d.ts +0 -0
- /package/{utils → dist/utils}/isValidUuid.js +0 -0
- /package/{utils → dist/utils}/wait.d.ts +0 -0
- /package/{utils → dist/utils}/wait.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DecryptError } from './errors/DecryptError';
|
|
3
|
-
import { validateSecretLength } from './validateSecretLength';
|
|
1
|
+
import { createCipheriv, createDecipheriv, randomBytes } from 'crypto';
|
|
2
|
+
import { DecryptError } from './errors/DecryptError.js';
|
|
3
|
+
import { validateSecretLength } from './validateSecretLength.js';
|
|
4
4
|
class Cipher {
|
|
5
5
|
algorithm;
|
|
6
6
|
secret;
|
|
@@ -10,8 +10,8 @@ class Cipher {
|
|
|
10
10
|
this.secret = Buffer.from(params.secret, 'utf8');
|
|
11
11
|
}
|
|
12
12
|
encrypt(string) {
|
|
13
|
-
const iv =
|
|
14
|
-
const cipher =
|
|
13
|
+
const iv = randomBytes(16);
|
|
14
|
+
const cipher = createCipheriv(this.algorithm, this.secret, iv);
|
|
15
15
|
return iv.toString('hex')
|
|
16
16
|
+ cipher.update(string, 'utf8', 'hex')
|
|
17
17
|
+ cipher.final('hex');
|
|
@@ -19,7 +19,7 @@ class Cipher {
|
|
|
19
19
|
decrypt(string) {
|
|
20
20
|
const buffer = Buffer.from(string, 'hex');
|
|
21
21
|
const iv = buffer.subarray(0, 16);
|
|
22
|
-
const decipher =
|
|
22
|
+
const decipher = createDecipheriv(this.algorithm, this.secret, iv);
|
|
23
23
|
try {
|
|
24
24
|
return decipher.update(buffer.subarray(16), undefined, 'utf8')
|
|
25
25
|
+ decipher.final('utf8');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Algorithm } from './Algorithm';
|
|
2
|
-
import { SecretLengthError } from './errors/SecretLengthError';
|
|
1
|
+
import { Algorithm } from './Algorithm.js';
|
|
2
|
+
import { SecretLengthError } from './errors/SecretLengthError.js';
|
|
3
3
|
const secretLength = {
|
|
4
4
|
[Algorithm.AES128]: 16,
|
|
5
5
|
[Algorithm.AES192]: 24,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Config } from './Config';
|
|
2
|
-
import type { Properties } from './Properties';
|
|
3
|
-
import type { Args } from '../cli/Args';
|
|
4
|
-
import type { Env } from '../env/Env';
|
|
1
|
+
import type { Config } from './Config.js';
|
|
2
|
+
import type { Properties } from './Properties.js';
|
|
3
|
+
import type { Args } from '../cli/Args.js';
|
|
4
|
+
import type { Env } from '../env/Env.js';
|
|
5
5
|
declare const getConfig: <Type extends Config>(params: {
|
|
6
6
|
properties: Properties<Type>;
|
|
7
7
|
file?: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getPropertyEnvVar } from './getPropertyEnvVar';
|
|
2
|
-
import { parseProperty } from './parseProperty';
|
|
3
|
-
import { readFile } from './readFile';
|
|
4
|
-
import { validatePropertyName } from './validatePropertyName';
|
|
1
|
+
import { getPropertyEnvVar } from './getPropertyEnvVar.js';
|
|
2
|
+
import { parseProperty } from './parseProperty.js';
|
|
3
|
+
import { readFile } from './readFile.js';
|
|
4
|
+
import { validatePropertyName } from './validatePropertyName.js';
|
|
5
5
|
const getConfig = (params) => {
|
|
6
6
|
const file = params.file
|
|
7
7
|
? readFile(params.file.path, params.file.required)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Parser } from '../parser/Parser';
|
|
1
|
+
import type { Parser } from '../parser/Parser.js';
|
|
2
2
|
declare const parseProperty: <Type>(name: string, parser: Parser<Type>, defaultValue: any, fileValue: any, envValue: any, argsValue: any) => Type;
|
|
3
3
|
export { parseProperty, };
|
package/{jwt → dist/jwt}/Jwt.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Algorithm } from './Algorithm';
|
|
2
|
-
import { SecretLengthError } from './errors/SecretLengthError';
|
|
1
|
+
import { Algorithm } from './Algorithm.js';
|
|
2
|
+
import { SecretLengthError } from './errors/SecretLengthError.js';
|
|
3
3
|
const minSecretLength = {
|
|
4
4
|
[Algorithm.HS256]: 32,
|
|
5
5
|
[Algorithm.HS384]: 48,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import pino from 'pino';
|
|
2
|
-
import { Level } from '../../Level';
|
|
3
|
-
import { Logger } from '../../Logger';
|
|
4
|
-
import { initFile } from './initFile';
|
|
1
|
+
import { pino } from 'pino';
|
|
2
|
+
import { Level } from '../../Level.js';
|
|
3
|
+
import { Logger } from '../../Logger.js';
|
|
4
|
+
import { initFile } from './initFile.js';
|
|
5
5
|
class FileLogger extends Logger {
|
|
6
6
|
logger;
|
|
7
7
|
context;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import pino from 'pino';
|
|
1
|
+
import { pino } from 'pino';
|
|
2
2
|
import pretty from 'pino-pretty';
|
|
3
|
-
import { Level } from '../../Level';
|
|
4
|
-
import { Logger } from '../../Logger';
|
|
3
|
+
import { Level } from '../../Level.js';
|
|
4
|
+
import { Logger } from '../../Logger.js';
|
|
5
5
|
class StdioLogger extends Logger {
|
|
6
6
|
logger;
|
|
7
7
|
context;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Address } from './Address';
|
|
2
|
-
import type { Attachment } from './Attachment';
|
|
3
|
-
import type { Event } from './Event';
|
|
4
|
-
import type { List } from './List';
|
|
1
|
+
import type { Address } from './Address.js';
|
|
2
|
+
import type { Attachment } from './Attachment.js';
|
|
3
|
+
import type { Event } from './Event.js';
|
|
4
|
+
import type { List } from './List.js';
|
|
5
5
|
interface Mail {
|
|
6
6
|
from: Address;
|
|
7
7
|
sender?: Address;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { validateAddressEmail } from './validateAddressEmail';
|
|
2
|
-
import { validateEventAttachmentUrl } from './validateEventAttachmentUrl';
|
|
3
|
-
import { validateEventGeolocation } from './validateEventGeolocation';
|
|
4
|
-
import { validateEventUrl } from './validateEventUrl';
|
|
5
|
-
import { validateListUrl } from './validateListUrl';
|
|
1
|
+
import { validateAddressEmail } from './validateAddressEmail.js';
|
|
2
|
+
import { validateEventAttachmentUrl } from './validateEventAttachmentUrl.js';
|
|
3
|
+
import { validateEventGeolocation } from './validateEventGeolocation.js';
|
|
4
|
+
import { validateEventUrl } from './validateEventUrl.js';
|
|
5
|
+
import { validateListUrl } from './validateListUrl.js';
|
|
6
6
|
class Mailer {
|
|
7
7
|
async send(mail) {
|
|
8
8
|
validateAddressEmail(mail.from.email);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Mailer } from '../../Mailer';
|
|
2
|
-
import type { Mail } from '../../Mail';
|
|
1
|
+
import { Mailer } from '../../Mailer.js';
|
|
2
|
+
import type { Mail } from '../../Mail.js';
|
|
3
3
|
declare class NoopMailer extends Mailer {
|
|
4
4
|
sendMail(mail: Mail): Promise<string>;
|
|
5
5
|
close(): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Mailer } from '../../Mailer';
|
|
2
|
-
import type { Tls } from '../../../tls/Tls';
|
|
3
|
-
import type { Mail } from '../../Mail';
|
|
1
|
+
import { Mailer } from '../../Mailer.js';
|
|
2
|
+
import type { Tls } from '../../../tls/Tls.js';
|
|
3
|
+
import type { Mail } from '../../Mail.js';
|
|
4
4
|
declare class SmtpMailer extends Mailer {
|
|
5
5
|
private readonly transporter;
|
|
6
6
|
constructor(params: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import nodemailer from 'nodemailer';
|
|
2
|
-
import { getTls } from '../../../tls/getTls';
|
|
3
|
-
import { Mailer } from '../../Mailer';
|
|
4
|
-
import { getIcalendar } from '../../getIcalendar';
|
|
5
|
-
import { getAddress } from './getAddress';
|
|
6
|
-
import { getAddresses } from './getAddresses';
|
|
7
|
-
import { getAttachments } from './getAttachments';
|
|
2
|
+
import { getTls } from '../../../tls/getTls.js';
|
|
3
|
+
import { Mailer } from '../../Mailer.js';
|
|
4
|
+
import { getIcalendar } from '../../getIcalendar.js';
|
|
5
|
+
import { getAddress } from './getAddress.js';
|
|
6
|
+
import { getAddresses } from './getAddresses.js';
|
|
7
|
+
import { getAttachments } from './getAttachments.js';
|
|
8
8
|
class SmtpMailer extends Mailer {
|
|
9
9
|
transporter;
|
|
10
10
|
constructor(params) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Address } from '../../Address';
|
|
1
|
+
import type { Address } from '../../Address.js';
|
|
2
2
|
import type { Address as NodemailerAddress } from 'nodemailer/lib/mailer';
|
|
3
3
|
declare const getAddress: (address?: Address) => NodemailerAddress | undefined;
|
|
4
4
|
export { getAddress, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Address } from '../../Address';
|
|
1
|
+
import type { Address } from '../../Address.js';
|
|
2
2
|
import type { Address as NodemailerAddress } from 'nodemailer/lib/mailer';
|
|
3
3
|
declare const getAddresses: (addresses?: Address[]) => NodemailerAddress[];
|
|
4
4
|
export { getAddresses, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Attachment } from '../../Attachment';
|
|
1
|
+
import type { Attachment } from '../../Attachment.js';
|
|
2
2
|
import type { Attachment as NodemailerAttachment } from 'nodemailer/lib/mailer';
|
|
3
3
|
declare const getAttachments: (attachments?: Attachment[]) => NodemailerAttachment[];
|
|
4
4
|
export { getAttachments, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isValidEmail } from 'utils/isValidEmail';
|
|
2
|
-
import { AddressEmailError } from './errors/AddressEmailError';
|
|
1
|
+
import { isValidEmail } from '../utils/isValidEmail.js';
|
|
2
|
+
import { AddressEmailError } from './errors/AddressEmailError.js';
|
|
3
3
|
const validateAddressEmail = (email) => {
|
|
4
4
|
if (!isValidEmail(email)) {
|
|
5
5
|
throw new AddressEmailError(email);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isValidUrl } from 'utils/isValidUrl';
|
|
2
|
-
import { EventAttachmentUrlError } from './errors/EventAttachmentUrlError';
|
|
1
|
+
import { isValidUrl } from '../utils/isValidUrl.js';
|
|
2
|
+
import { EventAttachmentUrlError } from './errors/EventAttachmentUrlError.js';
|
|
3
3
|
const validateEventAttachmentUrl = (url) => {
|
|
4
4
|
if (!isValidUrl(url)) {
|
|
5
5
|
throw new EventAttachmentUrlError(url);
|