chore: rename 'nodemailer' to 'mail'
This commit is contained in:
@@ -46,7 +46,6 @@
|
||||
"hotkeys-js": "^3.11.2",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lodash": "^4.17.21",
|
||||
"nodemailer": "^6.9.5",
|
||||
"openai-edge": "^1.2.2",
|
||||
"pluralize": "^8.0.0",
|
||||
"posthog-js": "^1.116.6",
|
||||
@@ -72,7 +71,6 @@
|
||||
"@testing-library/svelte": "^4.0.5",
|
||||
"@types/jest": "^29.5.10",
|
||||
"@types/lodash": "^4.14.196",
|
||||
"@types/nodemailer": "^6.4.11",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"babel-jest": "^29.7.0",
|
||||
"carbon-components-svelte": "^0.79.0",
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
import nodemailer from 'nodemailer';
|
||||
import {
|
||||
SMTP_HOST,
|
||||
SMTP_PORT,
|
||||
SMTP_USER,
|
||||
SMTP_PASSWORD,
|
||||
SMTP_USER_NOTIFY,
|
||||
SMTP_PASSWORD_NOTIFY
|
||||
} from '$env/static/private';
|
||||
|
||||
let transporter: nodemailer.Transporter;
|
||||
|
||||
export const getTransporter = async (
|
||||
isPersonal?: boolean
|
||||
): Promise<nodemailer.Transporter | null> => {
|
||||
return await new Promise((resolve, reject) => {
|
||||
// If email sending isn't configured
|
||||
if (!SMTP_HOST) {
|
||||
resolve(null);
|
||||
}
|
||||
|
||||
if (transporter) {
|
||||
return resolve(transporter);
|
||||
}
|
||||
|
||||
transporter = nodemailer.createTransport({
|
||||
host: SMTP_HOST,
|
||||
port: parseInt(SMTP_PORT),
|
||||
secure: true,
|
||||
auth: {
|
||||
user: isPersonal ? SMTP_USER : SMTP_USER_NOTIFY,
|
||||
pass: isPersonal ? SMTP_PASSWORD : SMTP_PASSWORD_NOTIFY
|
||||
}
|
||||
});
|
||||
|
||||
transporter.verify(function (error) {
|
||||
if (error) {
|
||||
console.log('Transporter error', error);
|
||||
reject(null);
|
||||
} else {
|
||||
console.log('Server is ready to take our messages');
|
||||
resolve(transporter);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import sendEmail from '$nodemailer/sendEmail';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
const supabase = getSupabase();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import { getFeedForNotification } from '$lib/utils/services/newsfeed/index';
|
||||
import sendEmail from '$nodemailer/sendEmail';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
const supabase = getSupabase();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
// import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import sendEmail from '$nodemailer/sendEmail';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
// const supabase = getSupabase();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import sendEmail from '$nodemailer/sendEmail';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
const supabase = getSupabase();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import sendEmail from '$nodemailer/sendEmail';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
const supabase = getSupabase();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
// import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import sendEmail from '$nodemailer/sendEmail';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
// const supabase = getSupabase();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import sendEmail from '$nodemailer/sendEmail';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
const supabase = getSupabase();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import sendEmail from '$nodemailer/sendEmail';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
const supabase = getSupabase();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import sendEmail from '$nodemailer/sendEmail';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
const supabase = getSupabase();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import sendEmail from '$nodemailer/sendEmail';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
const supabase = getSupabase();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { getSupabase } from '$lib/utils/functions/supabase';
|
||||
import sendEmail from '$nodemailer/sendEmail';
|
||||
import sendEmail from '$mail/sendEmail';
|
||||
|
||||
const supabase = getSupabase();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ const config = {
|
||||
adapter: vercelAdapter(),
|
||||
alias: {
|
||||
$lib: path.resolve('./src/lib'),
|
||||
$nodemailer: path.resolve('./src/nodemailer')
|
||||
$mail: path.resolve('./src/mail')
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
"paths": {
|
||||
"$lib": ["./src/lib"],
|
||||
"$lib/*": ["./src/lib/*"],
|
||||
"$nodemailer": ["./src/nodemailer"],
|
||||
"$nodemailer/*": ["./src/nodemailer/*"]
|
||||
"$mail": ["./src/mail"],
|
||||
"$mail/*": ["./src/mail/*"]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Generated
+21
-15
@@ -240,9 +240,6 @@ importers:
|
||||
lodash:
|
||||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
nodemailer:
|
||||
specifier: ^6.9.5
|
||||
version: 6.9.5
|
||||
openai-edge:
|
||||
specifier: ^1.2.2
|
||||
version: 1.2.2
|
||||
@@ -313,9 +310,6 @@ importers:
|
||||
'@types/lodash':
|
||||
specifier: ^4.14.196
|
||||
version: 4.14.196
|
||||
'@types/nodemailer':
|
||||
specifier: ^6.4.11
|
||||
version: 6.4.11
|
||||
autoprefixer:
|
||||
specifier: ^10.4.14
|
||||
version: 10.4.14([email protected])
|
||||
@@ -1613,7 +1607,7 @@ packages:
|
||||
'@babel/traverse': 7.23.4
|
||||
'@babel/types': 7.23.4
|
||||
convert-source-map: 1.9.0
|
||||
debug: 4.3.4([email protected])
|
||||
debug: 4.3.4
|
||||
gensync: 1.0.0-beta.2
|
||||
json5: 2.2.3
|
||||
semver: 6.3.1
|
||||
@@ -1636,7 +1630,7 @@ packages:
|
||||
'@babel/traverse': 7.23.4
|
||||
'@babel/types': 7.23.4
|
||||
convert-source-map: 2.0.0
|
||||
debug: 4.3.4([email protected])
|
||||
debug: 4.3.4
|
||||
gensync: 1.0.0-beta.2
|
||||
json5: 2.2.3
|
||||
semver: 6.3.1
|
||||
@@ -1793,7 +1787,7 @@ packages:
|
||||
'@babel/core': 7.22.9
|
||||
'@babel/helper-compilation-targets': 7.22.15
|
||||
'@babel/helper-plugin-utils': 7.22.5
|
||||
debug: 4.3.4([email protected])
|
||||
debug: 4.3.4
|
||||
lodash.debounce: 4.0.8
|
||||
resolve: 1.22.8
|
||||
transitivePeerDependencies:
|
||||
@@ -3108,7 +3102,7 @@ packages:
|
||||
'@babel/helper-split-export-declaration': 7.22.6
|
||||
'@babel/parser': 7.23.4
|
||||
'@babel/types': 7.23.4
|
||||
debug: 4.3.4([email protected])
|
||||
debug: 4.3.4
|
||||
globals: 11.12.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -5781,7 +5775,7 @@ packages:
|
||||
vite: ^4.0.0
|
||||
dependencies:
|
||||
'@sveltejs/vite-plugin-svelte': 2.5.3([email protected])([email protected])
|
||||
debug: 4.3.4([email protected])
|
||||
debug: 4.3.4
|
||||
svelte: 4.1.2
|
||||
vite: 4.4.8(@types/[email protected])([email protected])
|
||||
transitivePeerDependencies:
|
||||
@@ -5795,7 +5789,7 @@ packages:
|
||||
vite: ^4.0.0
|
||||
dependencies:
|
||||
'@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/[email protected])([email protected])([email protected])
|
||||
debug: 4.3.4([email protected])
|
||||
debug: 4.3.4
|
||||
deepmerge: 4.3.1
|
||||
kleur: 4.1.5
|
||||
magic-string: 0.30.5
|
||||
@@ -6095,6 +6089,7 @@ packages:
|
||||
resolution: {integrity: sha512-Ld2c0frwpGT4VseuoeboCXQ7UJIkK3X7Lx/4YsZEiUHtHsthWAOCYtf6PAiLhMtfwV0cWJRabLBS3+LD8x6Nrw==}
|
||||
dependencies:
|
||||
'@types/node': 18.11.10
|
||||
dev: false
|
||||
|
||||
/@types/[email protected]:
|
||||
resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==}
|
||||
@@ -6573,7 +6568,7 @@ packages:
|
||||
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
|
||||
engines: {node: '>= 6.0.0'}
|
||||
dependencies:
|
||||
debug: 4.3.4([email protected])
|
||||
debug: 4.3.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
@@ -8384,6 +8379,17 @@ packages:
|
||||
ms: 2.1.3
|
||||
dev: true
|
||||
|
||||
/[email protected]:
|
||||
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
|
||||
engines: {node: '>=6.0'}
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
supports-color:
|
||||
optional: true
|
||||
dependencies:
|
||||
ms: 2.1.2
|
||||
|
||||
/[email protected]([email protected]):
|
||||
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
|
||||
engines: {node: '>=6.0'}
|
||||
@@ -10480,7 +10486,7 @@ packages:
|
||||
engines: {node: '>= 6'}
|
||||
dependencies:
|
||||
agent-base: 6.0.2
|
||||
debug: 4.3.4([email protected])
|
||||
debug: 4.3.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
@@ -11007,7 +11013,7 @@ packages:
|
||||
resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==}
|
||||
engines: {node: '>=10'}
|
||||
dependencies:
|
||||
debug: 4.3.4([email protected])
|
||||
debug: 4.3.4
|
||||
istanbul-lib-coverage: 3.2.2
|
||||
source-map: 0.6.1
|
||||
transitivePeerDependencies:
|
||||
|
||||
Reference in New Issue
Block a user