feat: usage of ESM modules imports (instead of CommonJS) (#5)
Replace `jest` with `tap`.
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import { URL, pathToFileURL } from 'node:url'
|
||||
import path from 'node:path'
|
||||
import { URL } from 'node:url'
|
||||
|
||||
import dotenv from 'dotenv'
|
||||
|
||||
@ -14,16 +13,14 @@ export const JWT_REFRESH_SECRET =
|
||||
export const JWT_ACCESS_EXPIRES_IN =
|
||||
process.env.JWT_ACCESS_EXPIRES_IN ?? '15 minutes'
|
||||
|
||||
const importMetaURL = pathToFileURL(path.join(__dirname, 'app.js'))
|
||||
|
||||
export const SRC_URL = new URL('../../', importMetaURL)
|
||||
export const SRC_URL = new URL('../../', import.meta.url)
|
||||
export const ROOT_URL = new URL('../', SRC_URL)
|
||||
export const EMAIL_URL = new URL('./email/', ROOT_URL)
|
||||
export const EMAIL_TEMPLATE_URL = new URL('./email-template.ejs', EMAIL_URL)
|
||||
export const EMAIL_LOCALES_URL = new URL('./locales/', EMAIL_URL)
|
||||
export const UPLOADS_URL = new URL('./uploads/', ROOT_URL)
|
||||
|
||||
export const supportedImageMimetype = [
|
||||
export const SUPPORTED_IMAGE_MIMETYPE = [
|
||||
'image/png',
|
||||
'image/jpg',
|
||||
'image/jpeg',
|
||||
@ -31,5 +28,7 @@ export const supportedImageMimetype = [
|
||||
]
|
||||
|
||||
/** in megabytes */
|
||||
export const maximumImageSize = 10
|
||||
export const maximumFileSize = 100
|
||||
export const MAXIMUM_IMAGE_SIZE = 10
|
||||
|
||||
/** in megabytes */
|
||||
export const MAXIMUM_FILE_SIZE = 100
|
||||
|
Reference in New Issue
Block a user