use new mail service in dashboard

This commit is contained in:
Emily
2025-01-29 16:03:01 +01:00
parent 39b8dd84f1
commit bfeee8673c
26 changed files with 147 additions and 1266 deletions

View File

@@ -28,8 +28,8 @@ async function main() {
if (fs.existsSync(TMP_PATH)) fs.rmSync(TMP_PATH, { force: true, recursive: true });
fs.ensureDirSync(TMP_PATH);
// console.log('Building');
// child.execSync(`cd ${LOCAL_PATH} && pnpm i && pnpm run build`)
console.log('Building');
child.execSync(`cd ${LOCAL_PATH} && pnpm i && pnpm run build`)
console.log('Creting zip file');
const archive = createZip(TMP_PATH + '/' + ZIP_NAME);
@@ -71,12 +71,12 @@ async function main() {
console.log('Extracting remote');
await DeployHelper.execute(`cd ${REMOTE_PATH} && unzip ${ZIP_NAME} && rm -r ${ZIP_NAME}`);
// console.log('Installing remote');
// await DeployHelper.execute(`cd ${REMOTE_PATH} && /root/.nvm/versions/node/v21.2.0/bin/pnpm i`);
console.log('Installing remote');
await DeployHelper.execute(`cd ${REMOTE_PATH}/.output/server && /root/.nvm/versions/node/v21.2.0/bin/pnpm i`);
// await DeployHelper.execute(`cd ${REMOTE_PATH} && /root/.nvm/versions/node/v21.2.0/bin/pm2 start ecosystem.config.js`);
console.log('Executing remote');
await DeployHelper.execute(`cd ${REMOTE_PATH} && /root/.nvm/versions/node/v21.2.0/bin/pm2 start ecosystem.config.js`);
ssh.dispose();
}

View File

@@ -1,14 +1,13 @@
import { SharedHelper } from "../helpers/shared-helper";
import path from "path";
import path from "node:path";
const helper = new SharedHelper(path.join(__dirname, '../../dashboard/shared'))
helper.clear();
// TODO: Email service as external repo
helper.create('services');
helper.copy('services/DateService.ts');
helper.copy('services/EmailService.ts');
helper.create('data');

12
scripts/tsconfig.json Normal file
View File

@@ -0,0 +1,12 @@
{
"compilerOptions": {
"module": "NodeNext",
"target": "ESNext"
},
"include": [
"./**/*.ts"
],
"exclude": [
"node_modules"
]
}