apeframework 0.0.0-dev.22 → 0.0.0-dev.24
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/dist/cipher/Cipher.d.ts +1 -1
- package/dist/cipher/Cipher.js +6 -6
- package/dist/cipher/errors/DecryptError.d.ts +1 -1
- package/dist/cipher/errors/DecryptError.js +1 -1
- package/dist/cipher/errors/SecretLengthError.d.ts +1 -1
- package/dist/cipher/errors/SecretLengthError.js +1 -1
- package/dist/cipher/validateSecretLength.d.ts +1 -1
- package/dist/cipher/validateSecretLength.js +2 -2
- package/dist/cli/Command.d.ts +1 -1
- package/dist/cli/getArgs.d.ts +1 -1
- package/dist/cli/getArgs.js +1 -1
- package/dist/cli/parseArgs.d.ts +1 -1
- package/dist/config/Properties.d.ts +1 -1
- package/dist/config/errors/FileReadError.d.ts +1 -1
- package/dist/config/errors/FileReadError.js +1 -1
- package/dist/config/errors/PropertyNameError.d.ts +1 -1
- package/dist/config/errors/PropertyNameError.js +1 -1
- package/dist/config/errors/PropertyParseError.d.ts +1 -1
- package/dist/config/errors/PropertyParseError.js +1 -1
- package/dist/config/getConfig.d.ts +4 -4
- package/dist/config/getConfig.js +4 -4
- package/dist/config/parseProperty.d.ts +1 -1
- package/dist/config/parseProperty.js +1 -1
- package/dist/config/readFile.js +1 -1
- package/dist/config/validatePropertyName.js +1 -1
- package/dist/env/errors/FileReadError.d.ts +1 -1
- package/dist/env/errors/FileReadError.js +1 -1
- package/dist/env/getEnv.d.ts +1 -1
- package/dist/env/getEnv.js +1 -1
- package/dist/env/readFile.d.ts +1 -1
- package/dist/env/readFile.js +1 -1
- package/dist/jwt/Jwt.d.ts +2 -2
- package/dist/jwt/Jwt.js +2 -2
- package/dist/jwt/errors/SecretLengthError.d.ts +1 -1
- package/dist/jwt/errors/SecretLengthError.js +1 -1
- package/dist/jwt/validateSecretLength.d.ts +1 -1
- package/dist/jwt/validateSecretLength.js +2 -2
- package/dist/logger/adapters/file/FileLogger.d.ts +2 -2
- package/dist/logger/adapters/file/FileLogger.js +4 -4
- package/dist/logger/adapters/file/errors/FileInitError.d.ts +1 -1
- package/dist/logger/adapters/file/errors/FileInitError.js +1 -1
- package/dist/logger/adapters/file/initFile.js +1 -1
- package/dist/logger/adapters/noop/NoopLogger.d.ts +1 -1
- package/dist/logger/adapters/noop/NoopLogger.js +1 -1
- package/dist/logger/adapters/stdio/StdioLogger.d.ts +2 -2
- package/dist/logger/adapters/stdio/StdioLogger.js +3 -3
- package/dist/mailer/Event.d.ts +2 -2
- package/dist/mailer/Mail.d.ts +4 -4
- package/dist/mailer/Mailer.d.ts +1 -1
- package/dist/mailer/Mailer.js +5 -5
- package/dist/mailer/adapters/noop/NoopMailer.d.ts +2 -2
- package/dist/mailer/adapters/noop/NoopMailer.js +1 -1
- package/dist/mailer/adapters/smtp/SmtpMailer.d.ts +3 -3
- package/dist/mailer/adapters/smtp/SmtpMailer.js +6 -6
- package/dist/mailer/adapters/smtp/getAddress.d.ts +5 -2
- package/dist/mailer/adapters/smtp/getAddresses.d.ts +5 -2
- package/dist/mailer/adapters/smtp/getAddresses.js +1 -1
- package/dist/mailer/adapters/smtp/getAttachments.d.ts +8 -2
- package/dist/mailer/errors/AddressEmailError.d.ts +1 -1
- package/dist/mailer/errors/AddressEmailError.js +1 -1
- package/dist/mailer/errors/EventAttachmentUrlError.d.ts +1 -1
- package/dist/mailer/errors/EventAttachmentUrlError.js +1 -1
- package/dist/mailer/errors/EventGeolocationError.d.ts +1 -1
- package/dist/mailer/errors/EventGeolocationError.js +1 -1
- package/dist/mailer/errors/EventUrlError.d.ts +1 -1
- package/dist/mailer/errors/EventUrlError.js +1 -1
- package/dist/mailer/errors/ListUrlError.d.ts +1 -1
- package/dist/mailer/errors/ListUrlError.js +1 -1
- package/dist/mailer/getIcalendar.d.ts +1 -1
- package/dist/mailer/validateAddressEmail.js +2 -2
- package/dist/mailer/validateEventAttachmentUrl.js +2 -2
- package/dist/mailer/validateEventGeolocation.js +2 -2
- package/dist/mailer/validateEventUrl.js +2 -2
- package/dist/mailer/validateListUrl.js +2 -2
- package/dist/parser/errors/ParseError.d.ts +1 -1
- package/dist/parser/errors/ParseError.js +1 -1
- package/dist/parser/factories/enum/createEnumParser.d.ts +4 -4
- package/dist/parser/factories/enum/createEnumParser.js +1 -1
- package/dist/parser/factories/unit/createUnitParser.d.ts +2 -2
- package/dist/parser/factories/unit/createUnitParser.js +3 -3
- package/dist/parser/parseBoolean.d.ts +1 -1
- package/dist/parser/parseBoolean.js +1 -1
- package/dist/parser/parseBytes.d.ts +1 -1
- package/dist/parser/parseBytes.js +1 -1
- package/dist/parser/parseInteger.d.ts +1 -1
- package/dist/parser/parseInteger.js +2 -2
- package/dist/parser/parseMilliseconds.d.ts +1 -1
- package/dist/parser/parseMilliseconds.js +1 -1
- package/dist/parser/parseNumber.d.ts +1 -1
- package/dist/parser/parseNumber.js +1 -1
- package/dist/parser/parseString.d.ts +1 -1
- package/dist/parser/parseString.js +1 -1
- package/dist/pwd/Pwd.js +1 -1
- package/dist/pwd/errors/HashRoundsError.d.ts +1 -1
- package/dist/pwd/errors/HashRoundsError.js +1 -1
- package/dist/pwd/validateHashRounds.js +1 -1
- package/dist/server/Route.d.ts +3 -3
- package/dist/server/Server.d.ts +6 -5
- package/dist/server/Server.js +5 -2
- package/dist/server/getAjv.d.ts +1 -1
- package/dist/tls/errors/FileReadError.d.ts +1 -1
- package/dist/tls/errors/FileReadError.js +1 -1
- package/dist/tls/getTls.d.ts +1 -1
- package/dist/tls/getTls.js +1 -1
- package/dist/tls/readFile.js +1 -1
- package/package.json +32 -33
package/dist/cipher/Cipher.d.ts
CHANGED
package/dist/cipher/Cipher.js
CHANGED
|
@@ -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,
|
package/dist/cli/Command.d.ts
CHANGED
package/dist/cli/getArgs.d.ts
CHANGED
package/dist/cli/getArgs.js
CHANGED
package/dist/cli/parseArgs.d.ts
CHANGED
|
@@ -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?: {
|
package/dist/config/getConfig.js
CHANGED
|
@@ -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/dist/config/readFile.js
CHANGED
package/dist/env/getEnv.d.ts
CHANGED
package/dist/env/getEnv.js
CHANGED
package/dist/env/readFile.d.ts
CHANGED
package/dist/env/readFile.js
CHANGED
package/dist/jwt/Jwt.d.ts
CHANGED
package/dist/jwt/Jwt.js
CHANGED
|
@@ -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;
|
package/dist/mailer/Event.d.ts
CHANGED
package/dist/mailer/Mail.d.ts
CHANGED
|
@@ -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;
|
package/dist/mailer/Mailer.d.ts
CHANGED
package/dist/mailer/Mailer.js
CHANGED
|
@@ -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 {
|
|
4
|
-
import {
|
|
5
|
-
import { getAddress } from './getAddress';
|
|
6
|
-
import { getAddresses } from './getAddresses';
|
|
7
|
-
import { getAttachments } from './getAttachments';
|
|
2
|
+
import { getTls } from '../../../tls/getTls.js';
|
|
3
|
+
import { getIcalendar } from '../../getIcalendar.js';
|
|
4
|
+
import { Mailer } from '../../Mailer.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,7 @@
|
|
|
1
|
-
import type { Address } from '../../Address';
|
|
2
|
-
|
|
1
|
+
import type { Address } from '../../Address.js';
|
|
2
|
+
interface NodemailerAddress {
|
|
3
|
+
address: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
3
6
|
declare const getAddress: (address?: Address) => NodemailerAddress | undefined;
|
|
4
7
|
export { getAddress, };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type { Address } from '../../Address';
|
|
2
|
-
|
|
1
|
+
import type { Address } from '../../Address.js';
|
|
2
|
+
interface NodemailerAddress {
|
|
3
|
+
address: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
3
6
|
declare const getAddresses: (addresses?: Address[]) => NodemailerAddress[];
|
|
4
7
|
export { getAddresses, };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type { Attachment } from '../../Attachment';
|
|
2
|
-
import type {
|
|
1
|
+
import type { Attachment } from '../../Attachment.js';
|
|
2
|
+
import type { Readable } from 'stream';
|
|
3
|
+
interface NodemailerAttachment {
|
|
4
|
+
filename: string;
|
|
5
|
+
cid: string;
|
|
6
|
+
contentType: string | undefined;
|
|
7
|
+
content: Buffer | Readable | string;
|
|
8
|
+
}
|
|
3
9
|
declare const getAttachments: (attachments?: Attachment[]) => NodemailerAttachment[];
|
|
4
10
|
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);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isValidGeolocation } from 'utils/isValidGeolocation';
|
|
2
|
-
import { EventGeolocationError } from './errors/EventGeolocationError';
|
|
1
|
+
import { isValidGeolocation } from '../utils/isValidGeolocation.js';
|
|
2
|
+
import { EventGeolocationError } from './errors/EventGeolocationError.js';
|
|
3
3
|
const validateEventGeolocation = (latitude, longitude) => {
|
|
4
4
|
if (!isValidGeolocation(latitude, longitude)) {
|
|
5
5
|
throw new EventGeolocationError(latitude, longitude);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isValidUrl } from 'utils/isValidUrl';
|
|
2
|
-
import { EventUrlError } from './errors/EventUrlError';
|
|
1
|
+
import { isValidUrl } from '../utils/isValidUrl.js';
|
|
2
|
+
import { EventUrlError } from './errors/EventUrlError.js';
|
|
3
3
|
const validateEventUrl = (url) => {
|
|
4
4
|
if (!isValidUrl(url)) {
|
|
5
5
|
throw new EventUrlError(url);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isValidUrl } from 'utils/isValidUrl';
|
|
2
|
-
import { ListUrlError } from './errors/ListUrlError';
|
|
1
|
+
import { isValidUrl } from '../utils/isValidUrl.js';
|
|
2
|
+
import { ListUrlError } from './errors/ListUrlError.js';
|
|
3
3
|
const validateListUrl = (property, url) => {
|
|
4
4
|
if (!isValidUrl(url)) {
|
|
5
5
|
throw new ListUrlError(property, url);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Parser } from '../../Parser';
|
|
2
|
-
declare const createEnumParser: <
|
|
1
|
+
import type { Parser } from '../../Parser.js';
|
|
2
|
+
declare const createEnumParser: <Enum extends Record<string, string | number>>(params: {
|
|
3
3
|
type: string;
|
|
4
|
-
enum:
|
|
5
|
-
}) => Parser<
|
|
4
|
+
enum: Enum;
|
|
5
|
+
}) => Parser<Enum[keyof Enum]>;
|
|
6
6
|
export { createEnumParser, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParseError } from '../../errors/ParseError';
|
|
2
|
-
import { parseNumber } from '../../parseNumber';
|
|
3
|
-
import { parseString } from '../../parseString';
|
|
1
|
+
import { ParseError } from '../../errors/ParseError.js';
|
|
2
|
+
import { parseNumber } from '../../parseNumber.js';
|
|
3
|
+
import { parseString } from '../../parseString.js';
|
|
4
4
|
const createUnitParser = (params) => {
|
|
5
5
|
return (input) => {
|
|
6
6
|
let string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const parseBytes: import("./Parser").Parser<number>;
|
|
1
|
+
declare const parseBytes: import("./Parser.js").Parser<number>;
|
|
2
2
|
export { parseBytes, };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const parseMilliseconds: import("./Parser").Parser<number>;
|
|
1
|
+
declare const parseMilliseconds: import("./Parser.js").Parser<number>;
|
|
2
2
|
export { parseMilliseconds, };
|
package/dist/pwd/Pwd.js
CHANGED
package/dist/server/Route.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Handler } from './Handler';
|
|
2
|
-
import type { Method } from './Method';
|
|
3
|
-
import type { Schema } from './Schema';
|
|
1
|
+
import type { Handler } from './Handler.js';
|
|
2
|
+
import type { Method } from './Method.js';
|
|
3
|
+
import type { Schema } from './Schema.js';
|
|
4
4
|
interface Route {
|
|
5
5
|
path: string;
|
|
6
6
|
method: Method;
|
package/dist/server/Server.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OpenApiFormat } from './OpenApiFormat';
|
|
2
|
-
import type { ErrorHandler } from './ErrorHandler';
|
|
3
|
-
import type { Format } from './Format';
|
|
4
|
-
import type { Handler } from './Handler';
|
|
5
|
-
import type { Route } from './Route';
|
|
1
|
+
import { OpenApiFormat } from './OpenApiFormat.js';
|
|
2
|
+
import type { ErrorHandler } from './ErrorHandler.js';
|
|
3
|
+
import type { Format } from './Format.js';
|
|
4
|
+
import type { Handler } from './Handler.js';
|
|
5
|
+
import type { Route } from './Route.js';
|
|
6
6
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
7
7
|
declare class Server {
|
|
8
8
|
private readonly server;
|
|
@@ -32,6 +32,7 @@ declare class Server {
|
|
|
32
32
|
onError?: ErrorHandler;
|
|
33
33
|
});
|
|
34
34
|
start(): Promise<string>;
|
|
35
|
+
close(): Promise<void>;
|
|
35
36
|
openapi(format: OpenApiFormat): OpenAPIV3.Document;
|
|
36
37
|
}
|
|
37
38
|
export { Server, };
|
package/dist/server/Server.js
CHANGED
|
@@ -3,8 +3,8 @@ import cors from '@fastify/cors';
|
|
|
3
3
|
import responseValidation from '@fastify/response-validation';
|
|
4
4
|
import swagger from '@fastify/swagger';
|
|
5
5
|
import fastify from 'fastify';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { getAjv } from './getAjv.js';
|
|
7
|
+
import { OpenApiFormat } from './OpenApiFormat.js';
|
|
8
8
|
class Server {
|
|
9
9
|
server;
|
|
10
10
|
host;
|
|
@@ -77,6 +77,9 @@ class Server {
|
|
|
77
77
|
port: this.port,
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
+
async close() {
|
|
81
|
+
await this.server.close();
|
|
82
|
+
}
|
|
80
83
|
openapi(format) {
|
|
81
84
|
return this.server.swagger({
|
|
82
85
|
yaml: format === OpenApiFormat.YAML,
|
package/dist/server/getAjv.d.ts
CHANGED
package/dist/tls/getTls.d.ts
CHANGED
package/dist/tls/getTls.js
CHANGED
package/dist/tls/readFile.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apeframework",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.24",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -17,6 +17,37 @@
|
|
|
17
17
|
"url": "git+https://github.com/ApeFramework/apeframework.git"
|
|
18
18
|
},
|
|
19
19
|
"type": "module",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=22"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@fastify/compress": "^8.0",
|
|
25
|
+
"@fastify/cors": "^11.0",
|
|
26
|
+
"@fastify/response-validation": "^3.0",
|
|
27
|
+
"@fastify/swagger": "^9.4",
|
|
28
|
+
"@types/fs-extra": "^11.0",
|
|
29
|
+
"@types/nodemailer": "^6.4",
|
|
30
|
+
"@types/yargs-parser": "^21.0",
|
|
31
|
+
"ajv": "^8.17",
|
|
32
|
+
"bcryptjs": "^3.0",
|
|
33
|
+
"bullmq": "^5.48",
|
|
34
|
+
"dotenv": "^16.4",
|
|
35
|
+
"fast-uri": "^3.0",
|
|
36
|
+
"fastify": "^5.2",
|
|
37
|
+
"fs-extra": "^11.3",
|
|
38
|
+
"ical-generator": "^8.1",
|
|
39
|
+
"ioredis": "^5.6",
|
|
40
|
+
"jose": "^6.0",
|
|
41
|
+
"nodemailer": "^6.10",
|
|
42
|
+
"openapi-types": "^12.1",
|
|
43
|
+
"pino": "^9.6",
|
|
44
|
+
"pino-pretty": "^13.0",
|
|
45
|
+
"yargs-parser": "^21.1"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@types/node": "^22.14",
|
|
49
|
+
"typescript": "^5.8"
|
|
50
|
+
},
|
|
20
51
|
"exports": {
|
|
21
52
|
"./cipher/Algorithm": {
|
|
22
53
|
"import": {
|
|
@@ -642,37 +673,5 @@
|
|
|
642
673
|
"default": "./dist/utils/wait.js"
|
|
643
674
|
}
|
|
644
675
|
}
|
|
645
|
-
},
|
|
646
|
-
"engines": {
|
|
647
|
-
"node": ">=22"
|
|
648
|
-
},
|
|
649
|
-
"dependencies": {
|
|
650
|
-
"@fastify/compress": "^8.0",
|
|
651
|
-
"@fastify/cors": "^10.0",
|
|
652
|
-
"@fastify/response-validation": "^3.0",
|
|
653
|
-
"@fastify/swagger": "^9.4",
|
|
654
|
-
"@types/bcryptjs": "^2.4",
|
|
655
|
-
"@types/fs-extra": "^11.0",
|
|
656
|
-
"@types/nodemailer": "^6.4",
|
|
657
|
-
"@types/yargs-parser": "^21.0",
|
|
658
|
-
"ajv": "^8.17",
|
|
659
|
-
"bcryptjs": "^2.4",
|
|
660
|
-
"bullmq": "^5.34",
|
|
661
|
-
"dotenv": "^16.4",
|
|
662
|
-
"fast-uri": "^3.0",
|
|
663
|
-
"fastify": "^5.2",
|
|
664
|
-
"fs-extra": "^11.2",
|
|
665
|
-
"ical-generator": "^8.0",
|
|
666
|
-
"ioredis": "^5.4",
|
|
667
|
-
"jose": "^5.9",
|
|
668
|
-
"nodemailer": "^6.9",
|
|
669
|
-
"openapi-types": "^12.1",
|
|
670
|
-
"pino": "^9.5",
|
|
671
|
-
"pino-pretty": "^13.0",
|
|
672
|
-
"yargs-parser": "^21.1"
|
|
673
|
-
},
|
|
674
|
-
"peerDependencies": {
|
|
675
|
-
"@types/node": "^22.10",
|
|
676
|
-
"typescript": "^5.7"
|
|
677
676
|
}
|
|
678
677
|
}
|